# MIP116: D3M to Spark Lend ## Preamble ``` MIP#: 116 Title: D3M to Spark Lend Author(s): @PhoenixLabs Contributors: Tags: D3M Type: General Status: Obsolete Date Proposed: 2023-02-08 Date Ratified: Dependencies: MIP50 Replaces: N/A Forum URL: https://forum.makerdao.com/t/mip116-d3m-to-spark-lend/19732 Ratification Poll URL: https://vote.makerdao.com/polling/QmT9Novb#vote-breakdown Extra: This MIP has been made obsolete by the passage of [MIP102c2-SP1](https://mips.makerdao.com/mips/details/MIP102c2SP1) ``` ## Sentence Summary Phoenix Labs proposes a D3M be instantiated to provide DAI liquidity to Spark Lend at 0xC13e21B648A5Ee794902342038FF3aDAB66BE987. ## Paragraph Summary Phoenix Labs proposes a D3M be instantiated to provide DAI liquidity to Spark Lend at 0xC13e21B648A5Ee794902342038FF3aDAB66BE987. This MIP details the proposed pool/plan adapters and associated parameters. ## Component Summary **MIP116c1: D3MAaveV3Pool** Aave V3 Adapter Smart Contract **MIP116c2: D3MAaveBufferPlan** Aave Buffer Plan Smart Contract **MIP116c3: Debt Ceiling & Fee Structure** Details of parameters and interest rate strategy **MIP116c4: Treasury Details** Details of the smart contract holding any revenue **MIP116c5: Liquidation Details** Details of Maker Core liquidation scenario ## Motivation Phoenix Labs is a research and development company created to introduce new decentralized products into the Maker Ecosystem by helping MakerDAO grow and innovate in the decentralized realm. With this, Phoenix Labs wants to support the evolution of the Endgame by introducing the Spark Protocol. Spark Protocol will amplify the features of MakerDAO by enabling a liquidity market for supplying and borrowing scalable crypto assets and having DAI as a core element. To achieve this, Phoenix Labs proposes a D3M be instantiated to provide DAI liquidity to the Spark Lend, the first product of Spark Protocol. ## Specification / Proposal Details ### MIP116c1: Pool - Aave V3 Adapter Source: [https://github.com/makerdao/dss-direct-deposit/blob/aave-v3-support/src/pools/D3MAaveV3Pool.sol](https://github.com/makerdao/dss-direct-deposit/blob/aave-v3-support/src/pools/D3MAaveV3Pool.sol) The Aave V3 pool adapter will be used with `king` configured to be the surplus buffer (`vow`). ### MIP116c2: Plan - Aave Buffer Adapter Source: [https://github.com/makerdao/dss-direct-deposit/blob/aave-buffer-plan/src/plans/D3MAaveBufferPlan.sol](https://github.com/makerdao/dss-direct-deposit/blob/aave-buffer-plan/src/plans/D3MAaveBufferPlan.sol) This adapter will enforce a fixed liquidity buffer on the DAI Pool. As an example, if there are 200m in outstanding DAI borrows on Spark Lend, and the `buffer` is set to 100m, then this plan will make sure the DAI market on Spark Lend is 200m borrows + 100m dai liquidity for a total market size of 300m. The actual amount deposited is subject to Maker max debt ceilings, auto-line temporary debt ceilings, etc. ### MIP116c3: Debt Ceiling & Fee Structure A special interest rate strategy contract is proposed for the DAI market: [https://github.com/phoenixlabsresearch/sparklend/blob/master/src/DaiInterestRateStrategy.sol](https://github.com/phoenixlabsresearch/sparklend/blob/master/src/DaiInterestRateStrategy.sol) The above interest strategy will set the base rate equal to the Dai Savings Rate * Base Rate Conversion factor. The DAI market borrow rate will be that base rate + borrow spread. The DAI market supply rate (the amount that goes to Maker) will be the base rate + supply spread, but only applied to any amount beyond the performance bonus value. This is to seed the SubDAO treasury (and the SubDAO treasury in the future) with results-driven income as Phoenix Labs recommends keeping borrow rates as low as possible to capture market share. **Examples of likely scenarios:** ![maker-spark-revenue-perf-bonus|690x678](https://github.com/makerdao/mips/blob/master/MIP116/makersparkrevenueperfbonus.png) This means that users can borrow DAI at a predictable rate (unless Maker needs to liquidate, which will be covered below). Due to the below-market interest rate pricing, this market will likely only be filled by the Maker D3M and, along with the fixed buffer plan, it effectively makes this an on-demand borrow market similar to Maker Core. IE liquidity is added/removed from the pool more or less when users want to borrow/repay it. To seed liquidity and capture market share Phoenix Labs proposes the following parameters: **Vat / Auto-line Params** `maxLine`: 200m `gap`: 50m `ttl`: 8 hours **D3M General Params** `tau`: 7 days **Specific Params** `king`: Pause Proxy `buffer`: 30m **Interest Rate Params** `baseRateConversion`: 1 / 90% - as set by the [Stability and Liquidity Scope Frame]([https://forum.makerdao.com/t/mip103-the-stability-and-liquidity-scope-framework/19675](https://forum.makerdao.com/t/mip103-the-stability-and-liquidity-scope-framework/19675)) `borrowSpread`: 0 `supplySpread`: 0 `maxRate`: 75% `performanceBonus`: 100m ### MIP116c4: Treasury Details All revenue earned by Spark Protocol will be deposited into an Ecosystem Actor treasury contract located here: 0xb137E7d16564c81ae2b0C8ee6B55De81dd46ECe5 Maker Governance will be the administrator of all contracts and the treasury. The treasury will accumulate funds that will serve as first-loss capital for Spark Protocol and will be converted into a SubDAO Treasury if and when the SubDAO Governance accepts the product. An exit mechanism includes a one-time exit path that allows the owner(s) of an anon-multisig at address 0x8076807464DaC94Ac8Aa1f7aF31b58F73bD88A27 the ability to exit to an Ecosystem Actor permanently. This trigger is not expected to be used but is in place as a safety mechanism in case things go wrong. A golden parachute is included in this exit mechanism to compensate Phoenix Labs for their work by sending the funds earned to the treasury up to that point to the multisig. If this exit mechanism is invoked, then Phoenix Labs forfeits the right to workforce compensation SubDAO tokens. ![prelaunch-treasury|690x278](https://github.com/makerdao/mips/blob/master/MIP116/prelaunchtreasury.jpeg) ### MIP116c5: Liquidation Details ![spark-lend-unwinding|690x759](https://github.com/makerdao/mips/blob/master/MIP116/sparklendunwinding.jpeg) The interest rate module for the DAI market above is also aware of the ratio of D3M vault debt to vat debt ceiling. While the debt ceiling is above the vault debt, the rate will remain flat at the DSR + borrow spread amount. If the vault debt is larger than the debt ceiling (IE Maker wants to liquidate), then the DAI market borrow rate will asymptotically approach the maximum borrow rate (set to 75% APR above). Both supply and borrow rates will spike to allow for immediate liquidity relief from 3rd party DAI suppliers. This forces users to close their debt positions if Maker needs to free up liquidity for whatever reason. Once the vault debt drops below the debt ceiling again, the flat rate resumes.