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

feat: adding live balances to bPool #15

Merged
merged 0 commits into from
May 17, 2024
Merged

feat: adding live balances to bPool #15

merged 0 commits into from
May 17, 2024

Conversation

wei3erHase
Copy link
Member

No description provided.

Copy link

@EndymionJkb EndymionJkb left a comment

Choose a reason for hiding this comment

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

Should document somewhere why you're making this change. It looks like it does what you intend it to do (automatic gulping).

In this simpler contract, we're not handling ETH or making external calls, so there shouldn't be any reentrancy issues (e.g., where people could send tokens and change the balances in the middle of an operation).


_pushUnderlying(token, msg.sender, bsub(tokenBalance, tokenExitFee));
_pushUnderlying(token, _factory, tokenExitFee);
}

// NOTE: deprecated method, as balances are calculated on-the-fly

Choose a reason for hiding this comment

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

Could gulp just be removed, as we're doing it continuously/implicitly now? Are we expecting people to call this? Nobody is really using V1, so I don't think we need to worry about compatibility with existing pools.

Copy link
Member Author

Choose a reason for hiding this comment

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

we can totally deprecate it 👌
was thinking that if there's the chance of a contract already developed that does transfer + gulp, making gulp a no-operation would avoid any revert
but, if there's no current implementation, we can just delete the gulp method pointer

src/contracts/BPool.sol Outdated Show resolved Hide resolved
@wei3erHase wei3erHase merged commit 90c0dc8 into dev May 17, 2024
4 checks passed
@wei3erHase wei3erHase deleted the feat/live-balances branch May 17, 2024 11:29
@wei3erHase wei3erHase restored the feat/live-balances branch May 17, 2024 11:39
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.

2 participants