Return to site
Return to site

Bug Deep Dive #28

The collateral that liquidators receive is valued below their initial expectations as a result of the price fall - $33790

· Bug Deep Dive
Section image

Due to insufficient safeguards against price drops, liquidators receive less collateral than expected from the vault and pool, resulting in financial losses.

Suppose:

  • F-asset = FXRP
  • 1 XRP = 1 USD
  • Vault’s collateral is USDC
  • 1 NAT = 1 USD
  • Liquidation factor = 1.05

Based on the above assumptions, the liquidator is expected to receive 10,000 USDC and 500 NAT for one lot.

  1. An agent is established, after which the necessary collateral is deposited into the agent’s vault and collateral pool. The agent is then made publicly accessible.
  2. A minter reserves the required collateral and initiates the corresponding payment transaction.
  3. The function MintingFacet::executeMinting is invoked, resulting in the minter receiving fassets.
  4. The agent executes a decrease transaction on the underlying network without prior notification.
  5. An illegal payment is detected, and the challenger submits proof of the illegal payment. As a result, the agent’s status changes to FULL_LIQUIDATION.
  6. The liquidator submits the transaction to the network. However, if the price of XRP decreases to 0.90 USD at the time of execution, the liquidator receives 9,000 USDC and 450 NAT, which is less than anticipated.
Section image

Alpha: check if there is slippage protection when using price oracles, since they update their price every t amount of time, and this update can be significant and lead to unexpected results.

Conclusion

This finding would earn you $33790, requiring you to understand the liquidation process and the price oracle slippage attack vector.

Full Report
Codebase

Subscribe
Previous
Bug Deep Dive #27
Next
Bug Deep Dive #29
 Return to site
Cookie Use
We use cookies to improve browsing experience, security, and data collection. By accepting, you agree to the use of cookies for advertising and analytics. You can change your cookie settings at any time. Learn More
Accept all
Settings
Decline All
Cookie Settings
Necessary Cookies
These cookies enable core functionality such as security, network management, and accessibility. These cookies can’t be switched off.
Analytics Cookies
These cookies help us better understand how visitors interact with our website and help us discover errors.
Preferences Cookies
These cookies allow the website to remember choices you've made to provide enhanced functionality and personalization.
Save