Platform: Code4rena
Start Date: 05/09/2023
Pot Size: $50,000 USDC
Total HM: 2
Participants: 16
Period: 6 days
Judge: GalloDaSballo
Total Solo HM: 2
Id: 284
League: ETH
Rank: 15/16
Findings: 1
Award: $40.13
๐ Selected for report: 0
๐ Solo Findings: 0
40.1294 USDC - $40.13
On the DelegateRegistry
, anyone can call one of these function: delegateAll
, delegateContract
, delegateERC721
, delegateERC20
and delegateERC1155
.
The functions with a good parameters do many things and one of them it's adding a hash in the mapping pointing on a to
value, everyone can add different hash on these mapping.
And because the two functions getIncomingDelegations
and getIncomingDelegationHashes
use for loop based on this mapping (which can have a very high length), this can lead to an out of gas on
these two functions executions and cause a DoS.
getIncomingDelegations for loop getIncomingDelegationHashes for loop
You can add a mechanism/function to limit the number of hashes that can be written to the mapping for a to
parameters.
The following function below are payable
but the function aren not designed to use ETH and if a user makes a mistake, these ETH are now stuck in the contract.
There should be a require(0 == msg.value) to ensure no Ether is being sent to the contract which using payable function.
multicall delegateAll delegateContract delegateERC721 delegateERC20 delegateERC1155
There should be a require(0 == msg.value) to ensure no Ether is being sent to the contract which using payable function.
Or simply remove the payable
on these functions.
Bad documentation on CreateOfferer
for the notice parameter, the documentation is for ratifyOrder
function and not for generateOrder
.
-- * @notice Implementation of seaport contract offerer generateOrder ++ * @notice Implementation of seaport contract offerer ratifyOrder
#0 - 0xfoobar
2023-09-18T17:57:33Z
Suggestion 3 is helpful
#1 - GalloDaSballo
2023-10-02T08:40:45Z
[01] For loop on a storage mapping can lead to a DoS OOS
[02] Payable functions when the contract doesnโt receive ETH L
[03] Bad documentation on the notice NatSpec R
From Dups L+3
2L 1R + 3
#2 - c4-judge
2023-10-02T09:15:50Z
GalloDaSballo marked the issue as grade-b