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

G$: Issue #64 #555

Closed
philbow61 opened this issue Nov 22, 2024 · 0 comments
Closed

G$: Issue #64 #555

philbow61 opened this issue Nov 22, 2024 · 0 comments
Assignees

Comments

@philbow61
Copy link
Contributor

philbow61 commented Nov 22, 2024

Descirption:
This Pr is about fixing the discontinued curve problems on taking the exit contribution

@philbow61 philbow61 self-assigned this Nov 22, 2024
baroooo added a commit that referenced this issue Nov 29, 2024
### 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]>
@baroooo baroooo closed this as completed Nov 29, 2024
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

2 participants