In ERC721 pools with fractional collateral, settling an auction when the auction price exceeds MAX_PRICE causes a revert because the bucket index lookup rejects prices above MAX_PRICE. This temporarily prevents settlement until the auction price drops below MAX_PRICE, potentially disadvantaging the borrower.
The first borrower from a pool pays extra interest because the interest accumulator (inflator) is not updated when the pool has no debt before the borrow. An attacker could create a pool long before announcing it, causing the initial borrower to lose a significant amount to interest.
The protocol's collateral withdrawal check relies solely on the LUP (lowest utilized price), which can be artificially inflated by adding quote tokens to a high-priced bucket. An attacker controlling both lender and borrower accounts can withdraw most collateral, then kick the loan and settle the resulting bad debt from pool reserves, stealing those reserves.
The bond payment factor calculation in the Ajna protocol's take function incorrectly sets the sign to zero when the threshold price is greater than or equal to the neutral price and the auction price equals the neutral price, resulting in a bond payment factor of zero instead of the bond factor. This causes the kicker to lose rewards and the borrower to face higher penalties.
The bond payment factor (BPF) for a deposit take was calculated using the auction price instead of the bucket price, contrary to the whitepaper. This caused the taker to receive more bond reward than intended.
The bankruptcy check in `_forgiveBadDebt` uses an unscaled deposit value instead of a scaled one, so the exchange rate calculation is off by the bucket's scale factor. This can cause a bucket to be incorrectly marked bankrupt, wiping out user LP tokens and losing their funds.
The kickWithDeposit function used an incorrectly calculated LUP (last utilized price) for its check, allowing a kicker to use a deposit below the LUP to kick a loan. An attacker could deposit below the LUP and then kick loans that were not eligible for liquidation, causing griefing and potential losses to borrowers.
The repayDebt function accepts a limit index meant to protect the borrower against an unfavourable change in the pool's price, but the check enforcing that limit only ran when collateral was also being pulled. A borrower whose strategy depended on the resulting price move could therefore have a repayment execute at a worse level than they intended.
The moveQuoteToken function in Ajna's LenderActions contract does not check that total pool debt remains less than total deposits after moving quote tokens, and the unutilized deposit fee can reduce deposits, potentially causing debt to exceed deposits. This could break the pool's core logic and lead to material miscalculations, though the probability is low.
The kick() function calculates the LUP (lowest usable price) before adding the kicking penalty to the pool's debt, so the LUP used to update the pool state is outdated. This causes a systematic bias in the interest rate calculations of the pool.
A high-price bucket depositor can prevent their deposit from being used to settle bad debt by adding many tiny quote token deposits to higher price buckets, which makes the settlement loop process only dust amounts and become prohibitively expensive. This allows the depositor to avoid a loss while other depositors bear the bad debt.
The kickWithDeposit function removes deposit from the pool without checking that the new lowest utilized price (LUP) remains above the highest threshold price (HTP), breaking a core invariant. An attacker could cause the pool to enter a state where LUP < HTP, potentially freezing other deposit operations.
The addQuoteToken function lacks slippage protection, so a lender's deposit may be processed after the LUP has moved, causing them to be charged a deposit fee and earn no interest. An attacker could front-run to manipulate the LUP and force the victim to pay fees.
The accrueInterest function calculates the HTP using the new inflator (which includes newly accrued interest) while the LUP uses the old inflator, causing the accrual index to be set incorrectly. This leads to an underestimation of interestEarningDeposit and incorrect lenderFactor values.
The kickWithDeposit function in the Ajna protocol's Pool contract lacked the _revertIfAuctionDebtLocked check that prevents removal of quote token deposits locked by liquidation debt. An attacker could use kickWithDeposit to withdraw funds from high-priced buckets (HPBs) that should have been reserved for covering bad debt, potentially shifting losses to lower-bucket depositors.
The settlePoolDebt function allowed settlement at the exact end of the 72-hour auction period, while other operations were still blocked, enabling a depositor to atomically remove and re-add liquidity to settle bad debt with others' funds. This could let a depositor profit risk-free by gaming the settlement.
The moveQuoteToken function checks the loan book's HTP against the LUP after removing the deposit but before adding it to the destination bucket, so a move that would be safe overall can revert. This can make it impossible for depositors with large deposits to move funds between buckets, potentially causing losses.
The moveQuoteToken function calculated the pool's LUP (lup) after removing liquidity from the source bucket but before adding it to the destination bucket, so the pool's interest rate state was updated with an intermediate LUP that did not reflect the final pool state. This systematically biased the pool's target utilisation and interest rate calculations.
The moveQuoteToken() function lacks the bankruptcy check present in removeQuoteToken(), so a bucket can be left with zero collateral and zero quote tokens but non-zero LP tokens without being marked bankrupt. A future depositor would receive fewer LP tokens than expected because their deposit is diluted by the existing LP tokens.
The ERC721Pool's take function can proceed with a fractional collateral amount, causing the taker to pay debt for the full fractional amount but receive only the truncated integer part, leaving the remainder with the borrower. This results in a loss of funds for the taker.
The Ajna protocol's repayDebt and withdrawBonds functions always send funds to msg.sender, with no way to specify a different recipient. If a borrower or kicker is blacklisted by the collateral or quote token contract, their collateral or bond funds become permanently frozen in the pool.
In the quote token constraint branch of _calculateTakeFlowsAndBondChange, scaledQuoteTokenAmount is not updated to the collateral sell value (C * p), so the kicker's bond change is calculated from an incorrect value. This causes kickers to receive a reward proportional to (1 - BFP) * BFP instead of BFP, leading to a material loss when the borrower price is below the auction price.
The take functions in ERC20Pool and ERC721Pool allow anyone to specify a callee_ address that has approved quote token spending to the pool, causing that address to pay quote tokens and receive collateral. An attacker can force any user who approved quote tokens to take on collateral, potentially of low value, while paying the quote tokens.
The flash loan functions in Ajna pools do not verify that the borrowed tokens are returned after the callback, relying only on the token's safeTransfer to report success. An attacker could exploit a token that reports successful transfers but does not update internal balances to steal the entire pool's balance of that token.
The pool deployment contract uses inclusive comparison operators for the interest rate bounds, so pools with rates exactly at the documented minimum (1%) or maximum (10%) are rejected. This means only rates strictly between 2% and 9% can be used, contrary to the intended 1-10% range.
The protocol's minimum debt check only enforces the dust limit when there are fewer than 10 loans; with 10 or more loans it uses a lower average-based threshold. An attacker could create 10 accounts, each borrowing at the dust limit, so that the minimum debt becomes 10% of the dust limit, allowing further loans below the intended dust amount.
The rewards contract lets a user claim rewards for an epoch that has not happened yet, and doing so marks every epoch up to that point as already claimed. The user then cannot claim the real rewards for those intervening epochs, so those rewards are lost.
The ERC721Pool contract supports CryptoKitties and CryptoFighters NFTs, but these NFTs can be paused, blocking transfer and transferFrom. This prevents borrowers from repaying or liquidating, forcing them to pay compounding interest while paused.
The MOMP calculation in the Loans.update function incorrectly divides the borrower's accrued debt by the total number of loans, rather than the total pool debt. This results in a lower neutral price, causing kickers to lose their bonds more often than expected.
The Pool.transferLPs function can be called by any address to transfer LP tokens that have been approved for transfer, rather than only by the token owner or the approved address. This allows an attacker to move a lender's LP tokens to the approved address at an inappropriate time, disrupting the lender's position management strategy.
A2
Ajna #2
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.