# Liquidation

## Independent Risk Management Between Trading Pairs&#x20;

To support an open margin trading market, we have established isolated pools with targeted risk parameters, tailored to the unique volatility of each asset. Each trading pair is assigned a specific collateral ratio, determined by its inherent volatility and the blockchain's block time and processing capacity.

## Risk Assessment with AMM Prices&#x20;

Real-time pricing provided by the on-chain Automated Market Maker (AMM) model is utilized as a benchmark for risk assessment and liquidation. This approach is crucial in accelerating the development of the leveraged trading market in a decentralized environment, especially when compared to the delay in waiting for Chainlink oracles to generate or update market data. The instant price data provided by DEXs, maintained on-chain and secured by both technical and economic measures, has become the standard oracle for various DeFi applications, such as margin trading.

## Operational Restrictions&#x20;

To prevent flash loan attacks, multiple restrictions have been implemented in the protocol's design:

* Conducting open, close, or liquidation operations within the same transaction is prohibited.&#x20;
* During the liquidation process, [Oracle](https://docs.udex.one/feature/oracle) ensure the validity of the liquidation price to prevent attackers from manipulating prices to trigger liquidations for profit or to cause cascading liquidation events.
