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

Add require check on PriceOracle.addTokenPair for non-zero price #67

Open
zareth-san opened this issue Aug 18, 2021 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@zareth-san
Copy link
Contributor

Describe the bug
If a newly added token pair's oracle returns a price of 0 inside of PriceOracle.addTokenPair, then that token pair will never be useable going forward.

To Reproduce
Steps to reproduce the behavior:

  1. Call PriceOracle.addTokenPair using an oracle that returns a price of 0.

Expected behavior
I expect any call to PriceOracle.addTokenPair will not render that token pair useless

Additional context
To fix this, we should require a check in PriceOracle.addTokenPair to make sure we never set a price of 0, or else we'll never be able to use that token pair again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants