Hunt prep
Before you test Swivel v3 contest
What 22 disclosed reports say about Swivel v3 contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 13 | 0 | – | – | $0 |
| Smart contracts lesson | 5 | 0 | – | – | $0 |
| Access control lesson | 4 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
VaultTracker miscalculates compounding interest
The interest calculation should use the sum of notional and redeemable as the base, and the project addressed it in a pull request.
Disclosed
-
Error in allowance logic
The comparison should be changed from greater-than-or-equal to less-than so the contract reverts only when the allowance is insufficient.
Disclosed
-
Yearn vault integration is broken
The integration was fixed by accessing the underlying token through the correct property, as addressed in a pull request.
Disclosed
-
Interface definition error
The Swivel contract should declare that it implements the interface and align the method name, and other contracts should also declare their interfaces to avoid such mismatches.
Disclosed
-
ZcToken.withdraw will send user 0 tokens if called after maturity deadline but before market is set mature
The issue was fixed by adding a getMaturityRate function that returns the market's maturityRate or, if zero, the current exchangeRate, and using it everywhere in ZcToken.
Disclosed
-
Mismatch in withdraw() between Yearn and other protocols can prevent Users from redeeming zcTokens and permanently lock funds
The withdraw function should calculate the price per share and use that to retrieve the correct number of underlying assets.
Disclosed
-
VaultTracker has the wrong admin
The VaultTracker constructor should be changed so the Creator contract can pass in the Marketplace's address to be used as admin.
Disclosed
-
unpaused(p) modifier missing in authRedeem function
The missing unpaused(p) modifier was added to the authRedeem function.
Disclosed
-
Should use >= instead of >
The comparison was changed to greater-than-or-equal and the issue was addressed in a pull request.
Disclosed
-
Missing event & timelock for critical onlyAdmin functions
Add events to all admin functions that change critical parameters and consider adding timelocks to such functions.
Disclosed
-
Swivel: implementation for initiateZcTokenFillingZcTokenExit is incorrect
The function should transfer a - premiumFilled to the maker and the fee separately to Swivel, as shown in the recommended mitigation.
Disclosed
-
transferNotionalFrom doesn’t check from != to
The function should be fixed by adding a check that the from and to addresses are not the same, for example with a require statement.
Disclosed
-
fee-on-transfer underlying can cause problems
The contract should measure the actual balance change before and after each transfer, similar to Compound's doTransferIn, and consider making the market pausable.
Disclosed
-
Admin is a single-point of failure without any mitigations
The admin should be a multisig and the contracts should include transfer and renounce functions, for example by using OpenZeppelin's Ownable library.
Disclosed
-
Previously created markets can be overwritten
Add a zero-address check for markets[u][m] in createMarket before writing to it.
Disclosed