DeFiOptions:实验性DeFi期权交易智能合约-源码

上传者: 42131728 | 上传时间: 2021-09-23 17:49:17 | 文件大小: 265KB | 文件类型: ZIP
DeFiOptions 实验性DeFi期权交易智能合约,可以买入和卖出标记,抵押,现金可设定的欧式期权的多头和空头头寸。 采取了一种动态的方法来确保写期权的抵押品,利用有利的开仓者的未平仓期权头寸来减少作为抵押品提供的所需总余额。 该交易所接受稳定币存款作为发行ERC20期权代币的抵押品。 基于的价格Feed提供了交易所链上的基础价格和波动率更新。 到期时,每份被清算,现金由信贷提供者的合约清算并销毁(通过selfdestruct )。 如果在结算期间任何期权发行人碰巧资金短缺,信贷提供者将登记债务并支付付款义务,实质上是执行借贷操作。 注册债务将产生利息,直到借款人偿还为止。 当借款人的任何一个开放式期权头寸到期并以现金结算时(未偿还的债务将从利润中扣除),付款会自动发生;或者如果借款人进行新的稳定币存款,则会自动进行付款。 未分配为抵押品的交易所的余额可以由各自所有者以稳定

文件下载

资源详情

[{"title":"( 74 个子文件 265KB ) DeFiOptions:实验性DeFi期权交易智能合约-源码","children":[{"title":"DeFiOptions-master","children":[{"title":".gitignore <span style='color:#111;'> 20B </span>","children":null,"spread":false},{"title":"truffle-config.js <span style='color:#111;'> 247B </span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'> 152.71KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 34.33KB </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"ci.yml <span style='color:#111;'> 651B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 25.33KB </span>","children":null,"spread":false},{"title":"diagram.PNG <span style='color:#111;'> 56.57KB </span>","children":null,"spread":false},{"title":"migrations","children":[{"title":"2_deploy_contracts.js <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"3_deploy_feeds.js <span style='color:#111;'> 293B </span>","children":null,"spread":false},{"title":"1_initial_migration.js <span style='color:#111;'> 126B </span>","children":null,"spread":false}],"spread":true},{"title":"contracts","children":[{"title":"pools","children":[{"title":"LinearLiquidityPool.sol <span style='color:#111;'> 9.99KB </span>","children":null,"spread":false}],"spread":true},{"title":"finance","children":[{"title":"OptionToken.sol <span style='color:#111;'> 1.70KB </span>","children":null,"spread":false},{"title":"RedeemableToken.sol <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"OptionsExchange.sol <span style='color:#111;'> 17.02KB </span>","children":null,"spread":false},{"title":"CreditProvider.sol <span style='color:#111;'> 6.56KB </span>","children":null,"spread":false},{"title":"OptionTokenFactory.sol <span style='color:#111;'> 519B </span>","children":null,"spread":false},{"title":"CreditToken.sol <span style='color:#111;'> 4.40KB </span>","children":null,"spread":false}],"spread":true},{"title":"interfaces","children":[{"title":"TimeProvider.sol <span style='color:#111;'> 106B </span>","children":null,"spread":false},{"title":"UnderlyingFeed.sol <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"AggregatorV3Interface.sol <span style='color:#111;'> 947B </span>","children":null,"spread":false},{"title":"LiquidityPool.sol <span style='color:#111;'> 630B </span>","children":null,"spread":false}],"spread":true},{"title":"Migrations.sol <span style='color:#111;'> 443B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"MoreMath.sol <span style='color:#111;'> 3.75KB </span>","children":null,"spread":false},{"title":"BlockTimeProvider.sol <span style='color:#111;'> 526B </span>","children":null,"spread":false},{"title":"ERC20.sol <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"SafeMath.sol <span style='color:#111;'> 5.10KB </span>","children":null,"spread":false},{"title":"Arrays.sol <span style='color:#111;'> 1019B </span>","children":null,"spread":false},{"title":"SignedSafeMath.sol <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false}],"spread":false},{"title":"deployment","children":[{"title":"Proxy.sol <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false},{"title":"Deployer.sol <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"ManagedContract.sol <span style='color:#111;'> 518B </span>","children":null,"spread":false}],"spread":false},{"title":"governance","children":[{"title":"Proposal.sol <span style='color:#111;'> 3.47KB </span>","children":null,"spread":false},{"title":"ProtocolSettings.sol <span style='color:#111;'> 7.06KB </span>","children":null,"spread":false},{"title":"GovToken.sol <span style='color:#111;'> 2.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"feeds","children":[{"title":"ChainlinkFeed.sol <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":".vscode","children":[{"title":"settings.json <span style='color:#111;'> 88B </span>","children":null,"spread":false}],"spread":true},{"title":"linear-liquidity-pool.PNG <span style='color:#111;'> 95.20KB </span>","children":null,"spread":false},{"title":"test","children":[{"title":"pools","children":[{"title":"LinearLiquidityPool","children":[{"title":"TestPoolShares.sol <span style='color:#111;'> 6.78KB </span>","children":null,"spread":false},{"title":"Base.sol <span style='color:#111;'> 3.71KB </span>","children":null,"spread":false},{"title":"TestQueryPool.sol <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"TestPoolTrading.sol <span style='color:#111;'> 7.27KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"finance","children":[{"title":"OptionsExchange","children":[{"title":"TestExpectedPayout.sol <span style='color:#111;'> 2.26KB </span>","children":null,"spread":false},{"title":"TestExchangeDeposit.sol <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"Base.sol <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"TestOptionIntrinsicValue.sol <span style='color:#111;'> 3.25KB </span>","children":null,"spread":false},{"title":"TestOptionTrading.sol <span style='color:#111;'> 7.53KB </span>","children":null,"spread":false},{"title":"TestWriteOptions.sol <span style='color:#111;'> 6.89KB </span>","children":null,"spread":false},{"title":"TestOptionLiquidation.sol <span style='color:#111;'> 5.55KB </span>","children":null,"spread":false}],"spread":false},{"title":"CreditToken","children":[{"title":"TestCreditTokenInterest.sol <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false},{"title":"Base.sol <span style='color:#111;'> 2.07KB </span>","children":null,"spread":false},{"title":"TestCreditTokenWithdraw.sol <span style='color:#111;'> 5.16KB </span>","children":null,"spread":false},{"title":"TestCreditTokenIssuance.sol <span style='color:#111;'> 1.45KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":".gitkeep <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"MoreMath","children":[{"title":"TestMoreMath.sol <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"deployment","children":[{"title":"Deployer","children":[{"title":"TestDeployer.sol <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"common","children":[{"title":"mock","children":[{"title":"AggregatorV3Mock.sol <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"EthFeedMock.sol <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"ManagedContractMock.sol <span style='color:#111;'> 725B </span>","children":null,"spread":false},{"title":"TimeProviderMock.sol <span style='color:#111;'> 777B </span>","children":null,"spread":false},{"title":"ERC20Mock.sol <span style='color:#111;'> 320B </span>","children":null,"spread":false}],"spread":false},{"title":"samples","children":[{"title":"ChangeInterestRateProposal.sol <span style='color:#111;'> 933B </span>","children":null,"spread":false}],"spread":false},{"title":"utils","children":[{"title":"MoreAssert.sol <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false}],"spread":false},{"title":"actors","children":[{"title":"CreditHolder.sol <span style='color:#111;'> 752B </span>","children":null,"spread":false},{"title":"PoolTrader.sol <span style='color:#111;'> 1.83KB </span>","children":null,"spread":false},{"title":"OptionsTrader.sol <span style='color:#111;'> 2.12KB </span>","children":null,"spread":false},{"title":"ShareHolder.sol <span style='color:#111;'> 789B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"governance","children":[{"title":"ProtocolSettings","children":[{"title":"testCastVote.sol <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"Base.sol <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"TestRegisterProposal.sol <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"testCloseProposal.sol <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"feeds","children":[{"title":"ChainlinkFeed","children":[{"title":"Base.sol <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"TestDailyVolatility.sol <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"TestDailyPrice.sol <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"TestFeedDeployment.sol <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明