Gamma Protocol – 伽玛协议区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Gamma Protocol – 伽玛协议区块链毕设代写 是一篇很好的国外资料

Gamma Protocol Gamma Protocol - 伽玛协议 Gamma Protocol - 伽玛协议

Gamma is a decentralized capital efficient option protocol that enables sellers to create spreads. Gamma protocol enables any user to create arbitrary option tokens, that represent the right to buy or sell a certain asset in a predefined price (strike price) at or before expiry. As the option seller in Gamma, you can reduce the amount of capital locked in the system by creating spreads. (e.g Instead of putting down 100 USDC and mint 1 ETH-USDC-100 Put, you can buy a ETH-USDC-50 Put, and only deposit 50 USDC as collateral) The oTokens created by Gamma are cash settled European option, means all the options will automatically be exercised at expiry. A holder can redeem the proceeds by sending the oTokens back, the system will pay the holder the cash value based on strike price and underlying spot price at expiry, instead of actually exchanging the underlying asset and the strike asset.

Documentation

Our docs site is here. It contains tutorials, explainers, and smart contract documentation. If you’d like to view these docs on github instead, check out the docs folder in the docs repo:

  • Smart contracts documentation
  • UML diagrams
  • Control flow diagrams

Local Development Setup

For local development it is recommended to use ganache to run a local development chain. Using the ganache simulator no full Ethereum node is required.

As a pre-requisite, you need:

  • Node.js (v10.18.0)
  • NPM

Clone the project and install all dependencies:

$ git clone https://github.com/opynfinance/GammaProtocol.git $ cd GammaProtocol  # install project dependencies $ npm i

Compile all contracts:

$ npm run build

In a new terminal, launch an Ethereum RPC client, we use the default ganache-cli command to configure and run a local development ganache:

$ npm run ganache

Switch back to your other terminal and deploy the contracts, and make sure to to setup the deployments parameters in ./migrations/deployment-config.json file:

# Local deployment $ npm run deploy:development  # Mainnet deployment $ npm run deploy:mainnet

Running Tests

Run all unit tests:

$ npm run test:unit

Run all integration tests:

$ npm run test:integration

Scripts

Payable Proxy Contract Deployment

To deploy a new PayableProxyController.sol, it is recommended to use the deployPayableProxyController truffle script inside the scripts folder.

Input

truffle exec scripts/deployPayableProxyController.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --gas 50000000000

Output

Deploying payable proxy contract on mainnet 🍕 Payable proxy contract deployed! 🎉 Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX

Chainlink Pricer Deployment

To deploy a new ChainlinkPricer.sol, it is recommended to use the deployChainlinkPricer truffle script inside the scripts folder.

Input

truffle exec scripts/deployChainlinkPricer.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --oracle 0xef196aA0e3Cb8EA6d5720557C3B611Eff6OOOOOO --gas 50000000000

Output

Deploying chainlink pricer contract on mainnet 🍕 Chainlink pricer deployed! 🎉 Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX

Linting

Clean code is the best code, so we’ve provided tools to automatically lint your projects.

Lint all smart contracts:

$ npm run lint:sol

Lint all tests files:

$ npm run lint:tests

Automatically Fixing Linting Issues

We’ve also provided tools to make it possible to automatically fix any linting issues. It’s much easier than trying to fix issues manually.

Fix all smart contracts:

$ npm run lint:sol:prettier:fix

Fix all tests files:

$ npm run lint:tests:prettier:fix

Coverage

We use the solidity-coverage package to generate our coverage reports. You can find the coverage report at coveralls. Otherwise, you can generate it locally by running:

$ npm run coverage

The full report can be viewed by opening the coverage/index.html file in a browser.

Security And Bug Bounty Program

The security of the Opyn protocol is our highest priority. Our team has created a protocol that we believe is safe and dependable, and has been audited by OpenZeppelin. All smart contract code is publicly verifiable and we have a bug bounty for undiscovered vulnerabilities. We encourage our users to be mindful of risk and only use funds they can afford to lose. Options are complex instruments that when understood correctly can be powerful hedges. Smart contracts are still new and experimental technology. We want to remind our users to be optimistic about innovation while remaining cautious about where they put their money.

Please see here for details on our security audit and bug bounty program.


Gamma协议Gamma Protocol - 伽玛协议<Gamma Protocol>

