Hunt prep
Before you test Wild Credit contest
What 12 disclosed reports say about Wild Credit 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 | 10 | 0 | – | – | $0 |
| Smart contracts 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.
-
Use of tokenB’s price instead of tokenA in determining account health will lead to protocol mis-accounting and insolvency
The last argument of `_convertTokenValues()` should be changed from `_priceB` to `_priceA` on line 674.
Disclosed
-
LendingPair.withdrawUniPosition should accrue debt first
The function should accrue the debt for both tokens before the health check.
Disclosed
-
Use of deprecated Chainlink API
The contract should be updated to use the current Chainlink interface functions, such as latestRoundData, instead of the deprecated latestAnswer.
Disclosed
-
Liquidation can be escaped by depositing a Uni v3 position with 0 liquidity
The code should check that liquidity is greater than zero before calling removeLiquidity.
Disclosed
-
Supply part of the accrued debt can be stolen
The debt for both tokens should be accrued first in `LendingPair.uniClaimDeposit`, and collecting parked liquidity should be disallowed by immediately collecting tokens when the NFT is deposited.
Disclosed
-
LendingPair.liquidateAccount does not accrue and update cumulativeInterestRate
The function should call accrueAccount instead of _accrueAccountInterest to update the cumulative interest rate before liquidation.
Disclosed
-
Reward computation is wrong
The fix is to update total LP supply and total debt by the total new interest when accrue is called, and to perform lending/borrow accrual before reward distribution.
Disclosed
-
Chainlink - Use latestRoundData instead of latestAnswer to run more validations
The contract should use latestRoundData and add checks for rawPrice > 0, updateTime != 0, and answeredInRound >= roundId.
Disclosed
-
Total LP supply & total debt accrual is wrong
The total debt and total supply should be increased by the total new interest on each accrual, similar to Compound or Aave, which may require a refactor of the LP token model.
Disclosed
-
LendingPair.liquidateAccount fails if tokens are lent out
The liquidation should mint LP supply tokens to the liquidator instead of transferring underlying tokens.
Disclosed
-
safeTransferFrom in TransferHelper is not safeTransferFrom
The TransferHelper should use OpenZeppelin's SafeERC20 library (and any other contract that uses IERC20) to handle non-standard tokens correctly.
Disclosed