Platform: Code4rena
Start Date: 04/03/2024
Pot Size: $36,500 USDC
Total HM: 9
Participants: 80
Period: 7 days
Judge: hansfriese
Total Solo HM: 2
Id: 332
League: ETH
Rank: 11/80
Findings: 1
Award: $616.93
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: carrotsmuggler
616.9286 USDC - $616.93
The depositWithPermit
function will revert transactions for tokens like stETH that lack EIP-2612 permit functionality, limiting its current usability.
User attempts to call depositWithPermit
with stETH, providing necessary parameters including signature components (v, r, s) and _deadline.
The function attempts to execute IERC20Permit(address(_asset)).permit(...), expecting the asset to have a permit function as per EIP-2612. stETH does not implement permit, so this call will not find the appropriate function to execute. stETH fallback function is triggered due to the absence of the permit function.
stETH's fallback function is not designed to handle this type of call, resulting in a transaction revert.
Harvest finance gives a yield on stETH
Manual Review
Consider implementing a wrapper or adapter for stETH to provide permit functionality, or use wrapped stETH (wstETH) that already has it.
Error
#0 - c4-pre-sort
2024-03-12T01:05:57Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2024-03-12T01:06:03Z
raymondfam marked the issue as duplicate of #17
#2 - c4-pre-sort
2024-03-13T05:14:41Z
raymondfam marked the issue as duplicate of #51
#3 - c4-judge
2024-03-15T08:12:01Z
hansfriese marked the issue as satisfactory