Skip to content

Latest commit

 

History

History
70 lines (61 loc) · 2.74 KB

architecture.md

File metadata and controls

70 lines (61 loc) · 2.74 KB

Architecture

This section describes provides a high-level overview regarding the technical implementation of Mirror Protocol.

{% hint style="warning" %} Even with a thorough understanding of Mirror Protocol, it is highly recommended to interact with Mirror through client channels such as the Mirror Web App or Mirror.js. {% endhint %}

Smart Contracts

The source code for Mirror smart contracts can be found on GitHub. Mirror Protocol is deployed with one of each of the following contracts, organized through the Factory.

Contract Function
Collector Gathers protocol fees incurred from CDP withdrawals and liquidations and sends to Gov
Community Manages the Community Pool fund
Factory Central directory that organizes the various component contracts of Mirror
Gov

Allows other Mirror contracts to be controlled by decentralized governance

Distributes MIR received from Collector to MIR stakers

Mint Handles CDP creation, management and liquidation
Oracle Provides interface for oracle feeders to post prices for mAssets
Staking Distributes MIR rewards from block reward to LP stakers

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