Platform: Code4rena
Start Date: 22/02/2022
End Date: 24/02/2022
Period: 3 days
Status: Completed
Pot Size: $30,000 USDC
Participants: 22
Reporter: liveactionllama
Judge: leastwood
Id: 93
League: ETH
Omik | 1/22 | $7,687.95 | 2 | 0 | 0 | 1 | 0 | 0 | - | 0 |
cmichel | 2/22 | $7,650.00 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
kirk-baird | 3/22 | $7,650.00 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
WatchPug | 4/22 | $913.72 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
CertoraInc | 5/22 | $824.80 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
hickuphh3 | 6/22 | $375.91 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
Dravee | 7/22 | $362.71 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
gzeon | 8/22 | $297.06 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
Rhynorater | 9/22 | $201.72 | 1 | 0 | 0 | 0 | 0 | - | 0 | 0 |
robee | 10/22 | $185.46 | 2 | 0 | 0 | 0 | 0 | - | - | 0 |
Auditor per page
This is a contest to evaluate the new TWAB Delegator contract for PoolTogether V4. This contract allows accounts to easily delegate their chance to win. This contract allows users to delegate a portion of their tickets to another user. For more details read the documentation.
The TWAB Delegator contract is the top-level contract: all interactions occur with this contract. It has two superclasses; the LowLevelDelegator contract and the PermitAndMulticall contract. The TWAB Delegator contract also acts as a contract factory for Delegation contracts. The Delegation contracts are deployed as a minimal proxy via CREATE2 and actually hold the PoolTogether V4 tickets.
Contract Name | Source Lines of Code | Libraries | External Calls |
---|---|---|---|
TWABDelegator.sol | ~300 sLoC | OpenZeppelin Contracts | PoolTogether V4 Ticket contract |
PermitAndMulticall.sol | ~40 sLoC | OpenZeppelin Contracts | PoolTogether V4 Ticket contract |
LowLevelDelegator.sol | ~35 sLoC | OpenZeppelin Contracts | None |
Delegation.sol | ~45 sLoC | None | PoolTogether V4 Ticket contract |
The TWABDelegator allows users to stake tickets on the contract, so it implements an ERC20 token. It inherits, without modification, the standard OZ ERC20 token implementation.
Note: The Ticket contract that the TWAB Delegator is bound to is expected to be a standard PoolTogether V4 ticket contract. This token does not implement fee-on-transfer behaviour, so we've decided to exclude any compatibility with fee-on-transfer tokens.
The PermitAndMulticall contract wraps the standard multicall()
function with a permitAndMulticall()
function. This function allows the caller to permit ticket spend and batch multiple actions in one transaction.
This contract uses the OZ Clone contract to instantiate minimal proxies instances of the Delegation contract. This allows the caller to transfer tickets to the Delegation contracts and delegate portions of their Tickets.
This is the contract that holds the tickets. It's like a very simple smart contract wallet.
Aside from the standard auditing concerns, such as loss of funds, we want:
Of course this list isn't comprehensive, so if you see anything else let us know!