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

liquidity reserve might show 0 rates for both sides when exceeding price limits #403

Open
yaronvel opened this issue May 7, 2019 · 2 comments

Comments

@yaronvel
Copy link
Contributor

yaronvel commented May 7, 2019

would be better to only block one side.

@ilanDoron
Copy link
Contributor

ilanDoron commented May 7, 2019 via email

@yaronvel
Copy link
Contributor Author

yaronvel commented May 7, 2019

this https://github.com/KyberNetwork/smart-contracts/blob/master/contracts/LiquidityConversionRates.sol#L201

When price goes below min rate for buy it will typically also go over max rate for sell.
In principle it usually happens when inventory of one side is depleted, and then you still want to allow users to buy the other side.

However the calculation is not always correct, and as a result when one side is depleted also the other side is blocked. Which is not the end of the world, but one might argue it is not optimal.

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

No branches or pull requests

2 participants