Skip to content

yash/feat/harcode-boundries#383

Open
0xpanicError wants to merge 6 commits intopankaj/feat/security-upgradesfrom
yash/feat/harcode-boundries
Open

yash/feat/harcode-boundries#383
0xpanicError wants to merge 6 commits intopankaj/feat/security-upgradesfrom
yash/feat/harcode-boundries

Conversation

@0xpanicError
Copy link
Copy Markdown

@0xpanicError 0xpanicError commented Apr 28, 2026

Note

High Risk
Touches core liquidity pool accounting and redemption/admin parameter paths; the new MIN_AMOUNT_FOR_SHARE checks can cause unexpected reverts in deposits/withdrawals/rebases if misconfigured during upgrades.

Overview
Adds configurable on-chain guardrails to prevent unsafe parameterization across core contracts.

EtherFiAdmin now takes immutable caps for MAX_ACCEPTABLE_REBASE_APR_IN_BPS and MAX_VALIDATOR_TASK_BATCH_SIZE, validating constructor inputs and enforcing the caps in updateAcceptableRebaseApr() and setValidatorTaskBatchSize(). EtherFiRedemptionManager similarly introduces immutable maxima for exit fee, fee split to treasury, and low-watermark, and applies them across initialization and setters (with updated revert messages).

LiquidityPool introduces an immutable MIN_AMOUNT_FOR_SHARE and enforces it via _checkMinAmountForShare() after all state changes that can affect the eETH share price (deposits, withdrawals, rebases, burns, ETH accounting/receive), reverting with InvalidAmountForShare when the floor is violated. Tests are expanded substantially, including a new mainnet-fork suite covering all affected entry points; TestSetup and other tests are updated for the new constructor args and tighter exit-fee bounds.

Reviewed by Cursor Bugbot for commit ca46d04. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9f7592517

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/LiquidityPool.sol
Comment thread src/EtherFiRedemptionManager.sol
Comment thread src/EtherFiRedemptionManager.sol
Comment thread src/EtherFiRedemptionManager.sol
Comment thread src/EtherFiAdmin.sol
@pankajjagtapp
Copy link
Copy Markdown
Contributor

  1. Can you add fork tests for the MIN_AMOUNT_FOR_SHARE using various values and then doing the tests on functions that this change makes impact in ?
  2. What would be the reasonable values for MIN_AMOUNT_FOR_SHARE and other constants set in this field?

Comment thread src/EtherFiAdmin.sol
Comment thread src/LiquidityPool.sol
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ca46d04. Configure here.

Comment thread src/EtherFiRedemptionManager.sol
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