smartbnb

所属分类:区块链开发
开发工具:C#
文件大小:3156KB
下载次数:0
上传日期:2023-01-06 06:38:18
上 传 者sh-1993
说明:  通过与NEO的去中心化侧链桥在币安链上进行智能合约
(Smart contracts on Binance Chain via a decentralized sidechain bridge with NEO)

文件列表:
Contract (0, 2021-02-01)
Contract\components (0, 2021-02-01)
Contract\components\NEP5.cs (11471, 2021-02-01)
Contract\components\Sha512.cs (8272, 2021-02-01)
Contract\components\checkCompressed.cs (4259, 2021-02-01)
Contract\components\example_verifySignatureParams.cs (30071, 2021-02-01)
Contract\components\example_verifysignature.cs (23352, 2021-02-01)
Contract\smartBNB.sln (1097, 2021-02-01)
Contract\smartBNB (0, 2021-02-01)
Contract\smartBNB\Contract.cs (104316, 2021-02-01)
Contract\smartBNB\NEP5interest.py (1211, 2021-02-01)
Contract\smartBNB\Neo.SmartContract.Framework.dll (19968, 2021-02-01)
Contract\smartBNB\Properties (0, 2021-02-01)
Contract\smartBNB\Properties\AssemblyInfo.cs (1434, 2021-02-01)
Contract\smartBNB\contractInterface.md (4037, 2021-02-01)
Contract\smartBNB\costs.md (1116, 2021-02-01)
Contract\smartBNB\deployment.md (343, 2021-02-01)
Contract\smartBNB\smartBNB.csproj (820, 2021-02-01)
Contract\smartBNB\utils.py (14, 2021-02-01)
Contract\tests (0, 2021-02-01)
Contract\tests\compile.test.js (952, 2021-02-01)
Contract\tests\jest-puppeteer.config.js (112, 2021-02-01)
Contract\tests\jest.config.js (52, 2021-02-01)
Contract\tests\package-lock.json (205183, 2021-02-01)
Contract\tests\package.json (327, 2021-02-01)
LICENSE (1069, 2021-02-01)
collatClient (0, 2021-02-01)
collatClient\.eslintrc.js (895, 2021-02-01)
collatClient\Procfile (22, 2021-02-01)
... ...

# smartBNB > Smart contracts on Binance Chain via a decentralized sidechain bridge with NEO ## TL;DR SmartBNB is a project that enables Binance Chain tokens to trustlessly use smart contracts in the NEO blockchain through sidechains. ## What is smartBNB? SmartBNB is **a trustless bridge that enables tokens on Binance Chain to be transferred to Neo’s blockchain and back**. This enables tokens issued on Binance chain to use smart contracts in the Neo blockchain. As such, token issuers can benefit from Binance Chain’s DEX while taking advantage of Neo’s smart contracting capabilities. Sending tokens from Binance Chain to Neo is done by locking tokens on Binance Chain, at which point the same number of tokens are minted on Neo. Once tokens are minted on Neo, they can be used for Neo-based smart contracts. User can later redeem tokens by burning them and unlocking the original tokens on Binance Chain. A collateral-based system is used to ensure that, in the event of any irregularity, users are fully compensated. ## How does it work? Like sidechains, SmartBNB system employs a lock=mint and burn=unlock system. The protocol ensures the secure locking of tokens on Binance Chain by using fully-collateralized custodians. First, custodians have to deposit GAS tokens as collateral in a smart contract. These custodians can then receive and safekeep tokens from SmartBNB users who want to port tokens from Binance Chain to Neo. When a user sends tokens to a custodian on Binance Chain, they are locked in the custodian’s vault. The protocol then mints new tokens on Neo to represent the locked tokens and sends them to the user. Later, users can burn their Neo-based tokens to retrieve their original tokens on Binance Chain. The custodian is forced to send these tokens back to the users, as the custodian will lose his/her collateral if this doesn’t happen. Because of this collateral, which is set to be more than 150% of the locked tokens, the protocol is trustless. Custodians are heavily incentivized to behave honestly, as they will incur significant financial losses if they don’t. Users are fully protected from dishonest behavior by custodians, as their collateral would be given to affected users. Custodians are rewarded for their custodial services. Anyone can become a custodian by depositing Neo as a bond. For the first time, it is possible to receive a return on capital that is locked on the Neo blockchain. For more information, check out [our protocol specification](https://github.com/safudex/smartbnb/blob/master/protocol.md). ## Deploy smartBNB for your own token 1. Change the following constants inside [Contract.cs](./Contract/smartBNB/Contract.cs): - PriceOracle (you will need to generate the private key to be used in the oracle contract) - Denom - Name() - Symbol() 2. Deploy a full node along with [NeoPubSub](https://github.com/corollari/neo-PubSub) 3. Deploy the updated Contract.cs to MainNet or TestNet 4. Deploy a [price oracle for your token](https://github.com/corollari/neo-oracle) 5. Deploy a [collateral provider](./collatClient) 6. Deploy a [system that sends alerts on collateral liquidations](./liquidationAlertsBot) for arbitrageurs

近期下载者

相关文件


收藏者