Hunt prep
Before you test Cooler Update
What 17 disclosed reports say about Cooler Update: 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 | 11 | 0 | – | – | $0 |
| Access control lesson | 2 | 0 | – | – | $0 |
| Smart contracts lesson | 2 | 0 | – | – | $0 |
| Race condition lesson | 1 | 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.
-
Can steal gOhm by calling Clearinghouse.claimDefaulted on loans not made by Clearinghouse
The fix was to check that the Clearinghouse is the originator of all loans passed to claimDefaulted, and the fix was confirmed.
Disclosed
-
Clearinghouse.sol#claimDefaulted()
The recommendation was to store the OHM address and approve the needed tokens to the minter before calling the burn; the discussion shows a fix pull request was approved.
Disclosed
-
gOhm stuck forever if call claimDefaulted on Cooler directly
A permissionless burn function was added to handle stuck gOhm.
Disclosed
-
Lender can front-run `rollLoan` and call `provideNewTermsForRoll` with unfavorable terms
The `rollLoan` function should allow the borrower to specify a maximum acceptable interest rate, so that any change to worse terms would cause the transaction to revert.
Disclosed
-
`emergency_shutdown` role is not enough for emergency shutdown
The logic was fixed by separating the defunding logic so the shutdown function can call it without passing through the overseer role check.
Disclosed
-
isCoolerCallback can be bypassed
The contract should only allow callbacks from a protocol-trusted address and should disable loan ownership transfer when the callback flag is set.
Disclosed
-
At claimDefaulted, the lender may not receive the token because the Unclaimed token is not processed
The fix should process unclaimed tokens (e.g., by calling claimRepaid) before deleting the loan data; the text indicates a fix was approved.
Disclosed
-
Dust amounts can cause payments to fail, leading to default
The repayment function should only collect and subtract the minimum of the current loan balance and the amount specified in the repaid variable.
Disclosed
-
Loan is rollable by default
The rollable flag should be set to false by default, or an extra parameter should determine its initial value.
Disclosed
-
DAI/gOHM exchange rate may be stale
The contract should use a Chainlink oracle to determine the maximum loan-to-collateral ratio for each loan, rather than relying on a hard-coded constant.
Disclosed
-
Use safeTransfer/safeTransferFrom consistently instead of transfer/transferFrom
The recommendation is to use safeTransfer/safeTransferFrom consistently.
Disclosed
-
Fully repaying a loan will result in debt payment being lost
The debt and collateral transfers should be performed before deleting the loan storage.
Disclosed
-
`Cooler.roll()` wouldn't work as expected when `newCollateral = 0`
The roll function should revert when newCollateral is zero.
Disclosed
-
Loans can be rolled an unlimited number of times
The code should be fixed by adding a variable to control the number of allowed rolls or by restricting rolls to occur only within one duration of the current expiry.
Disclosed
-
Repaying loans with small amounts of debt tokens can lead to underflowing in the `roll` function
The report recommends preventing repayment when the amount of collateral returned is zero.
Disclosed