Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: high
Valid

NFTs get stuck in StabilityPool contract after liquidation due to missing NFT transfer mechanism

Summary

The StabilityPool contract lacks functionality to handle NFTs after liquidation, causing NFTs to become permanently stuck in the contract. This is a critical issue as it results in the permanent loss of valuable NFT assets.

Vulnerability Details

The StabilityPool contract's liquidateBorrower function handles the debt repayment during liquidation but has no mechanism to transfer or manage the NFT afterward. This means any NFT transferred to the StabilityPool during liquidation becomes permanently locked in the contract.

// StabilityPool.sol
function liquidateBorrower(address userAddress) external onlyManagerOrOwner nonReentrant whenNotPaused {
_update();
// Get the user's debt
uint256 userDebt = lendingPool.getUserDebt(userAddress);
uint256 scaledUserDebt = WadRayMath.rayMul(userDebt, lendingPool.getNormalizedDebt());
if (userDebt == 0) revert InvalidAmount();
uint256 crvUSDBalance = crvUSDToken.balanceOf(address(this));
if (crvUSDBalance < scaledUserDebt) revert InsufficientBalance();
// Approve the LendingPool to transfer the debt amount
bool approveSuccess = crvUSDToken.approve(address(lendingPool), scaledUserDebt);
if (!approveSuccess) revert ApprovalFailed();
// Finalize liquidation - NFT gets transferred to StabilityPool but no mechanism to handle it
lendingPool.finalizeLiquidation(userAddress);
emit BorrowerLiquidated(userAddress, scaledUserDebt);
}

While there is an NFTLiquidator contract in the system, there is no integration between it and the StabilityPool to handle NFT transfers after liquidation.

Impact

  • NFTs become permanently locked in the StabilityPool contract

  • No recovery mechanism exists

  • Results in permanent loss of valuable assets

Tools Used

Manual review

Recommendations

Implement a logic to withdraw the liquidated NFTs from the Stability pool

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Liquidated RAACNFTs are sent to the StabilityPool by LendingPool::finalizeLiquidation where they get stuck

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.