-
Notifications
You must be signed in to change notification settings - Fork 39
an adapter contract to support withdrawal from weETH #287
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?
Conversation
63ee206
to
5bb5607
Compare
|
||
// Call the regular requestWithdraw function | ||
return requestWithdraw(weETHAmount, recipient); | ||
} |
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: Mismatch Between Permit Value and Transfer Amount
In requestWithdrawWithPermit
, the weETH.permit
call approves permit.value
tokens, but the subsequent safeTransferFrom
in requestWithdraw
attempts to transfer weETHAmount
. If permit.value
is less than weETHAmount
, the transfer will revert due to insufficient allowance. If permit.value
is greater, the user approves more tokens than necessary.
string memory hour = pad(vm.toString((ts % 86400) / 3600)); | ||
string memory minute = pad(vm.toString((ts % 3600) / 60)); | ||
string memory second = pad(vm.toString(ts % 60)); | ||
return string.concat(year, "-", month, "-", day, "-", hour, "-", minute, "-", second); |
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: Timestamp Calculation Errors in Deployment Logs
The getTimestampString
function calculates deployment log timestamps. It incorrectly assumes fixed durations for months (30 days) and years (365 days, ignoring leap years), leading to mathematically inaccurate month and day values in the generated filenames.
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/25345e33-4c0b-445d-9de3-7c6a3f866296 |
Note
Introduce a UUPS-upgradeable WeETHWithdrawAdapter enabling withdrawals via weETH (with permit), plus Create2-based deployment and logged artifacts for implementation and proxy.
src/helpers/WeETHWithdrawAdapter.sol
: New UUPS-upgradeable adapter to request withdrawals usingweETH
.weETH
→eETH
, approvesLiquidityPool
, and callsrequestWithdraw
.requestWithdrawWithPermit
, role-gated pause/unpause, upgrade auth viaRoleRegistry
, and basic getters.src/interfaces/IWeETHWithdrawAdapter.sol
: New interface incl.PermitInput
,requestWithdraw
,requestWithdrawWithPermit
, andgetEETHByWeETH
.script/DeployWeETHWithdrawAdapter.s.sol
: Create2 deterministic deployment of implementation andUUPSProxy
, initializes owner to timelock, verifies and saves logs.WeETHWithdrawAdapter
andWeETHWithdrawAdapter_Proxy
with factory, salt, constructor args, and deployed addresses.Written by Cursor Bugbot for commit f9f7b15. This will update automatically on new commits. Configure here.