Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Price Estimates should be capped at one batch #1458

Open
nlordell opened this issue Oct 2, 2020 · 1 comment
Open

Price Estimates should be capped at one batch #1458

nlordell opened this issue Oct 2, 2020 · 1 comment

Comments

@nlordell
Copy link
Contributor

nlordell commented Oct 2, 2020

From @fedgiac in #1451

I wonder if this PR can be used for a new attack on the price estimator.
What if a fake token was created with a very good order that can be used to bridge between two real tokens, but which can only be filled with a small amount at every step? Something like this:

Tokens:              OWL    FT        DAI
Buy->sell amounts:   10  -> MAX128
                            MAX128 -> 100
Balances:            0      MAX256    10^(18+6)

The price between DAI and USDC is theoretically great, 10 DAI per OWL, but at most 100 wei of DAI can be sold at every batch at that price.
To use this trick to manipulate the price you'd need a very large amount of DAI, but for more illiquid tokens it might be doable.

@nlordell
Copy link
Contributor Author

nlordell commented Oct 2, 2020

On the other hand, if my trade resolves in 2 batches, I would find that acceptable 😛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant