Skip to content

Conversation

vvalecha519
Copy link
Contributor

@vvalecha519 vvalecha519 commented Sep 22, 2025

Note

Enable instant redemptions to ETH or stETH with per-token limits/fees, updating RedemptionManager, LiquidityPool, and Restaker, plus upgrade tooling and tests.

  • Contracts:
    • src/EtherFiRedemptionManager.sol: Add support to redeem to ETH or stETH via outputToken; introduce per-token RedemptionInfo mapping, initializeTokenParameters, and token-scoped admin setters; update rate-limit/low-watermark logic per token; extend events/errors; integrate EtherFiRestaker/Lido; modify redeem/permit functions to include outputToken.
    • src/LiquidityPool.sol: Add burnEEthSharesForNonETHWithdrawal(_amountSharesToBurn, _withdrawalValueInETH) and event; adjust accounting for non-ETH withdrawals.
    • src/EtherFiRestaker.sol: Add etherFiRedemptionManager ref and transferStETH(recipient, amount) (restricted to RedemptionManager).
    • src/EtherFiRedemptionManagerTemp.sol: Temporary impl to clear storage slots during upgrade.
    • src/interfaces/ILiquidityPool.sol: Expose new burnEEthSharesForNonETHWithdrawal.
  • Tooling/Scripts:
    • Add script/stETH-withdrawals/{deploy,transactions,verify}.s.sol and script/utils/utils.sol for CREATE2 deploy, upgrade/rollback scheduling, and verification.
    • Minor fix in script/ContractCodeChecker.sol byte-compare order.
  • Deployments:
    • New deployment artifacts for EtherFiRedemptionManager, EtherFiRedemptionManagerTemp, EtherFiRestaker; updated LiquidityPool salt/address.
  • Tests:
    • Update and add tests for per-token params, stETH path, permissions, and share/accounting invariants; adjust constructors and calls to new signatures.

Written by Cursor Bugbot for commit 4645215. This will update automatically on new commits. Configure here.

@vvalecha519 vvalecha519 changed the title make more maintainable Instant WDs stEth Sep 22, 2025
@pankajjagtapp pankajjagtapp self-requested a review September 23, 2025 22:51
vvalecha519 and others added 12 commits September 29, 2025 12:05
- Add feeShareToStakers parameter to _processStETHRedemption
- Call burnEEthShares to distribute fees to stakers in stETH flow
- Update share validation to account for both withdrawal and fee burning
- Ensure consistent fee handling between ETH and stETH redemption flows
- Add InvalidOutputToken error for unsupported output tokens
- Improve function documentation and parameter naming
…on-staker-fees

fix: add fee split to stETH redemption flow
cursor[bot]

This comment was marked as outdated.

Copy link

Sherlock AI Findings

The automated tool completed its analysis of the codebase and found no potential security issues.

Next Steps: No immediate actions are required. Continue monitoring the codebase with future scans.

Full report available at: https://ai.sherlock.xyz/runs/9cd08762-8c98-4116-8d39-affd959206d9

- Added `deploy.s.sol` to handle the deployment of EtherFi contracts including `EtherFiRedemptionManagerTemp`, `EtherFiRestaker`, `EtherFiRedemptionManager`, and `LiquidityPool`.
- Created utility functions in `utils.sol` for deployment and verification processes.
- Introduced `transactions.s.sol` for managing upgrade and rollback processes for EtherFi contracts.
- Removed unused variables and comments from `deploy.s.sol`.
- Added a new `readme.md` to document deployment and upgrade procedures.
- Updated utility functions in `utils.sol` to include minimum delay constants for timelocks.
pankajjagtapp and others added 16 commits October 7, 2025 17:06
…tions

- Updated `transactions.s.sol` to include new contract implementations for `EtherFiRedemptionManager`, `EtherFiRedemptionManagerTemp`, `EtherFiRestaker`, and `LiquidityPool`.
- Enhanced utility functions in `utils.sol` to support proxy upgradeability checks and time calculations.
- Enhanced `scheduleCleanUpStorageOnEFRM` and `_clearOutSlotForUpgrade` functions to utilize operation IDs for better transaction tracking.
- Implemented `initializeTokenParametersEFRM` function to set token parameters for `EtherFiRedemptionManager`.
- Implemented `verifyCreate2Address` function to compute the predicted address for contracts created with Create2, enhancing deployment verification capabilities.
- Refactored `getImplementation` function to streamline proxy implementation retrieval using `vm.load`.
- Introduced `VerifyStETHWithdrawals` contract to validate addresses, bytecode, upgradeability, and new functionality for EtherFi contracts.
…EtherFiRedemptionManagerTemp`, `EtherFiRestaker`, and `LiquidityPool
…y-verify-instant_wdrls_for_stETH

Implement deployment and verifications scripts for stETH withdrawals upgrade
function redeemEEthWithPermit(uint256 eEthAmount, address receiver, IeETH.PermitInput calldata permit, address outputToken) external whenNotPaused nonReentrant {
try eEth.permit(msg.sender, address(this), permit.value, permit.deadline, permit.v, permit.r, permit.s) {} catch {}
_redeemEEth(eEthAmount, receiver);
_redeemEEth(eEthAmount, receiver, outputToken);
Copy link

Choose a reason for hiding this comment

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

Bug: Permit Signature Failure Due to Incorrect Owner

The permit calls within redeemEEthWithPermit and redeemWeEthWithPermit incorrectly use msg.sender as the owner. This causes permit signatures to be invalid, leading to failed redemptions when the receiver differs from msg.sender.

Additional Locations (1)

Fix in Cursor Fix in Web

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