You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 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 <[email protected]>
Descirption:
This Pr is about fixing the discontinued curve problems on taking the exit contribution
The text was updated successfully, but these errors were encountered: