Hunt prep
Before you test Canto v2 contest
What 14 disclosed reports say about Canto v2 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 |
|---|---|---|---|---|---|
| Access control lesson | 3 | 0 | – | – | $0 |
| Business logic lesson | 3 | 0 | – | – | $0 |
| DoS lesson | 3 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 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.
-
getBorrowRate returns rate per year instead of per block
The getBorrowRate function should return the per-block rate (baseRatePerBlock) instead of the per-year rate.
Disclosed
-
Oracle periodSize is very low allowing the TWAP price to be easily manipulated
The periodSize should be increased to a value greater than zero, with 1800 being a typical standard.
Disclosed
-
Deny of service in CNote.doTransferOut
The check should use balance differences instead of requiring the balance to be zero.
Disclosed
-
Multiple initialization in NoteInterest
The initialize function should be modified to require that it has not already been initialized.
Disclosed
-
Non view function is called with staticcall in CErc20Delegator
The fix is to use delegateToImplementation instead of delegateToViewImplementation, or to implement separate view functions for querying the rates.
Disclosed
-
AccountantDelegate: The sweepInterest function sweeps an incorrect number of cnote
The transfer, revert, and redeem calls should use cNoteToSweep instead of amtToSweep.
Disclosed
-
Admin Can Break All Functionality Through Weth Address
The WETH address should be set through an initializer or changed only through governance.
Disclosed
-
Total supply can be incorrect in ERC20
The issue was mitigated in the in-scope version by updating the deployer's balance along with the total supply, and the judge recommended using `_mint` to also emit an event.
Disclosed
-
A cap is needed on the amount of Note than can be borrowed
The governance should set a limit on how much Note can be borrowed, for example an hourly borrowing limit, possibly by allowing mint and burn from the accountant.
Disclosed
-
Underlying asset price oracle for CToken in BaseV1-periphery is inaccurate
The price should be returned as 10 ** 18 instead of 1.
Disclosed
-
The LP pair underlying price quote could be manipulated
The LP token price should be calculated using a different approach, such as the one linked in the report, rather than from pool TVL.
Disclosed
-
Missing zero address check can cause initialize to be called more than once
The require statement should also check that the parameters are not zero addresses, or use OpenZeppelin's initializable.
Disclosed
-
Deny of service in AccountantDelegate.sweepInterest
The fix should check that the treasury's balance is the same before and after the transfer, rather than requiring it to be zero.
Disclosed