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

[Certora] [M-10] + [M-11] Manual tracking of EETH shares owned by membership manager #180

Open
wants to merge 1 commit into
base: staging-2.5
Choose a base branch
from

Conversation

solipsis
Copy link
Contributor

@solipsis solipsis commented Oct 3, 2024

This PR adds a manual tracking for the number of EETH shares owned by the membership manager. This prevents anyone from being able to impact rebasing operations via donating eETH shares to the membership manager

Primary testing provided by the existing test_bring_random_monkeys() function. At the conclusion of this function with thousands of deposit / rebase / withdrawal operations, shares are within 5000 shares of the target amount which is just dust.

eETH.transfer(msg.sender, totalBalance - feeAmount);

if (feeAmount > 0) {
liquidityPool.withdraw(address(this), feeAmount);
uint256 feeShares = liquidityPool.withdraw(address(this), feeAmount);
Copy link
Contributor

Choose a reason for hiding this comment

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

By this withdraw, the membership manager contract will receive ETH (not eETH), which is used to boost the MembershipNFT APR when rebasing happens. so it should not be counted as membershipShares

Copy link
Contributor

@seongyun-ko seongyun-ko left a comment

Choose a reason for hiding this comment

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

LGTM overall, but left a feedback on one fix

A few points to confirm:

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