Mars Protocol Litepaper (Archived)
This litepaper describes the original vision for Mars v1, which is now deprecated. The new Mars Protocol v2 whitepaper was published on Sept. 25, 2022 and is publicly accessible here: https://github.com/mars-protocol/whitepaper.
- How it Works
- Controller — Dynamic Interest Rates using Control Theory
- Token Economics (MARS)
- Why Terra
- Trust-Minimised Agile Governance
- The Future
This article does not constitute investment advice. Before interacting with Mars, review the project disclaimers here.
This article is subject to change but is not guaranteed to be up to date. Last updated Feb. 1, 2022 with terminology changes, updating to reflect published frameworks and miscellaneous clarifications and improvements.
Mars is a credit protocol for the future: non-custodial, open-source, transparent, algorithmic and community-governed.
Like banks, Mars aims to attract deposits and lend out this money while managing illiquidity and insolvency risk. Unlike banks, Mars is a fully automated, on-chain credit facility governed by a decentralised community via a transparent governance process. All decisions are made by the Martian Council, composed of MARS stakers who put skin in the game to backstop certain kinds of protocol risk in exchange for a portion of the protocol borrowing fees.
2. How it Works
At the heart of Mars is a fully automated, on-chain credit facility built on the Terra blockchain. Like existing credit protocols, interest rates are priced algorithmically based on utilisation rate. Unlike existing credit protocols, Mars will utilise a dynamic interest rate model based on control theory, allowing for greater responsiveness and capital efficiency (more on this later). Note: Dynamic interest rate functionality will not be immediately available at launch.
To begin with, Mars will issue collateralised debt to users (collateral-to-borrower or “C2B” debt) as well as contract-to-contract debt (C2C) to whitelisted smart contracts. For the C2C portion, initial whitelisted smart contracts will be built by the Mars team and will involve simple leveraged yield-farming strategies. Eventually, though, the goal is for C2C lending to become a facility available to other protocols to build innovative leverage-based products on top of. These protocols are expected to need to go through a governance process (which includes a risk assessment) to be allowed to use this facility (a series of articles to be published in the coming weeks will get into this process more thoroughly).
The system is comprised of the following stakeholders:
- Lenders: Deposit assets into Mars liquidity pools, earning an interest rate
- Borrowers (collateralised): Borrow assets from Mars liquidity pools using their deposited assets as collateral. These borrowers must therefore also be depositors (lenders)
- Borrowers (contract-based): Smart contracts that borrow assets from Mars liquidity pools without posting collateral. Each smart contract credit line must be approved by governance and will include a credit limit to mitigate the protocol’s risk exposure
- Council: Stake MARS in order to earn protocol fees, participate in governance and backstop certain kinds of protocol risk
A. Collateralised Borrowing — C2B Lending
Similar to existing credit protocols, Mars will support non-custodial, over-collateralised borrowing. Users deposit assets into smart contract liquidity pools, receiving interest-bearing maTokens which (through the smart contract functionality) act as their shares of the liquidity pool. They can then choose to borrow using their deposits as collateral.
Lending thus serves two purposes: generating yield and, if the user chooses, acting as collateral to borrow against. Borrowers are liquidated when their loan-to-value (LTV) ratios fall below the required maintenance margin, which happens when their collateral decreases in value relative to their debt. The interest rates paid by borrowers and received by lenders are determined algorithmically, taking into account supply and demand by targeting an optimal utilisation rate (more on this in the Controller section below).
At launch, Mars is currently expected to support UST and LUNA for lending and borrowing. Since Mars is asset-agnostic — able to support any CW20 or native Terra asset — the community will then be able to propose further assets to be added. Each asset listing proposal must define the asset’s risk parameters (liquidation fee, max LTV, optimal utilisation rate, maintenance margin) and whether the asset can be used as collateral. The Mars Risk Framework provides an open-source framework for assessing the riskiness of assets and setting appropriate risk parameters.
B. Contract-to-Contract (C2C) Borrowing — Leveraged Yield-farming Strategies
Traditional credit protocols offer relatively low interest rates to users. This is because they offer only collateralised loans which are capital-inefficient (low LTVs) and target a small market since they rely on lenders who also want to borrow. Contract-to-contract (C2C) borrowing solves this by allowing Mars to tap into a completely new source of borrowing demand: non-depositor borrowers (i.e., third-party smart contract systems). This will generate higher borrow demand, utilisation rates and therefore higher yields for Mars lenders.
The first project that will be able to tap into this facility will be Mars itself. The C2C autonomous credit line will be used within Mars to offer users access to leveraged yield-farming strategies. These will allow users to do one-click farming with auto-compounding, and the option of adding UST leverage on top. Some credit protocols refer to this as “uncollateralised” lending instead of Mars’ preferred terminology: C2C lending. It’s important to realise that these strategies are only uncollateralised in the sense that the collateral doesn’t sit in the Mars smart contract system’s own liquidity pool. Despite this, the strategies themselves are collateralised (with tokens on deposit in the third-party smart contract system that Mars has “loaned” tokens to), and Mars simply needs to ‘trust’ the third-party smart contract and the associated liquidation logic in order to safely extend credit.
The following diagram shows, at a high level, how deposits work with the MIR-UST strategy, resulting in an effective 2x leverage ratio for the user:
This allows the user to farm with leverage with increased yield (in the form of MIR tokens issued as staking rewards), but there is a liquidation risk should the value of MIR drop. This process is shown step-by-step below.
Scenario 1: Value of LP asset remains constant or increases
Scenario 2: Value of LP asset decreases, resulting in liquidation
Alpha Finance-style leveraged yield farming as illustrated above will be the first application built, but we can also imagine levered Yearn Finance-style vault strategies. An example would be a bLUNA / ANC farming strategy.
(i) Collateralised Borrowing
When a borrower’s loan-to-value (LTV) ratio falls below the required maintenance margin, which happens when their collateral decreases in value relative to their debt, they are susceptible to being liquidated. Any address can repay a fraction of a borrower’s debt (max fraction determined by the close factor) in exchange for an equivalent amount of the borrower’s collateral plus a bonus. Liquidators can choose to receive either liquidity tokens (which will be transferred from the borrower to them) or receive the underlying assets (which causes the borrower’s liquidity tokens to be burned).
(ii) Contract-to-Contract (C2C) Borrowing
Smart contracts that wish to utilise C2C borrowing must have liquidation logic implemented that ensures their ability to repay regardless of market conditions. Developers are free to choose their preferred liquidation logic, but these must be approved by the Martian Council in order for C2C credit line to be extended.
As an example of how liquidation logic might work, we will explore the MIR-UST leveraged yield farming strategy. In this case, a user’s asset is in the form of staked MIR-UST LP tokens. If the value of these LP tokens falls below the liquidation threshold, defined as a percentage of the user’s debt, anyone can close the position. The assets are removed from the liquidity pool, and the UST portion immediately used to pay back the debt. An appropriate amount of MIR is sold for UST to cover any outstanding debt. Among the remaining assets, a portion is awarded to the liquidator, and the rest is refunded to the user.
3. Controller — Dynamic Interest Rates using Control Theory
A. The Interest Rate Pricing Problem
With traditional credit protocols such as Compound, the interest rate charged on borrowing a specific asset (token) is set in a two-step process. First, a certain utilisation rate (amount borrowed / amount deposited) is targeted, which reflects the riskiness of that asset. Then, a curve is hard-coded that aims to discourage utilisation past the optimal level by a sharply increasing slope (which represents a sharply increasing interest rate).
The problem with this model is that the curve is fixed and cannot react to external market conditions. For instance, if there’s a particularly good stablecoin farm one week paying ~500% APR, then even at the ~90% interest rate corresponding to 100% utilisation on most credit protocols, borrowers will be unwilling to pay back their debts and depositors will be unwilling to supply more assets to the pool. Similarly, if external yields are extremely low, then the interest rate charged may be too high and result in sub-optimal utilisation.
This was extremely apparent during the first launch of Alpha Homora V2. Yields on the Alpha Homora PERP/USDC pool were ~500%, whereas USDC depositors on CREAM, who were lending to Alpha farmers, were only receiving ~50% yields. As a result, there wasn’t enough liquidity to enable farming on Alpha.
In traditional models, the only way to address this is by changing the credit protocol’s interest rate model via a governance vote. This is slow, difficult to implement and requires an extremely active governance process that can constantly react to market conditions.
B. The Mars Solution — Reactive Interest Rates
Note: The Mars Dynamic Interest Rate model described below will not immediately be activated for Mars V1 but may be activated via governance whenever the community deems the protocol is ready. This is because the dynamic interest rate model relies on supply and demand of capital being responsive to changes in interest rate. However, the Mars lockdrop is likely to make supply inelastic while risk limits on the borrow side will also make demand inelastic. As a result, Mars will launch with traditional 2-slope interest rate curves such as the one described in the previous section and open-source the dynamic interest rate model such that the community can implement it when it wants. This launch process will allow Mars to safely launch with well-known traditional interest rates that will probably behave better under the particular conditions of the demand and supply sides of the protocol, while eventually allowing the community to upgrade to the Reactive Interest Rate Model when considered optimal.
In this section, a different solution will be presented. While Mars will initially launch with a 2-slope interest rate model given the supply and demand constraints mentioned previously, this model will be made available for the community to deploy once those constraints are no longer present.
This model still targets an optimal utilisation rate, but rather than doing so via a curve, it uses control theory to allow interest rates to adapt dynamically to market conditions.
In the traditional credit protocol model described above, the interest rate is calculated based only on the current utilisation rate. Our idea with this model is to look at the utilisation as a parameter that can be manipulated by another parameter (like temperature in a physical system can be manipulated using heating and cooling units). Keeping a response parameter constant is quite a common problem in control theory and there is a well-known method to solve it — the proportional-integral-derivative (PID) controller and its variations. A PID controller continuously calculates the difference between the desired point (set point — optimal utilisation) and actual value (process variable — actual utilisation). Then it continuously corrects itself based on the proportional, derivative, and integral terms.
The Proportional-Derivative-Integral (PID) contains three terms, each with its own purpose:
1/ Proportional term: Yields a corrective response based on the error between target and actual utilisation. Kp is a constant which determines the magnitude of change in interest rate for a given error
2/ Integral term: Takes into account historical errors and integrates them in order to eliminate the residual error. Ki is a constant which determines how quickly IR should adjust based on previous errors.
3/ Derivative term: Estimates the future trend of the error based on its current rate of change. Kd is a constant which allows us to modulate the corrections to avoid overshooting.
We propose a way to implement this method in credit protocols. We assume that interest rate is the main factor that drives the utilisation and set that as the control parameter in our model, with utilisation being our response parameter. The overall algorithm to calculate the borrow interest rate can be seen below.
Our simulations show that the PID controller model is more responsive to changes in supply-demand conditions and thus achieves more stable utilisation. Mars Protocol has been created by a joint venture with Delphi Labs, which has helped devise the dynamic interest rate model. Learn more about how the dynamic interest rate model works in “Exploring Mars Protocol’s dynamic interest rate model” (Mars) and “Dynamic Interest Rate Model Based On Control Theory” (Delphi Research).
4. Token Economics (MARS)
Mars can be thought of as in some ways a bank of the future, operated and governed by a decentralised community via a transparent governance process. Like banks, Mars aims to attract deposits and lend out that money safely without incurring excessive risk. Mars will launch with a token (MARS). MARS’s token economics, incentive design and governance system are critical to achieving this goal.
The Martian Council — a DAO of xMARS token holders — will govern the deployed instance of the Mars Protocol smart contract system which is embraced by the community as the canonical “Mars.” The parameters to be set by the Martian Council will include which assets are subject to borrowing and lending by the system, the risk parameters for those assets, which third-party smart contracts will be eligible for C2C lending and the risk parameters for those contracts. These decisions have consequences on third parties (users) and, in extreme cases, can lead to Shortfall Events (as described below).
Note: The Mars Joint Venture is merely developing software designed to create certain incentives on the part of MARS and xMARS holders. Governance is ultimately a discretionary process subject to numerous uncertainties, and no specific governance outcomes can be guaranteed.
A. Token Architecture
The guiding principle behind MARS’s token economics is that of skin in the game: those making decisions should bear the consequences of those decisions, both positive and negative.
In order to provide the Martian Council with an incentive to govern well, Mars distributes a portion of its fees to xMARS stakers on an ongoing basis through purchases of MARS, as further described below.
In order to provide the Martian Council with an incentive to assume responsibility for governance failures, Mars: (1) requires that members of the Martian Council stake their Mars to activate governance power; and (2) continuously routes a portion of fees generated by Mars to a Safety Fund which can be tapped by the Martian Council to compensate users for Shortfall Events attributable to governance failures.
B. Staking — xMARS
MARS holders who wish to participate in governance can stake their MARS tokens and receive xMARS in return, with an unstaking period of 7 days. xMARS has a few key properties:
- Governance: 1 xMARS = 1 unit of voting power. Only xMARS (and MARS that’s locked for contributors) can participate in governance, making decisions on asset listing, risk parameters, treasury spending and more.
- Fees: xMARS holders will receive a share of protocol interest-rate revenue. Similarly to SushiSwap’s SushiBar contract, this will be done by using the revenue to buy MARS on the open market and adding it to the xMARS pool.
- Safety Fund: xMARS holders will be incentivised to backstop protocol risk by using a pool of reserved aUST (the ‘Safety Fund’) as a first-resort source of recovery for shortfall events and staked Mars as a last-resort source of recovery for Shortfall Events, with up to 30% of their stake being locked and sold in case of a shortfall event
C. Value Flows
Initially, 80% of all interest payments will go to lenders, with the remaining 20% being split amongst the Mars Treasury, Safety Fund and xMARS stakers.
All parameters, including the reserve factor and percentage of fees flowing to each bucket, will be alterable by governance.
D. xMARS Governance Rewards
The portion of Mars fees distributed to xMARS stakers should be seen as their reward for successful governance (through the Martian Council). For example, if the Martian Council authorises a C2C credit line which functions as intended and delivers fees, the Martian Council will be rewarded for this effort through a pro rata share of a portion of the increased fees paid to Mars.
E. xMARS-Governed Safety Fund and Coverage of Last Resort
On the other hand, if the Martian Council suffers from a governance failure which causes losses to users, xMARS holders should be incentivised to compensate users in order to maintain the usage levels of Mars and thus preserve the value of their staked MARS.
A Shortfall Event occurs whenever the value of a borrower’s debt exceeds the value of his collateral, resulting in a deficit for lenders. This is distinct from an Illiquidity Event, where utilisation rates are at 100% and lenders are unable to withdraw. In the latter case, LPs are illiquid but solvent, whereas in a Shortfall Event the LPs are actually insolvent.
Shortfall Events can be caused by various risks such as smart contract exploits, bad liquidations and/or oracle attacks. To be clear, they should never happen under normal conditions and can be mitigated by good risk management. To date, Shortfall Events in credit protocols have been limited, and, when they have occurred, resulted from exploits/economic attacks. However, when Shortfall Events do occur and are attributable to a governance failure of the Martian Council, the Martian Council should be able to respond to its natural incentives by tapping funds available to compensate the injured users.
To this end, the Mars system has two pools of funds available which can be utilised by the Martian Council to cover a Shortfall Event:
- the Safety Fund, a pool of aUST funded continuously by a portion of Mars fees; and
- the pool of MARS that has been staked by xMARS holders.
Ultimately, compensation cannot be guaranteed and is subject to the discretion of the Martian Council. However, based on the relevant incentives, we envision the Martian Council treating the Safety Fund as a coverage source of first resort and treating some socially defined percentage of staked MARS (e.g., 50%) as a coverage source of last resort. Thus, a likely coverage model for adoption by the Martian Council would be as depicted in the below diagram:
Overall, this model would be comparable in some ways to the governance model of MakerDAO, in which accumulated protocol fees are seen as the first source of recovery for making up system deficits and MKR auctions are seen as a last source of recovery for making up system deficits. History to date shows that MKR holders have responded to these types of incentives–for example, by auctioning MKR in the wake of Black Thursday.
G. Token Distribution/Allocation
A majority (70%) of MARS will be reserved for post-launch distribution to or management by users and other types of participants in the Mars community. 30% of MARS will be reserved for entities who participated in the joint venture developing Mars and the service providers of those entities.
The token distribution is subject to change.
5. Why Terra
A. Trustless Stablecoin
We build on Terra because we believe a decentralised financial system should not be reliant upon centralised stablecoins. The dominance of BUSD/USDT/USDC on existing DeFi ecosystems poses a systemic risk and remains crypto’s largest attack vector. Regulation, state-level attacks or simple negligence by centralised stablecoin issuers can lead to assets being frozen and/or significantly devalued. Under such attacks, any DeFi protocol that relies upon these assets as part of liquidity pools or as collateral (i.e. a credit protocol such as Mars) would face potential insolvency. Fundamentally, we believe there’s no point having a censorship-resistant base layer blockchain if the applications on top of it are built around easily censorable assets.
Decentralised stablecoins other than $DAI have failed to achieve meaningful market penetration. $DAI, while widely adopted, is partially collateralised by centralised, censorable assets ($WBTC, $USDC and even “real-world assets” (RWA) such as fractional interests in real-estate backed loans), and thus inherits their vulnerabilities. From our perspective, $UST is the only truly decentralised stablecoin functioning at scale. This makes $UST the clear choice.
B . Cross-chain Hub
The latest version of Terra (Columbus-5) features support for Cosmos’ Inter-Blockchain Communication (IBC) protocol, enabling cross-chain communication between Terra and other IBC-compatible PoS chains. Terra also has Wormhole bridges connecting Terra to Ethereum and Solana, which will eventually enable arbitrary messaging between contracts on any of these chains.
We believe that the next generation of DeFi protocols will not be siloed on a single chain, but accessible from multiple chains; thus, Terra is the ideal homebase to provide flexibility for potential cross-chain uses of Mars.
C. Low cost
Transaction costs on Ethereum are uneconomical for smaller market participants. We share DeFi’s core ideals of inclusion, making high transaction costs a non-starter. While L2s are coming, the only option available now is a side-chain. We feel that presents too large a tradeoff in decentralisation. Terra’s low transaction costs and confirmation times enable more users to participate and greatly improve UX. They also open up the design space, allowing, among other things, the on-chain computation required to run our dynamic interest rate model.
D. Burgeoning DeFi Ecosystem
Terra’s DeFi ecosystem already has >$18B TVL with an established core covering stablecoins, exchange, synthetics and savings accounts. Since Terra’s addition of support for Cosmos’ CosmWasm smart contract framework, there has been a Cambrian explosion of projects building on Terra. These protocols and users will require a well designed and efficient credit protocol to interoperate with them. Mars Protocol can fulfill this role.
6. Trust-Minimised Agile Governance
Mars governance will be designed to provide trust-minimised agility by combining MARS governance with the use of multisigs that are subject to checks and balances by the Martian Council. Similarly to other parametrised DeFi protocols like MakerDAO, the C2C lending features of Mars will require the community to rally around a powerful risk framework leveraging the wisdom of the Martian Council. More detail on Mars governance is forthcoming.
7. The Future
Mars Protocol will encompass the features outlined in this document with a targeted Q2 2022 launch.
As far as future plans go, Mars Protocol is a decentralised project; anyone can permissionlessly contribute to its development by making a proposal to the DAO. Together, we aim to build the leading DeFi credit protocol; becoming the lender of choice for both consumers and dApps. We hope the vision we describe inspires teams across the space to join us and help contribute to Mars Protocol.
Mars Protocol is a completely new credit protocol purpose-built for the Terra ecosystem. It puts an emphasis on usability and composability, not just for crypto natives but for the industry’s next 1 billion users. By bringing true utility to all forms of value, Mars will be a catalyst for Terra’s next wave of exponential adoption. The future awaits.
Join the mission
Share your comments below or follow us on Twitter at twitter.com/mars_protocol