learn-evm-attacks
learn-evm-attacks copied to clipboard
Feat: add DEX Pools and Pairs creation utils
Feature: Pool and Pair creation under utils folder
Overview: This utility has to allow users to quickly instantiate and create DEX pairs to enable broader test scenarios that depend on custom token pairs.
Leaving ideas that came up while we kept working on this:
The ideal util should process input tokens that the attacker has and receive a parameter to determine the output tokens of the process. Inside the black-boxed util flashloans are made as well as swaps from the currently owned tokens to repayment tokens. Also, should handle the repayment.
Maybe we will need to have the util with separate functions. One to trigger the flashloan and another one to handle the swaps and the repayments as they will likely happen inside the flashloan callback (located in the attacker's contract).
It would be nice to be able to calculate how much input tokens are needed to generate certain price deviation in a different pool state scenarios.