🏗How it works
Last updated
Last updated
The Atomica Liquidation Markets platform components: A. Atomica Liquidation Markets. These are pool and token contracts - the core elements of the system. The Pool accumulates DAI liquidity. B. Keeper Adapter. A core element of the system that participates in collateral liquidation auctions. Brings yield to Atomica Liquidation Markets when an auction is won. C. Risk Oracle. A core element of the system that monitors vaults to check their status and the presence of auctions on them. This element is also responsible for starting auctions for vaults at risk if no one started them before, calling Keeper Adapter to make bids in auctions, and checking exchange price for an auction lot amount. Furthemore, Risk Oracle provides lot selling distribution proportions between exchanges in case of a gain. Finally, Risk Oracle processes the queue of withdrawal requests of Liquidity Providers willing to exit from Atomica Liquidation Markets.
External parties include: A. Liquidity Provider. A core enabler of all the systems at work that brings DAI liquidity to Atomica Liquidation Markets and provides Keeper Adapter with the source to use for collateral liquidation auctions. B. Maker Collateral Liquidation System. A core external part that acts as a basis for all the activities of the Atomica Liquidation Markets platform. Provides collateral liquidation auctions. C. An Exchange (or a group of exchanges) where Keeper Adapter can exchange won collateral liquidity for DAI.
To start participating in auctions, it is necessary to rescue a sufficient amount of DAI liquidity. So, with the liquidity-first principle, the process starts when a Liquidity Provider brings DAI to Atomica Liquidation Markets (1) and receives pool tokens in exchange (2).
Then, Risk Oracle monitors Maker flip auctions (or starts them itself) (3) and calls Keeper Adapter to make a bid in an auction (4).
Keeper Adapter asks for the necessary DAI amount to make bids from the pool (5), receives requested amount within its allowance (6), and places DAI liquidity to make further bids to Maker's JOIN_DAI
contract (7). Then, it calculates the necessary amount of DAI and bids with it (8).
When the auction is over, Keeper Adapter takes the won lot (collateral) amount (if wins), or just withdraws the previously placed DAI (if loses) (9).
On getting the lot amount, Keeper Adapter sells it then at an exchange (10) and receives DAI for it (11). In both cases (won and lost), Keeper Adapter refunds the previously taken DAI liquidity back to the pool (12), possibly with some profit.
Delayed withdrawal
Risk Oracle processes a withdrawal queue (13) if during auctions Keeper Adapter was participating in, some Liquidity Providers desired to withdraw DAI liquidity from the pool, and there was not enough liquidity to execute their withdrawal requests. When a sufficient amount of DAI liquidity is back to the pool, all delayed requests will be processed automatically.
When withdrawing DAI from the pool, a Liquidity Provider sells tokens back to the pool (14) and receives DAI liquidity to his/ her account (15).