code-423n4 / 2024-04-panoptic-findings

7 stars 3 forks source link

Use of delegatecall in a payable function inside a loop #527

Closed c4-bot-4 closed 4 months ago

c4-bot-4 commented 4 months ago

Lines of code

https://github.com/code-423n4/2024-04-panoptic/blob/833312ebd600665b577fbd9c03ffa0daf250ed24/contracts/multicall/Multicall.sol#L12

Vulnerability details

Impact

The Multicall contract uses the delegatecall proxy pattern (which takes user-provided call data) in a payable function within a loop. This means that each delegatecall within the for loop will retain the msg.value of the transaction

see : https://solodit.xyz/issues/use-of-delegatecall-in-a-payable-function-inside-a-loop-trailofbits-yield-v2-pdf

Tools Used

Manual Review

Recommended Mitigation Steps

Assessed type

call/delegatecall

c4-judge commented 4 months ago

Picodes marked the issue as unsatisfactory: Invalid