Hunt prep
Before you test Ajna #2
What 51 disclosed reports say about Ajna #2: 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 | 46 | 0 | – | – | $0 |
| Access control lesson | 2 | 0 | – | – | $0 |
| DoS 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.
-
Function `_indexOf` will cause a settlement to revert if `auctionPrice > MAX_PRICE`
The affected line in _settleAuction should be changed to handle auctionPrice above MAX_PRICE by setting bucketIndex to 1 instead of calling _indexOf.
Disclosed
-
Reserves can be stolen by settling artificially created bad debt from them
The protocol should introduce a buffer representing the expected kicker reward in addition to LUP, so that part of the loan remains in the pool.
Disclosed
-
Wrong auctionPrice used in calculating BPF to determine bond reward (or penalty)
The BPF should be calculated using the bucket price instead of the auction price when depositTake is true.
Disclosed
-
First pool borrower pays extra interest
The code should be fixed to also reset the inflator when the pool had no debt before execution, by caching the debt at the start and checking it in the update logic.
Disclosed
-
HPB may be incorrectly bankrupt due to use of unscaled value in `_forgiveBadDebt`
The code should scale `depositRemaining` before performing the bankruptcy check.
Disclosed
-
Incorrect implementation of `BPF` leads to kicker losing rewards in a `take` action
The _bpf function should be changed to set the sign to 1e18 when the neutral price equals the auction price, matching the specification.
Disclosed
-
Debt write off can be prohibited by HPB depositor by continuously allocating settlement blocking dust deposits in the higher buckets
The project added checks to prevent adding or moving quote tokens to buckets priced above the current auction price, and to block such actions when an auction is clearable.
Disclosed
-
Limit index isn't checked in repayDebt, so user control is void
The team agreed to change the behaviour and a pull request was opened so the limit index takes effect in all cases; a reviewer then noted the check should only run when a repay or pull actually happens, and the team replied that the no-op case already reverts earlier.
Disclosed
-
Lenders lose interests and pay deposit fees due to no slippage control
The fix adds a slippage protection flag to addQuoteToken and moveQuoteToken, allowing lenders to revert if the deposit would be below the LUP.
Disclosed
-
Due to excessive HTP check moveQuoteToken can be unavailable for big deposits
The fix recalculates the LUP after adding the moved amount to the destination bucket, so the check uses the final LUP.
Disclosed
-
Settlement can be called when auction period isn't concluded, allowing HPB depositors to game bad debt settlements
The comparison in settlePoolDebt should be changed to less-than-or-equal to include the last moment in the auction period, and this was fixed.
Disclosed
-
LenderActions's moveQuoteToken can create a total debt undercoverage
The fix was to add a check in moveQuoteToken that reverts if pool debt is non-zero and exceeds total deposits, similar to the existing check in removeQuoteToken.
Disclosed
-
moveQuoteToken updates pool state using intermediary LUP, biasing pool's interest rate calculations
The LUP should be calculated after the deposit is added to the destination bucket, using the initial LUP only for the deposit fee, and the fix was confirmed to use the final LUP.
Disclosed
-
kickWithDeposit removes the deposit without HTP pool state check
The issue was fixed by changing lenderKick() to no longer remove deposit and instead obtain bond funds directly from the sender, making the HTP check unnecessary.
Disclosed
-
Wrong Inflator used in calculating HTP to determine accrualIndex in accrueInterest
The HTP should be calculated using the old inflator to correctly include all deserving deposits in the interestEarningDeposit calculation.
Disclosed