-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description This PR tries to solve the discontinued curve problem that was causing the same sell amount when executed in two swaps resulting in a larger amountOut than when sold in one swap. The idea is to apply the exitContribution on the G$ amount being sold and burning that amount. In order to not move on the curve by this burn we increase the reserve ratio in order to keep the price before the exitContribution burn equal to the price after. ### Other changes Added requires that ensure the token Supply always stays at a minimum of 1 wei ### Tested - new tests added ensuring the difference in splitting sells into multiple swaps stays super small compared to the gas costs ### Related issues mento-protocol/mento-general#596 #555 ### Backwards compatibility ### Documentation --------- Co-authored-by: baroooo <baranseltekin@gmail.com>
- Loading branch information
Showing
2 changed files
with
191 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.