diff --git a/docs/addresses.md b/docs/addresses.md index f2d0918..dcdf9ff 100644 --- a/docs/addresses.md +++ b/docs/addresses.md @@ -1,78 +1,78 @@ -# Smart contract addresses +# 智能合约地址 -## MPH token & staking +## MPH & 锁仓 -- MPHToken deployed at [0x8888801aF4d980682e47f1A9036e589479e835C5](https://etherscan.io/address/0x8888801aF4d980682e47f1A9036e589479e835C5) +- MPHToken 部署地址:[0x8888801aF4d980682e47f1A9036e589479e835C5](https://etherscan.io/address/0x8888801aF4d980682e47f1A9036e589479e835C5) - MPH-ETH LP token: [0x4d96369002fc5b9687ee924d458a7e5baa5df34e](https://etherscan.io/address/0x4d96369002fc5b9687ee924d458a7e5baa5df34e) - ClonedRewardsFactory: [0x4b52448393b8EcF8D56186887976c794056C6C68](https://etherscan.io/address/0x4b52448393b8EcF8D56186887976c794056C6C68) - LP rewards pool: [0xd48Df82a6371A9e0083FbfC0DF3AF641b8E21E44](https://etherscan.io/address/0xd48Df82a6371A9e0083FbfC0DF3AF641b8E21E44) -## Shared +## 共享 -- Governance treasury: [0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD](https://etherscan.io/address/0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD) -- Governance timelock: [0x4027d912A19E3Cd540FB580aF6A9088eAC738566](https://etherscan.io/address/0x4027d912A19E3Cd540FB580aF6A9088eAC738566) -- Developer wallet: [0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b](https://etherscan.io/address/0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b) -- Rewards deployed at [0x98df8D9E56b51e4Ea8AA9b57F8A5Df7A044234e1](https://etherscan.io/address/0x98df8D9E56b51e4Ea8AA9b57F8A5Df7A044234e1) +- 社区治理经费(Governance Treasury)部署地址: [0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD](https://etherscan.io/address/0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD) +- 社区治理时间锁定(Governance Timelock)合约地址: [0x4027d912A19E3Cd540FB580aF6A9088eAC738566](https://etherscan.io/address/0x4027d912A19E3Cd540FB580aF6A9088eAC738566) +- 开发者钱包(Developer Wallet): [0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b](https://etherscan.io/address/0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b) +- 挖矿奖励(Rewards): [0x98df8D9E56b51e4Ea8AA9b57F8A5Df7A044234e1](https://etherscan.io/address/0x98df8D9E56b51e4Ea8AA9b57F8A5Df7A044234e1) - Dumper deployed at [0x5B3C81C86d17786255904c316bFCB38A46146ef8](https://etherscan.io/address/0x5B3C81C86d17786255904c316bFCB38A46146ef8) -- PercentageFeeModel deployed at [0x11b2F96C0040C0189FD9F6C4405d086B03Bc41AB](https://etherscan.io/address/0x11b2F96C0040C0189FD9F6C4405d086B03Bc41AB) -- LinearInterestModel deployed at [0xE82698d8D51b36Cabd5897F2AD30d4cF654d7411](https://etherscan.io/address/0xE82698d8D51b36Cabd5897F2AD30d4cF654d7411) -- MPHIssuanceModel01 deployed at [0x36aD542daDc22078511D64b98aFF818aBD1AC713](https://etherscan.io/address/0x36aD542daDc22078511D64b98aFF818aBD1AC713) -- Vesting deployed at [0x8943eb8F104bCf826910e7d2f4D59edfe018e0e7](https://etherscan.io/address/0x8943eb8F104bCf826910e7d2f4D59edfe018e0e7) -- MPHMinter deployed at [0x03577A2151A10675a9689190fE5D331Ee7ff2517](https://etherscan.io/address/0x03577A2151A10675a9689190fE5D331Ee7ff2517) +- 费用模型(PercentageFeeModel): [0x11b2F96C0040C0189FD9F6C4405d086B03Bc41AB](https://etherscan.io/address/0x11b2F96C0040C0189FD9F6C4405d086B03Bc41AB) +- 线性利息模型(LinearInterestModel):[0xE82698d8D51b36Cabd5897F2AD30d4cF654d7411](https://etherscan.io/address/0xE82698d8D51b36Cabd5897F2AD30d4cF654d7411) +- MPH发行率模型(MPHIssuanceModel01): [0x36aD542daDc22078511D64b98aFF818aBD1AC713](https://etherscan.io/address/0x36aD542daDc22078511D64b98aFF818aBD1AC713) +- MPH发放地址(Vesting):[0x8943eb8F104bCf826910e7d2f4D59edfe018e0e7](https://etherscan.io/address/0x8943eb8F104bCf826910e7d2f4D59edfe018e0e7) +- MPH铸币地址(MPHMinter): [0x03577A2151A10675a9689190fE5D331Ee7ff2517](https://etherscan.io/address/0x03577A2151A10675a9689190fE5D331Ee7ff2517) ## cDAI -- CompoundERC20Market deployed at [0xB45badB785142e6f459a8f5F724B6688cef311FD](https://etherscan.io/address/0xB45badB785142e6f459a8f5F724B6688cef311FD) -- EMAOracle deployed at [0x4d986F2607A1f54De55ec7fff332A13d076ef160](https://etherscan.io/address/0x4d986F2607A1f54De55ec7fff332A13d076ef160) -- 88mph cDAI Pool Deposit deployed at [0x9D481E42d9A2b52397262Cdbe76ABf3ca7b52203](https://etherscan.io/address/0x9D481E42d9A2b52397262Cdbe76ABf3ca7b52203) -- 88mph cDAI Pool Bond deployed at [0x4A201E1B6d1ffAdEBE7C873f32a14473169B723B](https://etherscan.io/address/0x4A201E1B6d1ffAdEBE7C873f32a14473169B723B) -- 88mph cDAI Pool deployed at [0x35966201A7724b952455B73A36C8846D8745218e](https://etherscan.io/address/0x35966201A7724b952455B73A36C8846D8745218e) +- CompoundERC20Market 部署地址:[0xB45badB785142e6f459a8f5F724B6688cef311FD](https://etherscan.io/address/0xB45badB785142e6f459a8f5F724B6688cef311FD) +- EMAOracle 部署地址:[0x4d986F2607A1f54De55ec7fff332A13d076ef160](https://etherscan.io/address/0x4d986F2607A1f54De55ec7fff332A13d076ef160) +- 88mph cDAI Pool Deposit:[0x9D481E42d9A2b52397262Cdbe76ABf3ca7b52203](https://etherscan.io/address/0x9D481E42d9A2b52397262Cdbe76ABf3ca7b52203) +- 88mph cDAI Pool Bond:[0x4A201E1B6d1ffAdEBE7C873f32a14473169B723B](https://etherscan.io/address/0x4A201E1B6d1ffAdEBE7C873f32a14473169B723B) +- 88mph cDAI Pool:[0x35966201A7724b952455B73A36C8846D8745218e](https://etherscan.io/address/0x35966201A7724b952455B73A36C8846D8745218e) ## cUSDC -- CompoundERC20Market deployed at [0xaDEDB64E36ba329FD116269A62276B1Ba5d039Dc](https://etherscan.io/address/0xaDEDB64E36ba329FD116269A62276B1Ba5d039Dc) -- EMAOracle deployed at [0xBeC287DEED87b01EB64C8bD2E10558700E3AE156](https://etherscan.io/address/0xBeC287DEED87b01EB64C8bD2E10558700E3AE156) -- 88mph cUSDC Pool Deposit deployed at [0xE0CFDcCc6CD391DC8de1F7a2B2b5424131a87382](https://etherscan.io/address/0xE0CFDcCc6CD391DC8de1F7a2B2b5424131a87382) -- 88mph cUSDC Pool Bond deployed at [0x5396CFB525C0d166621FA1e22A2A343BC5441c74](https://etherscan.io/address/0x5396CFB525C0d166621FA1e22A2A343BC5441c74) -- 88mph cUSDC Pool deployed at [0x374226dbAa3e44bF3923AfB63f5Fd83928B7e148](https://etherscan.io/address/0x374226dbAa3e44bF3923AfB63f5Fd83928B7e148) +- CompoundERC20Market 部署地址:[0xaDEDB64E36ba329FD116269A62276B1Ba5d039Dc](https://etherscan.io/address/0xaDEDB64E36ba329FD116269A62276B1Ba5d039Dc) +- EMAOracle 地址:[0xBeC287DEED87b01EB64C8bD2E10558700E3AE156](https://etherscan.io/address/0xBeC287DEED87b01EB64C8bD2E10558700E3AE156) +- 88mph cUSDC Pool Deposit:[0xE0CFDcCc6CD391DC8de1F7a2B2b5424131a87382](https://etherscan.io/address/0xE0CFDcCc6CD391DC8de1F7a2B2b5424131a87382) +- 88mph cUSDC Pool Bond:[0x5396CFB525C0d166621FA1e22A2A343BC5441c74](https://etherscan.io/address/0x5396CFB525C0d166621FA1e22A2A343BC5441c74) +- 88mph cUSDC Pool:[0x374226dbAa3e44bF3923AfB63f5Fd83928B7e148](https://etherscan.io/address/0x374226dbAa3e44bF3923AfB63f5Fd83928B7e148) ## cUNI -- CompoundERC20Market deployed at [0xb5d7BE07Cc7F03c8340A3F492357137438778aFF](https://etherscan.io/address/0xb5d7BE07Cc7F03c8340A3F492357137438778aFF) -- EMAOracle deployed at [0xc5161483Fa46ff3C909C9d80135C24Fa5986d66F](https://etherscan.io/address/0xc5161483Fa46ff3C909C9d80135C24Fa5986d66F) -- 88mph cUNI Pool Deposit deployed at [0x8AF47056903E5FF85dcf5E024427c3e4A3E5E69E](https://etherscan.io/address/0x8AF47056903E5FF85dcf5E024427c3e4A3E5E69E) -- 88mph cUNI Pool Bond deployed at [0x20e9245821B4c56ae6693bc42d5845b063189a00](https://etherscan.io/address/0x20e9245821B4c56ae6693bc42d5845b063189a00) -- 88mph cUNI Pool deployed at [0x19E10132841616CE4790920d5f94B8571F9b9341](https://etherscan.io/address/0x19E10132841616CE4790920d5f94B8571F9b9341) +- CompoundERC20Market 部署地址:[0xb5d7BE07Cc7F03c8340A3F492357137438778aFF](https://etherscan.io/address/0xb5d7BE07Cc7F03c8340A3F492357137438778aFF) +- EMAOracle 部署地址:[0xc5161483Fa46ff3C909C9d80135C24Fa5986d66F](https://etherscan.io/address/0xc5161483Fa46ff3C909C9d80135C24Fa5986d66F) +- 88mph cUNI Pool Deposit:[0x8AF47056903E5FF85dcf5E024427c3e4A3E5E69E](https://etherscan.io/address/0x8AF47056903E5FF85dcf5E024427c3e4A3E5E69E) +- 88mph cUNI Pool Bond:[0x20e9245821B4c56ae6693bc42d5845b063189a00](https://etherscan.io/address/0x20e9245821B4c56ae6693bc42d5845b063189a00) +- 88mph cUNI Pool:[0x19E10132841616CE4790920d5f94B8571F9b9341](https://etherscan.io/address/0x19E10132841616CE4790920d5f94B8571F9b9341) ## yUSD -- YVaultMarket deployed at [0x37315Cdf1d097dfAb8267c0c1Aef6fECaC09d845](https://etherscan.io/address/0x37315Cdf1d097dfAb8267c0c1Aef6fECaC09d845) -- EMAOracle deployed at [0x7acD00D3e1Cf5018D8530f55f9F19910c3358159](https://etherscan.io/address/0x7acD00D3e1Cf5018D8530f55f9F19910c3358159) -- 88mph yCRV Pool Deposit deployed at [0x7A2e4b5627a07120770b1D64A9ea021E801165c3](https://etherscan.io/address/0x7A2e4b5627a07120770b1D64A9ea021E801165c3) -- 88mph yCRV Pool Bond deployed at [0xD32D197277c3364Ea70da7bAd454278cfdbaAF4c](https://etherscan.io/address/0xD32D197277c3364Ea70da7bAd454278cfdbaAF4c) -- 88mph yCRV Pool deployed at [0xe615e59353f70cA2424Aa0F24F49C639B8E924D3](https://etherscan.io/address/0xe615e59353f70cA2424Aa0F24F49C639B8E924D3) +- YVaultMarket 部署地址:[0x37315Cdf1d097dfAb8267c0c1Aef6fECaC09d845](https://etherscan.io/address/0x37315Cdf1d097dfAb8267c0c1Aef6fECaC09d845) +- EMAOracle 部署地址: [0x7acD00D3e1Cf5018D8530f55f9F19910c3358159](https://etherscan.io/address/0x7acD00D3e1Cf5018D8530f55f9F19910c3358159) +- 88mph yCRV Pool Deposit:[0x7A2e4b5627a07120770b1D64A9ea021E801165c3](https://etherscan.io/address/0x7A2e4b5627a07120770b1D64A9ea021E801165c3) +- 88mph yCRV Pool Bond:[0xD32D197277c3364Ea70da7bAd454278cfdbaAF4c](https://etherscan.io/address/0xD32D197277c3364Ea70da7bAd454278cfdbaAF4c) +- 88mph yCRV Pool:[0xe615e59353f70cA2424Aa0F24F49C639B8E924D3](https://etherscan.io/address/0xe615e59353f70cA2424Aa0F24F49C639B8E924D3) ## ycrvSBTC -- YVaultMarket deployed at [0x10f1a7F480c75E6e434d35b025dF4e6C1FC26Db7](https://etherscan.io/address/0x10f1a7F480c75E6e434d35b025dF4e6C1FC26Db7) -- EMAOracle deployed at [0x58CcE424c3098772387C7c7a35011A82569D78c6](https://etherscan.io/address/0x58CcE424c3098772387C7c7a35011A82569D78c6) -- 88mph crvSBTC Pool Deposit deployed at [0xcc2f73fC7C8ebDfB3f9de9F7Ac16E53F9Aaf3aBD](https://etherscan.io/address/0xcc2f73fC7C8ebDfB3f9de9F7Ac16E53F9Aaf3aBD) -- 88mph crvSBTC Pool Bond deployed at [0x073A4324A168D8Dc76596FB50920593092866A3c](https://etherscan.io/address/0x073A4324A168D8Dc76596FB50920593092866A3c) -- 88mph crvSBTC Pool deployed at [0x681Aaa7CF3F7E1f110842f0149bA8A4AF53Ef2Fd](https://etherscan.io/address/0x681Aaa7CF3F7E1f110842f0149bA8A4AF53Ef2Fd) +- YVaultMarket 部署地址:[0x10f1a7F480c75E6e434d35b025dF4e6C1FC26Db7](https://etherscan.io/address/0x10f1a7F480c75E6e434d35b025dF4e6C1FC26Db7) +- EMAOracle 部署地址:[0x58CcE424c3098772387C7c7a35011A82569D78c6](https://etherscan.io/address/0x58CcE424c3098772387C7c7a35011A82569D78c6) +- 88mph crvSBTC Pool Deposit:[0xcc2f73fC7C8ebDfB3f9de9F7Ac16E53F9Aaf3aBD](https://etherscan.io/address/0xcc2f73fC7C8ebDfB3f9de9F7Ac16E53F9Aaf3aBD) +- 88mph crvSBTC Pool Bond:[0x073A4324A168D8Dc76596FB50920593092866A3c](https://etherscan.io/address/0x073A4324A168D8Dc76596FB50920593092866A3c) +- 88mph crvSBTC Pool:[0x681Aaa7CF3F7E1f110842f0149bA8A4AF53Ef2Fd](https://etherscan.io/address/0x681Aaa7CF3F7E1f110842f0149bA8A4AF53Ef2Fd) ## Harvest yCRV -- HarvestMarket deployed at [0xD4AA5cC7Eb7f471F44bb744F518C5F3d937cc403](https://etherscan.io/address/0xD4AA5cC7Eb7f471F44bb744F518C5F3d937cc403) -- PercentageFeeModel deployed at [0xD817Ec04440c51Ec9B34B9625357e308b6A06348](https://etherscan.io/address/0xD817Ec04440c51Ec9B34B9625357e308b6A06348) -- EMAOracle deployed at [0x322C4F9A477f99b3AEc04dE27c8d97FddaD34309](https://etherscan.io/address/0x322C4F9A477f99b3AEc04dE27c8d97FddaD34309) -- 88mph Harvest yCRV Pool Deposit deployed at [0xF1Ae2f6991B7255d3B5266e6c56333858b3ebDD6](https://etherscan.io/address/0xF1Ae2f6991B7255d3B5266e6c56333858b3ebDD6) -- 88mph Harvest yCRV Pool Bond deployed at [0x57597c75D9f6faecb1Aa08eE6a324c48E55704E4](https://etherscan.io/address/0x57597c75D9f6faecb1Aa08eE6a324c48E55704E4) -- 88mph Harvest yCRV Pool deployed at [0x23Fa6b36E870ca5753853538D17C3ca7f5269e84](https://etherscan.io/address/0x23Fa6b36E870ca5753853538D17C3ca7f5269e84) +- HarvestMarket 部署地址:[0xD4AA5cC7Eb7f471F44bb744F518C5F3d937cc403](https://etherscan.io/address/0xD4AA5cC7Eb7f471F44bb744F518C5F3d937cc403) +- PercentageFeeModel 部署地址:[0xD817Ec04440c51Ec9B34B9625357e308b6A06348](https://etherscan.io/address/0xD817Ec04440c51Ec9B34B9625357e308b6A06348) +- EMAOracle 部署地址:[0x322C4F9A477f99b3AEc04dE27c8d97FddaD34309](https://etherscan.io/address/0x322C4F9A477f99b3AEc04dE27c8d97FddaD34309) +- 88mph Harvest yCRV Pool Deposit:[0xF1Ae2f6991B7255d3B5266e6c56333858b3ebDD6](https://etherscan.io/address/0xF1Ae2f6991B7255d3B5266e6c56333858b3ebDD6) +- 88mph Harvest yCRV Pool Bond:[0x57597c75D9f6faecb1Aa08eE6a324c48E55704E4](https://etherscan.io/address/0x57597c75D9f6faecb1Aa08eE6a324c48E55704E4) +- 88mph Harvest yCRV Pool:[0x23Fa6b36E870ca5753853538D17C3ca7f5269e84](https://etherscan.io/address/0x23Fa6b36E870ca5753853538D17C3ca7f5269e84) ## Aave v2 USDC -- AaveMarket deployed at [0xB558fD7F1927CeB334bf661acc5C6a11C103fc91](https://etherscan.io/address/0xB558fD7F1927CeB334bf661acc5C6a11C103fc91) -- EMAOracle deployed at [0xdde39fDd51a4783685622984b4c5E757Db6beCb0](https://etherscan.io/address/0xdde39fDd51a4783685622984b4c5E757Db6beCb0) -- 88mph aUSDC Pool Deposit deployed at [0xdaA6BD333c83362579D9621954e9451E319D09ea](https://etherscan.io/address/0xdaA6BD333c83362579D9621954e9451E319D09ea) -- 88mph aUSDC Pool Bond deployed at [0x9C4beC382195a4CCE7CfcD18813b3F8Da1aA162B](https://etherscan.io/address/0x9C4beC382195a4CCE7CfcD18813b3F8Da1aA162B) -- 88mph aUSDC Pool deployed at [0xe8C52367b81113ED32bb276184e521C2fbE9393A](https://etherscan.io/address/0xe8C52367b81113ED32bb276184e521C2fbE9393A) +- AaveMarket 部署地址:[0xB558fD7F1927CeB334bf661acc5C6a11C103fc91](https://etherscan.io/address/0xB558fD7F1927CeB334bf661acc5C6a11C103fc91) +- EMAOracle 部署地址:[0xdde39fDd51a4783685622984b4c5E757Db6beCb0](https://etherscan.io/address/0xdde39fDd51a4783685622984b4c5E757Db6beCb0) +- 88mph aUSDC Pool Deposit:[0xdaA6BD333c83362579D9621954e9451E319D09ea](https://etherscan.io/address/0xdaA6BD333c83362579D9621954e9451E319D09ea) +- 88mph aUSDC Pool Bond:[0x9C4beC382195a4CCE7CfcD18813b3F8Da1aA162B](https://etherscan.io/address/0x9C4beC382195a4CCE7CfcD18813b3F8Da1aA162B) +- 88mph aUSDC Pool:[0xe8C52367b81113ED32bb276184e521C2fbE9393A](https://etherscan.io/address/0xe8C52367b81113ED32bb276184e521C2fbE9393A) diff --git a/docs/howitworks.md b/docs/howitworks.md index 0b3e5f8..bcb1a58 100644 --- a/docs/howitworks.md +++ b/docs/howitworks.md @@ -1,51 +1,52 @@ -# How 88mph works +# 88mph的运行策略 -## Overview +## 概览 -What exactly happens when you, say, deposit 100 DAI into 88mph for 1 year at 10% fixed-rate APY? +如果你把100DAI存进88mph,存期一年,按10%的固定利率计算收益,会发生什么变化? -1. Your 100 DAI is transferred to 88mph. -2. 88mph deposits the 100 DAI into a yield-generating protocol with variable rate APY, which will generate yield for the 1 year deposit period. -3. Once the 1 year is over, you withdraw 110 DAI from 88mph. +1.你的100 DAI存进了88mph。 -At first glance, this may seem extremely problematic. To begin with, how is this different from simply juggling your own money around? Secondly, if the yield-generating protocol failed to generate 10 DAI of yield from the 100 DAI given to it in 1 year, you can't guarantee that you can withdraw 110 DAI from 88mph. +2.88mph把这100 DAI存进和本协议相关联的另一个按可变利率计算年收益的基础收益平台(比如Harvest),该平台负责在这一年存期中产生实际收益。 -These objections are resolved by 88mph through pooling the deposits together. Pooling deposits means putting the deposited DAI into a single pool, from which users can withdraw a deposit once its deposit period is over. +3.一年期满后,你可以从88mph中取出110 DAI。 -How would pooling help? +乍看之下,这似乎很有问题。首先,这难道不是移花接木的游戏?其次,如果该基础收益平台一年内无法产生10 DAI的收益,88mph怎么确保用户一年后能拿到110 DAI? -- **Risk balancing**: If the floating rate APY rose after a deposit, the yield generated by the deposited funds could be more than the interest promised to the user. This surplus would be able to balance out the debt caused by deposits where the floating rate has dropped since the time of deposit. This way, risk of insolvency is reduced for the users, and the stability of 88mph's interest rate is supported. -- **Overlapping deposit periods**: If an older deposit could not generate enough yield to cover the debt caused by the interest promised to the depositor, and its deposit period would be over soon, the yield could still be paid out using the funds of other deposits. This alone obviously does not solve the debt, but combined with risk balancing and the volatility in the floating interest rate it helps with keeping the 88mph pool solvent. +当下,把所有存款聚集起来能比较好地应对这些问题,也就是说,所有DAI都集中到一个池中,存期满时用户从这个流动池子中取款。 -## Floating-rate bonds +为什么这样就能解决问题? -Simply doing the above, though, would make 88mph a fairly risky product: if the floating rate APY drops to a very low value and stays there for a long time, deposits made when the floating rate was still high would not by themselves generate enough interest to cover the original interest payouts, and neither would the deposits made after the rates dropped help with this situation. This would cause a pool-wide insolvency event. +- **风险平衡**:假如88mph将一笔存款转存入上述基础收益平台后,该平台利率有所上涨,那么实际收益就会多于向用户承诺的收益,增加的这部分收益就能用来平衡某些用户存入资金后由于利率下跌而造成的负债。这样就能有效降低破产的风险,从而增加88mph固定利率的稳定性。 +- **重叠存期**:如果一笔较早的存款没能产出足额利息,而其存期又即将结束,这时可调用其他存款以优先结算这笔即将期满的存款。显然,单独通过这种方式无法解决所有负债问题,但结合风险平衡和利率浮动,则能有效保证88mph的偿付能力。 -This is why 88mph also offers another mechanic called **floating-rate bonds**. Buying floating-rate bonds allows someone to immediately fill up the debt of one or more deposits using their own money, and in exchange they would receive the yield generated by those deposits. Given that each 88mph deposit would generate enough yield to cover its own deficit as long as the average interest rate during the deposit period stays above 75% of the initial value, a bond buyer would earn a profit as long as the interest rate doesn't drop by more than 25%. +## 浮动利率债券 -Not only do floating-rate bonds significantly reduces the risk of depositing into 88mph, it also provides a brand new financial product that allows users to **long the interest rates of lending protocols**. It's similar to some other products that allows people to long and short interest rates ([LSDai](https://lsdai.market/)), except 88mph's floating-rate bonds provides a profit even if the interest rate drops (as long as it doesn't drop by more than 25%), and provides even more profits if the interest rate rises. It's like leverage-longing the interest rate! +如果只是简单地如上述所言,88mph依旧是一个高风险的平台:假如基础收益平台利率跌到超低值且停滞了很长时间,而用户是在早先的高利率时期在88mph存入资金,这些存款将无法在存期内自给自足其收益,降息后则更无助于偿付收益,这将导致整个流动池子的破产。 -## Interest rate model +正因如此,88mph还提供另一种**浮动利率债券**产品。通过购买浮动利率债券,某人可以立即用他们自己的钱弥补一笔或多笔存款的收益赤字,作为交换,他们可以得到这部分存款产生的额外收益。只要存期内实际收益平台的平均利率保持在初始利率的75%以上,88mph平台上的每笔存款就能产生足够的收益来弥补其赤字,那么只要利率下降不超过25%,债券买家就能够从中获利。 -At the moment, 88mph uses a linear model for determining the fixed interest rate offered to depositors. 88mph keeps track of the Exponential Moving Average (EMA) of the underlying yield protocol's APY over roughly a monthly window, and offers 75% of the EMA as the fixed rate. +浮动利率债券不仅大大降低了88mph平台的投资风险,同时也提供了一种全新的金融产品,允许用户根据行情**判断投资平台的利率走势**。这有点类似于那些允许用户看涨或看跌利率的产品(比如[LSDai](https://lsdai.market/)),不同的是,即便利率下跌(只要下降不超过25%),88mph的浮动利率债券依旧能提供收益,如果利率上涨,其回报值会更高,就像在对利率进行杠杆调节。 -We have plans to implement more sophisticated interest rate models in the future that take into account paramters such as the pool surplus/debt, floating-rate volatility, pool total deposit, and so on. +## 利率模型 -## Towards structured products +当前88mph用以计算固定利率值的线性模型是指数平均数指标(Exponential Moving Average)。88mph会持续观察基础收益平台的指数平均数指标变化,每月调整一次,以该指标的75%作为固定利率值。 -The first line of products offered by 88mph could allow us or another protocol to build structured products on top of our first layer, **guaranteeing the capital** or a significant portion of such to maturity. +我们未来计划采用更加精确的利率模型,能够把流动池子的盈余或负债状况,利率浮动情况,流动池子的存款总数等参数也考虑进来。 -We could imagine a mechanism that gives rise to this structure by the combination of a fixed income instrument and the use of derivatives, in this case in particular, an option (eg [hegic.co](https://www.hegic.co)). +## 向结构化产品迈进 -As far as we know, there is nothing like that in DeFi, so it could be a new market segment to explore after stabilizing our first layer of products. +88mph的首支产品线将来会有很多可能性,我们自己或者其他平台可以在本平台现有产品的基础上搭建结构化产品网络,利用我们的固定利率池,**保证其产品拥有稳定的资金流**,作为其产品孵化成形的重要部分。 -## Interoperability through Non-fungible tokens (NFTs) +我们可以想象:固收产品和衍生产品共同组合成这个结构网,就目前而言,这是不错的搭配机制(比如[hegic.co](https://www.hegic.co))。 -88mph represents deposits and bonds using ERC-721 standard non-fungible tokens. This means that users can transfer them between accounts, buy or sell them on exchanges, put wrappers around them to add more features, and more! The limit is your imagination. +据我们所知,当下DeFi市场还没有出现这种产品组合,因此这种组合有望占据新的市场份额,在稳定我们首支产品线之后大家可以继续探索新玩法。 -Some possible use cases: +## 通过不可互换币(NFTs)实现互动 -- Deposited a lot of money into 88mph, but suddenly need cash? And you still want your deposit to generate profit? Well, you can take out a loan on lending platforms like [RocketNFT](https://medium.com/@AlexMasmej/introducing-rocket-get-a-loan-against-your-nfts-f67b1b5738f0) using your deposit NFT as collateral, and pay it back once you withdraw your deposit. Magic! -- You can wrap your bond NFT with an ERC20 token to sell it out fractionally. -- Or simply attach a creation of your favorite NFT-artist. +88mph的资金和债券均使用基于ERC-721标准的NFTs作为凭证,也就是说,用户可以直接把NFT转给其他账户或者在交易所进行买卖,或者增加更多产品特性包装成其他代币,一切皆有可能。 +以下是一些可实现的玩法: + +- 如果你已经把一大笔钱存入88mph,但是突然急用现金,但你又不想提前取款终止收益?你可以使用你存款的NFT作为抵押,在第三方借贷平台(如[RocketNFT](https://medium.com/@AlexMasmej/introducing-rocket-get-a-loan-against-your-nfts-f67b1b5738f0))贷款,在期满取出存款时再还上这笔贷款。 +- 你可以用ERC20代币包装你所持债券的NFT,再分散卖出去。 +- 即便只是用你最喜欢的NFT艺术家作品作为你的NFT形象,也是很棒很日常的玩法。 diff --git a/docs/index.md b/docs/index.md index 6957b1b..3d44c5a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,10 @@ -# Introduction +# 介绍 ![88mph-logo](img/88mph-logo-dark.png) -This is the documentation of [88mph](https://88mph.app), a fixed-rate yield-generation protocol. +这是关于[88mph](https://88mph.app)的技术资料,这是一个按固定利率计算年收益的平台。 -You can find the source code of 88mph on [GitHub](https://github.com/88mphapp). +你可以在[GitHub](https://github.com/88mphapp)找到88mph的源代码。 + +如果想了解88mph如何实现固定利率收益,请查看[88mph的运行策略](howitworks.md)。 -To learn about how 88mph achieves fixed-rate interest, check out [How 88mph works](howitworks.md). diff --git a/docs/mph.md b/docs/mph.md index 963a367..50d7202 100644 --- a/docs/mph.md +++ b/docs/mph.md @@ -1,83 +1,74 @@ -# MPH tokenomics +# MPH 代币经济 -## Initial issuance +## 初次发行 -An initial supply of 88,000 MPH were minted and will be distributed via liquidity mining. +MPH是88mph的代币,首次铸币量为88000 MPH,通过流动性挖矿的方式分发给用户。 -It begins at 12:00 pm PT 11/20/2020 and lasts 14 days. +初次发行于太平洋时间2020年11月20日中午12:00(即北京时间2020年11月21日凌晨4:00),共持续14天。 -To participate, follow these steps: +MPH代币合约地址:0x8888801af4d980682e47f1a9036e589479e835c5 -1. Deposit into an 88mph fixed-rate APY pool. This will give you some upfront MPH. -2. Provide liquidity to [the MPH-ETH Uniswap pair](https://info.uniswap.org/pair/0x4d96369002fc5b9687ee924d458a7e5baa5df34e) -3. Stake the Uniswap LP token [here](https://88mph.app/farming) -4. Unstake when you want without penalty. +# 总供应量 -MPH token address: 0x8888801af4d980682e47f1a9036e589479e835c5 +MPH代币总供应量取决于总锁仓价值(Total Value Locked)的增长。当前,我们激励用户向我们的[流动池子](https://88mph.app/deposits)存款的机制主要是,根据[发行率](https://88mph.app/docs/mph/#issuance-rate-multiplier)向用户发放更多MPH币作为投资奖励。正在孵化的社区治理机制有权监控各项平台参数,并对作为奖励的MPH代币来源有决定权:重新铸币发放或者从[社区治理经费](https://88mph.app/docs/mph/#governance-treasury)中获取。因此,MPH持有者有权决定如何刺激总锁仓价值增长,通过这种方式,[MPH锁仓挖矿用户](https://88mph.app/docs/mph/#mph-staking-rewards-revenues-sharing)能够获得更多收益,也不会过分削弱早期用户的决策权。 -# Total supply -The MPH total supply depends on TVL's growth. Currently, 88mph incentivizes the lenders to deposit their funds in the [fixed-rate APY pools](https://88mph.app/deposits) by rewarding them with new MPH distributed according to an [issuance rate](https://88mph.app/docs/mph/#issuance-rate-multiplier). The upcoming governance will be in charge to monitor the protocol's parameters and decide from where the MPH rewards come from (new issuance and/or [governance treasury](https://88mph.app/docs/mph/#governance-treasury)). So it's up to the MPH holders to decide how to stimulate TVL growth, and by doing so, generate more revenues for [MPH stakers](https://88mph.app/docs/mph/#mph-staking-rewards-revenues-sharing), without diluting too much early adopters. +至此,可以说MPH币的总供应量并没有极值,但MPH持仓用户对供应量有决策权。 -Therefore, you can conclude that there isn't a maximum supply but the total supply is in the hand of the MPH holders. +另外,MPH 的[循环供应](https://academy.binance.com/en/glossary/circulating-supply)也可作为衡量此平台投资价值的一个重要指标。原因在于,在用户收回本金时,存款时发放给用户作为奖励的MPH代币中有一部分须被返还。这些MPH将存入[社区治理经费](https://88mph.app/docs/mph/#governance-treasury)中。换言之,这部分MPH不会流入开放市场和[MPH锁仓挖矿](https://88mph.app/docs/mph/#mph-staking-rewards-revenues-sharing)体系,而将成为社区治理经费的一部分,详见[Placeholder.vc](https://www.placeholder.vc/blog/2020/9/17/stop-burning-tokens-buyback-and-make-instead)。 -You should also note that the MPH [circulating supply](https://academy.binance.com/en/glossary/circulating-supply) is a more accurate metric to access the current value of the protocol. The reason behind this statement is that the majority of the MPH distributed to lenders must be paid back when the lenders withdraw their principal. They are then sent to the [governance treasury](https://88mph.app/docs/mph/#governance-treasury). In other words, a big percentage of the MPH supply will end up in the governance treasury at any point in the future, excluding this supply from the open market and the [MPH staking](https://88mph.app/docs/mph/#mph-staking-rewards-revenues-sharing) system. More about the benefits of such design could be found on [Placeholder.vc](https://www.placeholder.vc/blog/2020/9/17/stop-burning-tokens-buyback-and-make-instead). +## 存款人奖励 -## Depositor rewards +用户在88mph流动池子中存入一笔资金后,将获得一定量的新铸MPH币作为奖励,数额与\(存款数额\*存款时间\)成正比,持续发放七日以上。接下来,用户可以将这些MPH币锁入MPH奖励池中进行锁仓挖矿,赚回那部分平台服务费或者更多额外的挖矿收益。期满取款时,用户须将一定比例(目前在30%-90%之间浮动)的MPH奖励返还给社区。这部分MPH币将成为88mph社区治理经费,由MPH持仓用户投票决定如何使用它们。 -When a user makes a deposit in an 88mph pool, they will receive newly-minted MPH tokens proportional to \(depositAmount \times depositPeriod\), which will be continuously vested over 7 days. They can then stake this MPH in the MPH rewards pool to earn their share of protocol fees and yield-farming rewards. When the deposit is mature and the user wants to withdraw it, they will have to pay back a proportion of the MPH reward (currently between 30% and 90%). These MPH tokens will be sent to the 88mph governance treasury, where MPH holders can vote on how to spend them. +这种分发模型能有效确保老用户在社区治理和收益分配过程中的话语权,平台收益与用户收益息息相关,形成良性循环,降低投机者使坏的可能性。 -This distribution model ensures that existing users will have an amplified influence in the governance process and income sharing, which aligns the interest of the protocol with the interest of the users, rather than the interest of speculators. +## 债券买家奖励 -## Bond buyer rewards +用户购买浮动利率债券,当一笔由该债券供资的存款被提取时,该用户会获得一定数额的新铸MPH币,数额与\(存款数额\*从购买债券到存款到期的时间\)成正比。用户可以将这些MPH币锁入MPH奖励池中,赚回那部分平台服务费或者更多额外的挖矿收益。 -When a user buys a floating-rate bond, they will receive newly-minted MPH tokens when one of the deposits whose debt the bond funded is withdrawn, proportional to \(depositAmount \times timeFromBondPurchaseToDepositMaturation\). They can then stake this MPH in the MPH rewards pool to earn their share of protocol fees and yield-farming rewards. +债券买家奖励也可以采用存款人奖励的发放方式,不过眼下我们觉得没必要。 -This reward can also have vesting like depositor rewards, though for now, we don't think it's necessary to enable that. +**注意**:债券买家不会在购买后马上获得MPH奖励,只有固定利率存款用户才会即时获得奖励;并且,我们不允许存款奖励和债券奖励同时发放给同一用户。 -**Notes**: at the beginning, bonds buyers won't get MPH rewards. Only Fixed-rate deposits users. And we won't allow deposit and bond MPH rewards at the same time. +## 发行率乘数 -## Issuance rate multiplier +假设用户本金是DAI,发行率乘数的单位是,MPH每DAI每秒。 -The multiplier’s unit is MPH per second per stablecoin (of deposit). +因此,可以这样思考这个发行率乘数的合理性:本金X DAI,存期一年,存款人将获得多少MPH奖励? -So a good way to think about what a smart issuance rate multiplier is: given x stablecoins deposit for 1 year, how much MPH should be rewarded? +部署者的预设是,后一次的MPH发行量总是低于前一次的数字。短期的MPH奖励会在7天内逐日分发到您的地址,除去要归还的部分,剩下的永久MPH奖励会一直保留在您的账户内。如果提前取出本金,那么您须归还全部的MPH奖励,这部分MPH将会被销毁,永久减少MPH的总供应量。 -We preset the issuance rate at relaunch with a lower issuance rate than v1 launch. Temporary MPH reward are distributed to your address over a 7-day vesting period and you keep your permanent MPH reward at maturity. If early withdraw, then 100% of the reward need to be paid back and they are burnt (not adding to the total supply of MPH). +发行率重置后,我们会根据MPH价格的变化和每个池中总锁仓价值的增长重新评估储户的奖励数额。 -We’ll revisit the depositors’ reward shortly after relaunch according to the evolution of the MPH price and the TVL growth in each pool. +注意:对于发行率的重置,我们直接使用参与社区治理成员的多重签名作为其合约所有者,这会让我们在当下的孵化阶段灵便许多。等社区成熟时,我们将使用时间锁定(Timelock)合约。启社区治理体系时,平台参数会转移给MPH币持有者。 -Note: for issuance rate updates, we use the governance multisig directly as the contract owner. It allows us more flexibility in these early days. We will transition to a timelock after the dust has settled. The protocol's parameters will be ended over to the community token holders when the governance system will be launched. +部署团队的核心愿景是,在可预见的这段时期,将发币量维持在较低水平,以免破坏流动性挖矿,过度稀释早期用户,同时存款总量能为MPH锁仓挖矿用户带来可持续的利润空间(因此,我们可能会启动更多的COMP流动池子以收获更多的COMP币)。对于本团队而言,这是一个小目标,是一个学习过程,也是接下来数周内需要经历的考验。 -The core team vision is low issuance for the foreseeable future to don’t wreck the liquidity mining program, and don't dilute too much early adopters, while allowing the growth of the deposits TVL to generate sustainable profits for MPH stakers (so we'll probably incentivize more the Compound pools to harvest more COMP). That's the goal and it'll be a test & learn process other the coming days/weeks. +## MPH 锁仓挖矿奖励(收益分红) +在88mph锁仓挖矿的收益目前是DAI,这部分DAI有两个来源: -## MPH Staking rewards (Revenues sharing) +* 88mph服务费:当储户期满取出本金时,将从其利息里扣除10%作为社区服务费,即用户实际得到的利息是承诺利息的90%。 +* 挖矿奖励:88mph把用户存款存进基础收益平台(比如Compound)挖矿时,除了获得稳定币利息,还能获得一部分该平台的代币(COMP,CRV,etc),有需要时,88mph会把这些代币卖掉换成DAI,和锁仓挖矿用户共享。 -By staking your MPH, you can claim your share of rewards from the 88mph rewards pool where the protocol fee and yield-farming rewards are collected. +88mph服务费和挖矿奖励,比如COMP币,在用户需要我们把COMP换成DAI发放奖励之前,将在我们MPH锁仓矿池中持续积累。 -88mph distribute 100% of its revenues with the community: +**注意**:88mph累计的稳定币和其他代币都可以在官网的stake MPH页面底部看到。从利息中扣除10%服务费的收取对象仅限那些存期满时取出本金的用户。提前取出本金的储户无须扣费,因为他们在存期未满时间内获得的利息将保留在资金池中,不会发放到储户。 -* 88mph protocol fee: 10% is deducted from the interest when a depositor withdraws. -* Yield-farming rewards: yield-farmed tokens earned from the protocols 88mph is connected to (COMP, etc.). +用户可在任何时候解锁其MPH份额,或者取出锁仓挖矿奖励。 -88mph's protocol fee and yield-farmed tokens like $COMP need to accumulate in our MPH staking pool before allowing us to swap them for $DAI and distribute the rewards to $MPH stakers. +## 开发者基金 -**Notes**: The MPH staking rewards APY is currently unknown because no fees were generated so far and the COMP harvested require time to accumulate. The 10% fee on the interest earned by lenders is applied only if someone withdraws his principal at maturity. An early withdrawal enquires no fee because the interest generated stays in the pool. It's not distributed to the original lender. It will generate compounded interests for everyone else staying in the fixed-rate APY pool. +一旦有新存款进入流动池子,有新的MPH币铸成,都将同时铸成一笔额外的MPH币,数额是该笔新铸币的10%,并收入开发者基金。这些额外的MPH将用于社区未来的发展和维护。 -You can claim and unstake when you want. +开发者基金合约地址:0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b -## Developer fund +## 社区治理经费 -Whenever MPH is minted by new deposits, an additional 10% of the minted amount is minted and sent to the developer fund. These MPH will be used to pay for future development & maintenance of the protocol. +MPH持仓用户有权决定平台的未来。在社区治理机制启动后,我们将启用专门的快照以保证社区治理机制良好运作。 -Development funds: 0xfecBad5D60725EB6fd10f8936e02fa203fd27E4b +如前所述,社区治理经费的来源是储户取款时归还的MPH。这些MPH的用途由MPH持有者全权决定。 -## Governance treasury -MPH holders have the power to shape the future of the protocol. A dedicated Snapshot will be live shortly after the protocol launch to enable community control. +社区治理机制的运作策略是,用户使用他们的MPH币对不同议案进行投票,议案内容多样,包括各项平台参数,如何使用社区治理经费(开创新的激励机制,资本化,最终增长)等等。 -As previously stated, the governance treasury receives the MPH tokens paid back by depositors when they withdraw their deposits. These MPH will be used by whatever the MPH holders decide on. - - -The governance process works by having users vote with their MPH tokens on various proposals ranging from protocol parameters to smart ways of using the capital assets stored in the treasury for creating new incentives, capitalization, and at the end growth. - -Governance treasury: 0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD +社区治理经费合约地址:0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD diff --git a/docs/smartcontract.md b/docs/smartcontract.md index a8aaad4..69cfd06 100644 --- a/docs/smartcontract.md +++ b/docs/smartcontract.md @@ -1,289 +1,293 @@ -# Smart contract reference +# 智能合约索引 -The smart contract source code can be found on [GitHub](https://github.com/88mphapp/88mph-contracts). +智能合约源代码均可在 [GitHub](https://github.com/88mphapp/88mph-contracts)找到。 -## Architecture overview +## 体系概览 -Each 88mph pool consists of 6 smart contracts: +每个88mph的流动池子都由六个智能合约搭建而成。 -- `DInterest`: The main smart contract that users interact with. Handles depositing, withdrawing, and keeping track of deposits. Emits all of the events used in the subgraph. -- `FeeModel`: Determines the fee strategy of 88mph, as well as who receives the fees. -- `MoneyMarket`: A wrapper for interacting with yield-generating protocols, and stores all of the user funds. Requires a different one for each protocol. -- `InterestOracle`: An oracle for the interest rate of the underlying yield-generating protocol. -- `NFT`: Two non-fungible ERC721 tokens, used for representing ownership of deposits and bonds. +- `DInterest`: 用户主要参与互动的条约,功能包括处理存取款信息、跟踪记录存款及发射子节点所使用的所有事件。 +- `FeeModel`: 决定88mph的社区服务费以及其获得者。 +- `MoneyMarket`:与其他收益平台互动的包装,储存所有用户资金,一个条约仅适用于与一个平台互动。 +- `InterestOracle`: 预计基础收益平台利率的变化。 +- `NFT`: 根据ERC721标准发行的两种NFT,是存款或债券所有人的持仓凭证。 -Globally 88mph has the following contracts for handling things related to the MPH token: +在全球范围内,88mph用以下条约来处理与MPH代币相关的事务。 -- `MPHToken`: The MPH ERC-20 token contract itself. -- `MPHMinter`: Responsible for minting & taking back MPH tokens for depositors & bond buyers. -- `Dumper`: Responsible for accumulating the protocol fees & yield-farming rewards generated by 88mph pools and exchanging them for DAI. -- `Rewards`: The MPH rewards staking contract for distributing the protocol fees & yield-farming rewards. +- `MPHToken`:MPH ERC-20代币合约。 +- `MPHMinter`:负责铸币,从储户和债券购买者处收回MPH代币。 +- `Dumper`: 负责累加社区服务费及在88mph流动池子里产生的挖矿收益并将收益换成DAI。 +- `Rewards`:MPH锁仓挖矿奖励合约,负责分配社区服务费和挖矿奖励。 -## API reference +## 应用程序接口索引 ### DInterest -#### State changing functions +#### 状态变换函数 ##### `function deposit(uint256 amount, uint256 maturationTimestamp) external` -Creates a single deposit for the caller. +负责为来访者建立一笔单一存款。 -- `amount`: The amount of `stablecoin` to deposit. The caller should have already approved the contract to spend this much `stablecoin` before calling this function. Scaled by \(10^{stablecoinDecimals}\). -- `maturationTimestamp`: The Unix timestamp at and after which the deposit will be able to be withdrawn. In seconds. +- `amount`: 存入的`stablecoin`数量。在调用此函数前,来访者应该已经认可了支出这么多`stablecoin`(稳定币)的合同。计算公式为\(10^{stablecoinDecimals}\)。 +- `maturationTimestamp`: Unix时间戳,数秒记录存款时间,失效即期满。 ##### `function withdraw(uint256 depositID) external` -Withdraws a single deposit for the caller. The caller must own the deposit NFT with ID `depositID`. +负责为来访者取出一笔单一存款。来访者必须拥有ID为`depositID`存款的NFT凭证。 -- `depositID`: The index of the deposit to be withdrawn in the `deposits` array plus 1. +- `depositID`: `deposits`数组中要提取的存款的指数加1。 +- `fundingID`: 在`fundingList`数组中为利息赤字供资的债券买家的指数加1。可以使用我们的[subgraph](https://thegraph.com/explorer/subgraph/bacon-labs/eighty-eight-mph)找到该ID。 -###### Important note +###### 注意事项 -Withdrawing may fail if the 88mph pool has failed to generate enough interest from the underlying money market to cover the deficit incurred by the original upfront interest payout, and no one has funded the difference by buying bonds. This is the main risk of depositing into 88mph. +如果88mph流动池子在基础交易市场中无法产生足额利息来支付承诺给用户的利息,并且也没人买债券来清偿赤字,那么该取款则有可能失败。这是在88mph平台上投资的主要风险。 ##### `function earlyWithdraw(uint256 depositID) external` -Withdraws a single deposit for the caller, before the maturation timestamp. The caller must own the deposit NFT with ID `depositID`. +负责未到期的提前取款事宜。来访者必须拥有ID为`depositID`的存款的NFT凭证。 -- `depositID`: The index of the deposit to be withdrawn in the `deposits` array plus 1. +- `depositID`: `deposits`数组中要提取的存款的指数加1。 +- `fundingID`: 在`fundingList`数组中为利息赤字供资的债券买家的指数加1。可以使用我们的[subgraph](https://thegraph.com/explorer/subgraph/bacon-labs/eighty-eight-mph)找到该ID。 ##### `function multiDeposit(uint256[] calldata amountList, uint256[] calldata maturationTimestampList) external` -Deposits multiple deposits for the caller. The values at each index in each array will be combined to create a single deposit. +负责为来访者存入多笔存款。每个数组中每个索引的值将被合并以创建单个存款。 -- `amountList`: An array of the amounts of `stablecoin` to deposit. The caller should have already approved the contract to spend this much `stablecoin` before calling this function. Scaled by \(10^{stablecoinDecimals}\). -- `maturationTimestampList`: An array of the Unix timestamps at and after which the deposits will be able to be withdrawn. In seconds. +- `amountList`:要存入的`stablecoin`数量的数组。在调用此函数前,来访者应该已经认可了支出这么多`stablecoin`的合同。计算公式为\(10^{stablecoinDecimals}\)。 +- `maturationTimestampList`:Unix时间戳数组,记录存款时间,以秒为单位,失效即期满。 -###### Input size limit +###### 输入大小限制 -The maximum recommended number of deposits is 20. +建议的最大存款数为20。 ##### `function multiWithdraw(uint256[] calldata depositIDList) external` -Withdraws multiple deposits for the caller. The caller must own the deposit NFTs with IDs in `depositIDList`. +负责为来访者取出多笔存款。来访者必须拥有ID为`depositIDList`中的存款NFT。 -- `depositIDList`: The indices of the deposits to be withdrawn in the `deposits` array plus 1. +- `depositIDList`:`deposits`数组中要提取的各笔存款的索引加1。 +- `fundingID`: 在`fundingList`数组中为利息赤字供资的债券买家的索引加1。可以使用我们的[subgraph](https://thegraph.com/explorer/subgraph/bacon-labs/eighty-eight-mph)找到该ID。 -###### Input size limit +###### 输入大小限制 -The maximum recommended number of deposits is 100. +建议的最大存款数为100。 -###### Important note +###### 注意事项 -Withdrawing may fail if the 88mph pool has failed to generate enough interest from the underlying money market to cover the deficit incurred by the original upfront interest payout, and no one has funded the difference. This is the main risk of depositing into 88mph. If withdrawing actually fails, `earlyWithdraw()` may be called to get back the deposit minus the upfront interest and fee. +如果88mph流动池在基础收益市场中无法产生足额利息来偿算承诺给用户的利息,并且也没人买债券来补足差额,那么取款则有可能失败。这是在88mph平台上投资的主要风险。如果取款失败,`earlyWithdraw()`程序可能被唤醒从本金中扣除前一阶段预付的利息和费用。 ##### `function multiEarlyWithdraw(uint256[] calldata depositIDList) external` -Withdraws multiple deposits for the caller, before the maturation timestamp. The caller must own the deposit NFTs with IDs in `depositIDList`. +负责在存期未满时为来访者取出多笔存款。来访者必须拥有ID为`depositIDList`中的存款NFT。 -- `depositIDList`: The indices of the deposits to be withdrawn in the `deposits` array plus 1. +- `depositIDList`: `deposits`数组中要提取的各笔存款的索引加1。 +- `fundingIDList`: 在`fundingList`数组中为多笔利息赤字供资的债券买家的索引加1。可以使用我们的[subgraph](https://thegraph.com/explorer/subgraph/bacon-labs/eighty-eight-mph)找到ID。 -###### Input size limit +###### 输入大小限制 -The maximum recommended number of deposits is 50. +建议的最大存款数为50。 ##### `function fundAll() external` -Allows the caller to fund all of the existing deficit of the 88mph pool. In exchange, the caller receives a funding NFT, and the interest generated by the deposits the caller funded will be sent to the owner of the NFT whenever a deposit they funded is withdrawn. +允许来访者为88mph池中的所有现有赤字提供资金。作为交换,来访者会收到一笔NFT资金,只要来访者所资助的存款被储户取出,该笔资助就会填补利息赤字发放给相应的储户。 -Before calling this function, the caller must approve at least the deficit amount of `stablecoin` to the `DInterest` contract. This amount may be obtained using [`surplus()`](#function-surplus-external-view-returns-bool-isnegative-uint256-surplusamount). To avoid the transaction being reverted, it is recommended to simply set the approval amount to \(2^{256}-1\). +在调用此函数之前,来访者必须至少批准`stablecoin`的赤字金额到`DInterest`合约。 可以使用[`surplus()`](#function-surplus-external-view-returns-bool-isnegative-uint256-surplusamount)获得此金额。为避免交易被还原,建议您将批准金额简单地设置为\(2^{256}-1\)。 ##### `function fundMultiple(uint256 toDepositID) external` -Allows the caller to fund the deficit of multiple deposits. In exchange, the caller receives a funding NFT, and the interest generated by the deposits the caller funded will be sent to the owner of the NFT whenever a deposit they funded is withdrawn. +允许来访者为多笔存款的赤字提供资金。作为交换,来访者会收到一笔NFT资金,只要来访者所资助的存款被储户取出,该笔资助就会填补利息赤字发放给相应的储户。 -Before calling this function, the caller must approve at least the deficit amount of `stablecoin` to the `DInterest` contract. This amount may be obtained using [`surplusOfDeposit()`](#function-surplusofdeposituint256-depositid-external-view-returns-bool-isnegative-uint256-surplusamount). To avoid the transaction being reverted, it is recommended to simply set the approval amount to \(2^{256}-1\). +在调用此函数之前,来访者必须至少批准`stablecoin`的赤字金额到`DInterest`合约。 可以使用 [`surplusOfDeposit()`](#function-surplusofdeposituint256-depositid-external-view-returns-bool-isnegative-uint256-surplusamount)获得此金额。为避免交易被还原,建议您将批准金额简单地设置为\(2^{256}-1\)。 -- `toDepositID`: Deposits with ID from (not including) `lastFundedDepositID` to (including) `toDepositID` will be funded. +- `toDepositID`: ID从(不包括) `lastFundedDepositID`到(包括)`toDepositID`的存款将会得到资助。 -#### Read only functions +#### 只读函数 ##### `function getDeposit(uint256 depositID) external view returns (uint256 amount, uint256 maturationTimestamp, uint256 initialDeficit, uint256 initialMoneyMarketIncomeIndex, bool active)` -Returns info about a user deposit. The owner of the deposit is whichever Ethereum account that owns the ERC721 deposit token with id `depositID`. +负责返回有关用户存款的信息。存款所有者是拥有ID为`depositID`的ERC721存款代币的以太坊账户。 -###### Inputs +###### 输入值 -- `depositID`: The index of the deposit in the `deposits` array. +- `depositID`:`deposits`数组中的存款索引。 -###### Returns +###### 返回值 -- `amount`: The amount of the deposit, in stablecoins. Scaled by \(10^{stablecoinDecimals}\). -- `maturationTimestamp`: The Unix timestamp at and after which the deposit will be able to be withdrawn. In seconds. -- `interestOwed`: The initial debt caused by the deposit. -- `initialMoneyMarketIncomeIndex`: The value returned by [`moneyMarket.incomeIndex()`](#function-incomeIndex-external-returns-uint256) at the time of deposit. -- `active`: `true` if the deposit hasn't been withdrawn, `false` otherwise. -- `finalSurplusIsNegative`: `true` if at the time of withdrawal the deposit had a negative surplus, `false` otherwise. -- `finalSurplusAmount`: The amount of surplus/debt of the deposit at the time of withdrawal. -- `mintMPHAmount`: The amount of MPH tokens minted to the user at the time of deposit. +- `amount`:存入的稳定币数量。计算公式为\(10^{stablecoinDecimals}\)。 +- `maturationTimestamp`: Unix时间戳,记录存款时间,以秒为单位,失效即期满。 +- `interestOwed`: 承诺该存款的初始利息。 +- `initialMoneyMarketIncomeIndex`: 在存期内由[`moneyMarket.incomeIndex()`](#function-incomeIndex-external-returns-uint256) 返回的实际值。 +- `active`: 如未取存款则为`true`, 反之则为`false`. +- `finalSurplusIsNegative`:如果提款时存款有负债则为 `true`,反之则为`false`。 +- `finalSurplusAmount`: 提款时存款的负债金额。 +- `mintMPHAmount`: 存款时为用户铸造的MPH令牌数量。 ##### `function getFunding(uint256 fundingID) external view returns (uint256 fromDepositID, uint256 toDepositID, uint256 recordedFundedDepositAmount, uint256 recordedMoneyMarketIncomeIndex)` -Returns info about a funding. The owner of the funding (and the account who will receive the interests) is whichever Ethereum account that owns the ERC721 funding token with id `fundingID`. +返回有关债券的信息。债券所有者(以及将获得利息的帐户)是拥有ID为`fundingID`的ERC721债券代币的以太坊帐户。 -###### Inputs +###### 输入值 -- `fundingID`: The index of the funding in the `fundingList` array. +- `fundingID`:`fundingList`数组中的债券索引。 -###### Returns +###### 返回值 -- `fromDepositID`: Deposits with ID from (not including) `fromDepositID` to (including) `toDepositID` have their deficits funded by this funding instance. -- `toDepositID`: Deposits with ID from (not including) `fromDepositID` to (including) `toDepositID` have their deficits funded by this funding instance. -- `recordedFundedDepositAmount`: The current total deposit amount that is generating interest for the owner of this funding instance, in stablecoins. Scaled by \(10^{stablecoinDecimals}\). -- `recordedMoneyMarketIncomeIndex`: The value returned by [`moneyMarket.incomeIndex()`](#function-incomeIndex-external-returns-uint256) at the time of the latest withdrawal of a deposit funded by this funding instance. If no funded deposit has been withdrawn yet, this value is equal to the monet market incomeIndex at the time of the funding instance's creation. +- `fromDepositID`: ID从(不包括)`fromDepositID`到(包括)`toDepositID`的利息赤字由该债券提供资金。 +- `toDepositID`: ID从(不包括)`fromDepositID`到(包括)`toDepositID`的利息赤字由该债券提供资金。 +- `recordedFundedDepositAmount`: 该债券所有者所资助利息的总存款数目,以稳定币表示。 计算公式为\(10 ^ {stablecoinDecimals} \)。 +- `recordedMoneyMarketIncomeIndex`:在该债券所资助的存款最近一次被提取时,[`moneyMarket.incomeIndex()`](#function-incomeIndex-external-returns-uint256)返回的值。如果尚未提取任何存款,则该值等于购买债券时的货币市场收入指数。 ##### `function MinDepositPeriod() external view returns (uint256)` -Returns the minimum deposit period, in seconds. +返回最短存款期限,以秒为单位。 ##### `function MaxDepositPeriod() external view returns (uint256)` -Returns the maximum deposit period, in seconds. +返回最长存款期限,以秒为单位。 ##### `function MinDepositAmount() external view returns (uint256)` -Returns the minimum deposit amount for a single deposit in `stablecoin`. Scaled by \(10^{stablecoinDecimals}\). +返回单笔`stablecoin`(稳定币)存款的最小存款额。 计算公式为\(10 ^ {stablecoinDecimals} \)。 ##### `function MaxDepositAmount() external view returns (uint256)` -Returns the maximum deposit amount for a single deposit in `stablecoin`. Scaled by \(10^{stablecoinDecimals}\). +返回单笔`stablecoin`(稳定币)存款的最大存款额。 计算公式为\(10 ^ {stablecoinDecimals} \)。 ##### `function totalDeposit() external view returns (uint256)` -Returns the total deposited amount of `stablecoin`. Scaled by \(10^{stablecoinDecimals}\). +返回`stablecoin`的总存款金额。 计算公式为\(10 ^ {stablecoinDecimals} \)。 ##### `function moneyMarket() external view returns (address)` -Returns the address of `MoneyMarket`. +返回`MoneyMarket`的地址。 ##### `function stablecoin() external view returns (address)` -Returns the address of the stablecoin used. +返回所用稳定币的地址。 ##### `function feeModel() external view returns (address)` -Returns the address of `FeeModel`. +返回`FeeModel`的地址。 ##### `function interestModel() external view returns (address)` -Returns the address of `InterestModel`. +返回`InterestModel`的地址。 ##### `function interestOracle() external view returns (address)` -Returns the address of `InterestOracle`. +返回`InterestOracle`的地址。 ##### `function depositNFT() external view returns (address)` -Returns the address of the ERC721 deposit token. +返回ERC721存款代币的地址。 ##### `function fundingNFT() external view returns (address)` -Returns the address of ERC721 funding token. +返回ERC721债券代币的地址。 ##### `function calculateInterestAmount(uint256 depositAmount, uint256 depositPeriodInSeconds) external view returns (uint256 interestAmount)` -Returns the interest amount given the deposit amount and period. +返回给定存款金额和期限的利息金额。 -###### Inputs +###### 输入值 -- `depositAmount`: The amount of the deposit in `stablecoin`. Scaled by \(10^{stablecoinDecimals}\). -- `depositPeriodInSeconds`: The length of the deposit's deposit period, in seconds. +- `depositAmount`:`stablecoin`存款金额。计算公式为\(10^{stablecoinDecimals}\)。 +- `depositPeriodInSeconds`: 存款时长,以秒为单位。 ##### `function surplus() external view returns (bool isNegative, uint256 surplusAmount)` -Returns the surplus value of the pool over the owed deposits. +返回池中现有存款数的利息。 -###### Returns +###### 返回值 -- `isNegative`: Whether the surplus is negative. A negative surplus means there's a deficit. -- `surplusAmount`: Amount of the pool's surplus, in stablecoins. Scaled by \(10^{stablecoinDecimals}\). +- `isNegative`: 盈余是否为负。 盈余为负表示存在赤字。 +- `surplusAmount`: 池中现有存款的盈余数,以稳定币表示。计算公式为\(10^{stablecoinDecimals}\)。 ##### `function surplusOfDeposit(uint256 depositID) external view returns (bool isNegative, uint256 surplusAmount)` -Returns the surplus value of a particular deposit. Does not include funding. +返回某笔特定存款的盈余数目。不包括债券。 -###### Inputs +###### 输入值 -- `depositID`: The index of the deposit to be withdrawn in the `deposits` array plus 1. +- `depositID`:要提取的存款索引,在 `deposits`数组中加1。 -###### Returns +###### 返回值 -- `isNegative`: Whether the surplus is negative. A negative surplus means there's a deficit. -- `surplusAmount`: Amount of the pool's surplus, in stablecoins. Scaled by \(10^{stablecoinDecimals}\). +- `isNegative`: 盈余是否为负。 盈余为负表示存在赤字。 +- `surplusAmount`: 池中现有存款的盈余数,以稳定币表示。计算公式为\(10^{stablecoinDecimals}\)。 ##### `function depositsLength() external view returns (uint256)` -Returns the length of the `deposits` array. +返回`deposits`数组的长度。 ##### `function fundingListLength() external view returns (address)` -Returns the length of the `fundingList` array. +返回`fundingList`数组的长度。 ##### `function depositIsFunded(uint256 depositID) external view returns (bool)` -###### Inputs +###### 输入值 -- `depositID`: The index of the deposit to be withdrawn in the `deposits` array plus 1. +- `depositID`:要提取的存款索引,在`deposits`数组中加1。 -###### Returns +###### 返回值 -Returns whether or not the deposit's deficit has been funded. +返回是否已为存在赤字的存款提供资金。 ##### `function latestFundedDepositID() external view returns (uint256)` -Returns the maximum ID among funded deposits. It can be assumed that all deposits with ID less than or equal to this value have been funded. +返回资金存款中的最大ID值。 可以假设所有ID小于或等于此值的存款都已被资助。 ##### `function unfundedUserDepositAmount() external view returns (uint256)` -Returns the deposited `stablecoin` amount whose deficit hasn't been funded. Scaled by \(10^{stablecoinDecimals}\). +返回未填补赤字的`stablecoin`(稳定币)存款金额。计算公式为\(10 ^ {stablecoinDecimals} \)。 -### FeeModel +### 费用模型(FeeModel) -#### Read only functions +#### 只读函数 ##### `function getFee(uint256 _txAmount) external pure returns (uint256 _feeAmount)` -Used for determining how much fee to charge from a transaction. +用于确定从交易中收取多少社区服务费。 -###### Inputs +###### 输入值 -- `_txAmount`: The amount of the transaction from which a fee will be taken. +- `_txAmount`: 待收费的该笔利息金额。 -###### Returns +###### 返回值 -- `_feeAmount`: The amount of the fee that will be taken from the transaction. +- `_feeAmount`: 从交易中收取的费用金额。 ##### `function beneficiary() external view returns (address)` -Returns the address who will receive the fees. +返回将收取费用的地址。 -### MoneyMarket +### 货币市场 -#### State changing functions +### 状态变化函数 ##### `function deposit(uint256 amount) external` -Lends `amount` stablecoins to the underlying money market protocol. +放入基础货币市场的稳定币`amount`(数量)。 -###### Inputs +###### 输入值 -- `amount`: The amount of stablecoins to be deposited. +- `amount`:要存入的稳定币数量。 ##### `function withdraw(uint256 amountInUnderlying) external` -Withdraws `amountInUnderlying` stablecoins from the underlying money market protocol. +从基础货币市场中提取`amountInUnderlying`稳定币。 -###### Inputs +###### 输入值 -- `amountInUnderlying`: The amount of stablecoins to be withdrawn. +- `amountInUnderlying`:要提取的稳定币数量。 -#### Read only functions +#### 只读函数 ##### `function totalValue() external returns (uint256)` -Returns the total value locked in the money market, in terms of the underlying stablecoin. Scaled by \(10^{stablecoinDecimals}\). +返回货币市场的现有稳定币总值。 ##### `function incomeIndex() external returns (uint256)` -Returns an index that can be used to compute the interest generated by the money market over a period of time. Specifically, \(interestOverPeriod = depositValueAtBeginningOfPeriod \times \frac{incomeIndexAtEndOfPeriod}{incomeIndexAtBeginningOfPeriod}\). +返回一个指数,该指数可用于计算一段时间内货币市场产生的利息。具体来说,计算公式为\(interestOverPeriod = depositValueAtBeginningOfPeriod \ times \ frac {incomeIndexAtEndOfPeriod} {incomeIndexAtBeginningOfPeriod} \)。