Architecture
Last updated
Last updated
This section describes provides a high-level overview regarding the technical implementation of Mirror Protocol.
The source code for Mirror smart contracts can be found on . Mirror Protocol is deployed with one of each of the following contracts, organized through the Factory.
Gathers protocol fees incurred from CDP withdrawals and liquidations and send to Gov
Central directory that organizes the various component contracts of Mirror
Allows other Mirror contracts to be controlled by decentralized governance
Distributes MIR received from Collector to MIR stakers and voters
Handles both long and short CDP creation, management, and liquidation
Responsible for locking up UST from short CDP
Provides an interface for registering new oracle provider and fetching asset prices with highest priority
Feeds price and collateral multiplier
for each collateral asset type
Distributes MIR rewards from block reward to LP and sLP stakers
Registers and executes swap orders at submitted limit price and amount
The Mirror Token (MIR) is a Terraswap CW20 Token instance that is created during the initial bootstrapping of the protocol and is registered with the Mirror Protocol core contracts.
When new mAssets are whitelisted, Mirror Protocol will create the following contract instances:
Terraswap CW20 Token for the new mAsset
Terraswap Pair for the new mAsset against UST
Terraswap CW20 Token for the new mAsset's LP Token
Terraswap CW20 Token for the new mAsset's sLP Token
Manages the fund
Contract owned by which enables contract migrations and admin actions through Mirror governance consensus.