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

Don't reduce stake while adding liquidity #226

Open
reubenr0d opened this issue Feb 28, 2022 · 1 comment
Open

Don't reduce stake while adding liquidity #226

reubenr0d opened this issue Feb 28, 2022 · 1 comment

Comments

@reubenr0d
Copy link
Contributor

reubenr0d commented Feb 28, 2022

Currently stake is reduced while adding liquidity, in the token.transfer handler. However if the transfer is due to adding liquidity then the stake is still held by the LP provider, so it shouldn't be reduced.

In that case same while removing liquidity, stake should not be added.

@reubenr0d reubenr0d added the Epic label Feb 28, 2022
@reubenr0d reubenr0d changed the title Don Don't reduce stake while adding liquidity Feb 28, 2022
@reubenr0d
Copy link
Contributor Author

In order to achieve this in the event handlers for adding/removing liquidity we add/subtract from the stake, such that the effects of stake on transfer are neutralised.

TODO: What when users transfer LP Tokens? Should stake get transferred to that user then?

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

1 participant