Canceling an auction with 0 bids will only partially pay back the outstanding debt
Cancelling an auction with zero bids only partially repays the outstanding debt because the initiator fee is deducted from the reserve price, leaving unpaid liens. This prevents the borrower from releasing their collateralised NFT even after paying the reserve price, locking it forever.
Source: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/199
Found by
bin2chen, TurnipBoy, Jeiwan, 0xRajeev, 0x4141
Summary
Canceling an auction with 0 bids only partially pays back the outstanding debt without removing outstanding liens resulting in the collateralized NFT being locked forever.
Vulnerability Detail
Given this scenario of an auction with 0 bids and, for example, a reservePrice of 10 ETH and initiatorFee set to 10 (= 10%), with the following sequence executed:
- The auction gets canceled
- In
AuctionHouse.cancelAuction(),_handleIncomingPayment()accepts incoming transfer of 10 ETH reserve price - In
_handleIncomingPayment(), theinitiatorFeeof 10% is calculated, deducted from the 10 ETH to transfer 1 ETH to the initiator - The remaining 9 ETH is then used to pay back the outstanding liens (open debt)
However, the outstanding debt was initially 10 ETH (= reservePrice). After deducting the initiator fee, only 9 ETH remains. This means that the debt is not fully paid back. But the auction will successfully be cancelled but with outstanding debt remaining. There is also no explicit removal of liens (as there is in endAuction).
Impact
A borrower canceling an auction with the expected reserve price will leave behind existing unpaid liens that will make the releaseCheck modifier applied to releaseToAddress() prevent the borrower from releasing their NFT collateral successfully even after paying the reserve price during auction cancellation. The borrower's collateralized NFT is locked forever despite paying the outstanding lien amount during the auction cancellation.
Code Snippet
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L210-L224
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L253-L276
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L202
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/CollateralToken.sol#L135-L142
Tool used
Manual Review
Recommendation
The auction cancellation amount required should be reserve price + liquidation fee. On payment, remaining liens should be removed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cancellation logic deducts the initiator fee from the reserve price before repaying liens, and it does not explicitly remove the liens as endAuction does, so the debt remains partially unpaid.
Impact
The borrower's collateralised NFT is locked forever because the releaseCheck modifier prevents releaseToAddress from succeeding while unpaid liens remain, even after the borrower pays the reserve price during cancellation.
What the attacker needed
An auction with zero bids; borrower cancels the auction; borrower pays the reserve price
The fix
The cancellation amount should be the reserve price plus the liquidation fee, and remaining liens should be removed upon payment.
How it was found
- An auction with zero bids is cancelled.
- The cancelAuction function accepts an incoming transfer equal to the reserve price.
- A 10% initiator fee is calculated and deducted from that amount.
- The remaining amount is used to repay the outstanding liens, leaving a shortfall.
- The auction is cancelled but the liens are not removed.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a borrower cancels an auction that received no bids, they are supposed to pay back what they owe. But the code takes a fee out of that payment first, so the debt is not fully cleared. Because the system still thinks money is owed, the borrower can never get their NFT back, even though they paid the expected amount.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.