1

Plan to use getEthToTokenInputPrice in a Dapp. I was going to just use a larger sample size spread out over a large time period to mitigate flash loan price manipulation. Someone said this was insufficient because miners could re-order things like so

1: miner dumps the price on Uniswap 2: miner lets the Dapp record the getEthToTokenInputPrice 3: miner reverses his transaction and only pays minor fees 4: The manipulated Uniswap price sticks in the Dapp even after the miner canceled the transaction

Was I given bad advice? This seems impossible how can a Dapp internalize data from a reversed transaction.

1 Answer 1

0

If you use price data and oracles that are on a blockchain, those will be rolled back as well if there is a chain reorganization.

If your dApp uses some traditional database and techniques to track the price then you need to roll back your price when the chain tip changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.