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

fix: withdraw #647

Merged
merged 3 commits into from
Aug 22, 2024
Merged

fix: withdraw #647

merged 3 commits into from
Aug 22, 2024

Conversation

0xOneTony
Copy link

Makes sure that the poolAmount is not reduced. PoolManager can withdraw non-pool tokens or excessive pool tokens.

@0xOneTony 0xOneTony marked this pull request as ready for review August 20, 2024 10:09
@@ -107,6 +108,16 @@ abstract contract CoreBaseStrategy is IBaseStrategy, Transfer {
onlyPoolManager(msg.sender)
{
_beforeWithdraw(_token, _amount, _recipient);
// If the token is the pool token, revert if the amount is greater than the pool amount
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case the strategy is keeping donation tokens in the strategy then the pool managers will be able to withdraw those donation tokens, this is important to note.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this makes sense for being the default behaviour

@0xOneTony 0xOneTony merged commit 5bae660 into v2.1 Aug 22, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants