Platform: Code4rena
Start Date: 05/10/2023
End Date: 11/10/2023
Period: 6 days
Status: Completed
Pot Size: $33,050 USDC
Participants: 54
Reporter: thebrittfactor
Judge: hansfriese
Id: 294
League: ETH
Dravee | 1/54 | $2,362.30 | 2 | 0 | 0 | 1 | 0 | Grade A | 0 | 0 |
thekmj | 2/54 | $1,846.79 | 2 | 0 | 0 | 1 | 0 | Grade A | 0 | 0 |
J4X | 3/54 | $1,840.73 | 3 | 0 | 0 | 1 | 0 | Grade A | 0 | Grade B |
peakbolt | 4/54 | $1,779.62 | 2 | 0 | 0 | 1 | 0 | Grade B | 0 | 0 |
Shogoki | 5/54 | $1,774.19 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
xAriextz | 6/54 | $1,774.19 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
squeaky_cactus | 7/54 | $1,774.19 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
nirlin | 8/54 | $1,774.19 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
jnforja | 9/54 | $1,774.19 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
radev_sw | 10/54 | $141.52 | 2 | 0 | 0 | 0 | 0 | Grade A | 0 | Grade A |
Auditor per page
Automated findings output for the audit can be found here within 24 hours of audit opening.
Note for C4 wardens: Anything included in the automated findings output is considered a publicly known issue and is ineligible for awards.
[ ⭐️ SPONSORS: Are there any known issues or risks deemed acceptable that shouldn't lead to a valid finding? If so, list them here. ]
ENS is a decentralised naming service built on top of Ethereum, and designed to resolve a wide array of resources including blockchain addresses, decentralised content, and user profile information.
Developer documentation can be found here.
Information on existing ENS deployments can be found here.
Contract | SLOC | Purpose | Libraries used |
---|---|---|---|
contracts/ERC20MultiDelegate.sol | 216 | ERC20Votes compatible multi-delegation contract to manage user votings | @openzeppelin/* |
All files not listed above
The contract implements a multi-delegation mechanism for ERC20 tokens that support the ERC20Votes extension. This allows users to delegate their voting power to multiple addresses in a single transaction.
The contract relies on OpenZeppelin's libraries for standard ERC20 and ERC1155 functionalities. It utilizes Solidity's native features for creating proxy contracts, thereby enabling unique delegation capabilities for each user-delegate pair.
The contract does not use any custom cryptographic algorithms, but it employs the ERC20Votes and ERC1155 standards to manage delegation and token metadata, respectively.
- If you have a public code repo, please share it here: https://github.com/ensdomains/governance How many contracts are in scope?: 1 Total SLoC for these contracts?: 216 How many external imports are there?: 5 How many separate interfaces and struct definitions are there for the contracts within scope?: 0 Does most of your code generally use composition or inheritance?: Inheritance How many external calls?: Multiple, primarily for ERC20 and ERC1155 functions Overall line coverage percentage provided by your tests?: Stmts: 100%, Branch: 91.67%, Funcs: 100%, Lines 100% Is this an upgrade of an existing system?: No Check all that apply (e.g., timelock, NFT, AMM, ERC20, rollups, etc.): ERC20, ERC1155 Is there a need to understand a separate part of the codebase/get context in order to audit this part of the protocol?: No Describe required context: N/A Does it use an oracle?: No Describe any novel or unique curve logic or mathematical models your code uses: N/A Is this either a fork of or an alternate implementation of another project?: No Does it use a side-chain?: No Describe any specific areas you would like addressed: Multi-delegation logic, proxy delegators
# install npm packages (if you haven't already) yarn # run in first terminal npx hardhat node # run in another terminal yarn test test/delegatemulti.js # for coverage yarn coverage