-
Notifications
You must be signed in to change notification settings - Fork 39
Instant WDs stEth #294
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
base: master
Are you sure you want to change the base?
Instant WDs stEth #294
Conversation
- 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
…h-fixes Vaibhav/instant wd steth fixes
Sherlock AI FindingsThe 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.
…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`.
…on handling in stETH withdrawal script
- 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); |
There was a problem hiding this comment.
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
.
Note
Enable instant redemptions to ETH or stETH with per-token limits/fees, updating RedemptionManager, LiquidityPool, and Restaker, plus upgrade tooling and tests.
src/EtherFiRedemptionManager.sol
: Add support to redeem toETH
orstETH
viaoutputToken
; introduce per-tokenRedemptionInfo
mapping,initializeTokenParameters
, and token-scoped admin setters; update rate-limit/low-watermark logic per token; extend events/errors; integrateEtherFiRestaker
/Lido; modify redeem/permit functions to includeoutputToken
.src/LiquidityPool.sol
: AddburnEEthSharesForNonETHWithdrawal(_amountSharesToBurn, _withdrawalValueInETH)
and event; adjust accounting for non-ETH withdrawals.src/EtherFiRestaker.sol
: AddetherFiRedemptionManager
ref andtransferStETH(recipient, amount)
(restricted to RedemptionManager).src/EtherFiRedemptionManagerTemp.sol
: Temporary impl to clear storage slots during upgrade.src/interfaces/ILiquidityPool.sol
: Expose newburnEEthSharesForNonETHWithdrawal
.script/stETH-withdrawals/{deploy,transactions,verify}.s.sol
andscript/utils/utils.sol
for CREATE2 deploy, upgrade/rollback scheduling, and verification.script/ContractCodeChecker.sol
byte-compare order.EtherFiRedemptionManager
,EtherFiRedemptionManagerTemp
,EtherFiRestaker
; updatedLiquidityPool
salt/address.Written by Cursor Bugbot for commit 4645215. This will update automatically on new commits. Configure here.