Gamma是一种分散的资本有效期权协议,允许卖方创造利差。Gamma协议允许任何用户创建任意期权代币,该代币代表在到期时或到期前以预定义价格(执行价)买卖特定资产的权利。作为Gamma中的期权卖方,您可以通过创建价差来减少锁定在系统中的资金量。(例如,您可以购买ETH-USDC-50看跌期权,而不必先下注100美元C和mint 1 ETH-USDC-100看跌期权,只需存入50美元C作为抵押品)Gamma创建的期权是现金结算的欧式期权,意味着所有期权将在到期时自动行使。持有人可以通过发回债券来赎回收益,到期时系统将根据履约价格和标的现货价格向持有人支付现金价值,而不是实际交换标的资产和履约资产。

文档

我们的文档网站就在这里。它包含教程、解释程序和智能合约文档。如果您想在github上查看这些文档,请查看docs repo中的docs文件夹:

  • 智能合约文档
  • UML图
  • 控制流程图

本地开发设置

对于本地开发,建议使用ganache运行本地开发链。使用ganache模拟器不需要完整的以太坊eth节点。作为先决条件,您需要:

克隆项目并安装所有依赖项:

  • 节点.js(10.18.0版)
  • NPM

编译所有契约:

$ git clone https://github.com/opynfinance/GammaProtocol.git $ cd GammaProtocol  # install project dependencies $ npm i

在新终端中,启动以太坊ethRPC客户端,我们使用默认的ganache cli命令来配置和运行本地开发ganache:

$ npm run build

切换回您的其他终端并部署契约,并确保在./migrations/deployment中设置部署参数-配置.json文件:

$ npm run ganache

运行所有单元测试:

# Local deployment $ npm run deploy:development  # Mainnet deployment $ npm run deploy:mainnet

运行测试覆盖范围

运行所有集成测试:

$ npm run test:unit

部署新PayableProxyController.sol文件,建议使用脚本文件夹中的deployPayableProxyController块菌脚本。

$ npm run test:integration

安全和漏洞赏金计划

Payable Proxy Contract Deployment

输入

输出

truffle exec scripts/deployPayableProxyController.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --gas 50000000000

以部署新的链式价格表,建议在scripts文件夹中使用deployChainlinkPricer truffle脚本。

Deploying payable proxy contract on mainnet 🍕 Payable proxy contract deployed! 🎉 Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX

Chainlink Pricer Deployment

输入

输出

truffle exec scripts/deployChainlinkPricer.js --network mainnet --controller 0x7d78c401c69c56cb21f4bf80c53afd92be0BBBBB --pool 0xc02aaa39b223fe8d0a0e5c4f27ead9083c7AAaaa --weth 0x5f4eC3Df9cbd43714FE2740f5E3616155cAGAGAG --oracle 0xef196aA0e3Cb8EA6d5720557C3B611Eff6OOOOOO --gas 50000000000

干净的代码是最好的代码,因此我们提供了工具来自动lint您的项目。

Deploying chainlink pricer contract on mainnet 🍕 Chainlink pricer deployed! 🎉 Transaction hash: 0xebf12fc6603ee857bcabe1c0c6194XX82639a9888776f7ff6e83a409XXXXXXXX Deployed contract address: 0x669cC97687c792fc5369d7bdd38cXXXXXXXXXX

Linting

Lint all smart contracts:

Lint all tests files:

$ npm run lint:sol

我们还提供了一些工具,可以自动修复任何linting问题。这比手动解决问题容易得多。

$ npm run lint:tests

Automatically Fixing Linting Issues

修复所有智能合约:

修复所有测试文件:

$ npm run lint:sol:prettier:fix

我们使用solidity coverage包生成覆盖率报告。你可以在工作服处找到保险报告。否则,您可以通过运行以下命令在本地生成:

$ npm run lint:tests:prettier:fix

Coverage

通过打开覆盖范围可以查看完整报告/索引.html浏览器中的文件。

$ npm run coverage

Opyn协议的安全性是我们的首要任务。我们的团队已经创建了一个我们认为安全可靠的协议,并且已经过OpenZeppelin的审核。所有智能合约代码都是可公开验证的,对于未发现的漏洞,我们有一个bug奖励。我们鼓励用户注意风险,只使用能够承受损失的资金。期权是一种复杂的工具,如果理解正确,它可以成为强大的对冲工具。智能合约仍然是新的实验技术。我们希望提醒用户对创新持乐观态度,同时对资金投向保持谨慎。

Security And Bug Bounty Program

有关我们的安全审计和漏洞奖励计划的详细信息,请参见此处。

Please see here for details on our security audit and bug bounty program.

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/19881.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Gamma Protocol – 伽玛协议区块链毕设代写

提供最优质的资源集合

立即查看 了解详情