Core Contracts

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

Lack of slippage & deadline protection in borrow() and withdrawNFT()

Description & Impact

Functions like withdrawNFT() and borrow() call getUserCollateralValue() --> getNFTPrice() which fetches the price from oracle via priceOracle.getLatestPrice(). This can result in situations like:

  1. User deposits NFT as collateral at some price

  2. Calls borrow() hoping to have health factor of 75% which is below liquidation ratio of 80%

  3. Tx remains in the mempool for some time during which NFT price dips

  4. Tx finally goes through but borrow amount is dangerously close to 80%, for e.g. 79.99%

  5. Immediately in the next block, it touches 80% and becomes eligible for liquidation.

Similarly, while withdrawing NFT, the tx may get delayed in execution and user can receive a bad price.

Mitigation

Allow user to specify either the minCollateralRatio or minNFTPriceAtBorrow inside borrow(). Similarly allow passing minNFTPrice inside withdrawNFT(). Additionally, allow the user to set a deadline.

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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