SunNetwork-v1.0.0
Sun Network Plan is the expansion plan for TRON main network ecosystem, including smart contract application oriented side-chain(DAppChain), cross-chain communication and other expansion projects.
DAppChain is the first product of Sun-network Project. It is compatible with TRON main-chain, and fully support smart contract with low consumption, high security and high efficiency.
Dapp-chain
Features:
Side-chain:
- Optimized lots of legacy logic.
- Implement reward adjust mechanism.
Optimize the latest java-tron (version 3.6) to support side-chain model:
- Implement 2 special token mint instructions for cross-chain deposit operations in TVM layer.
- Support new energy model for gateway contract.
- Remove trc10 token creation component.
- Remove exchange component.
- Changed transaction signature logic to avoid replay attack.
New incentive layer for sidechain:
- Introduce new concept "fund" to ecosystem incentive layer.
- Provide new system contract FundInject for donate TRX to witness incentive pool.
- Implement logic for block production rewards and chain owner rewards distribution from fund.
New proposals:
ID | Description |
---|---|
1000000 | Proposal for charge side-chain transaction fee switch. |
1000001 | Proposal for setting side-chain gateway address. |
1000003 | Proposal for setting proposal expire time. |
1000004 | Proposal for switch of witness vote. |
1000005 | Proposal for setting max-size of gateway transaction inputs. |
1000007 | Proposal for setting founder address of witness incentive pool. |
1000008 | Proposal for switch of witness rewards. |
1000009 | Proposal for setting minimum reward distribution duration. |
1000010 | Proposal for setting increasing percentage of witness incentive pool. |
Oracle
Implement cross-chain functionalities:
- Implement event listening component for mainchain gateway contract interaction.
- Implement event listening component for sidechain gateway contract interaction.
- Implement multi-signing functions of deposit, withdraw, and mapping actions for transaction status consensus.
- Multiple token type supported, including TRX, TRC10, TRC20, TRC721.
Token Safety:
- Add user authentication/authorization functionality for Oracle safety purpose.
- Add retry, status delay confirmation logic to handle unexpected exceptions.
SUN-SDK (JAVA)
Provide cross-chain interfaces:
- Provide map APIs to mapping TRC20/TRC721 Token from main-chain to a sidechain.
- Provide deposit APIs to migrate TRX/TRC10/TRC20/TRC721 assets from main-chain to a corresponding account on side-chain.
- Provide withdraw APIs to migrate TRX/TRC10/TRC20/TRC721 assets from side-chain to a corresponding account on main-chain.
sidechain-specific interface:
- Provide a special fundInject function to inject TRX into sidechain incentive pool.
mainchain interfaces:
- Provide basic APIs to interact with the mainchain, including asset transferring, proposal handling, exchanges, smart contract transactions, etc.
Js-sdk
-
Support deposit assets from mainchain to a sidechain, including depositTrx, depositTrc10, depositTrc20, depositTrc721 functions.
-
Support withdraw assets from a sidechain to the mainchain, including withdrawTrx, withdrawTrc10, withdrawTrc20, withdrawTrc721 functions.
-
Support approveTrc20 and approveTrc721, which should be used before depositTrc20 or depositTrc721.
-
Support mapping contract of TRC20 and TRC721 from mainchain to sidechain.
-
Support retry mechanism of token deposit, withdraw and mapping operation.
-
Inherit all functions of TronWeb
Sun-cli
A terminal wallet to interact with TRON mainchain and TRON sidechain.
View switch:
- Add a switch command for main-chain/side-chain view change.
More friendly functionalities on mainchain basing on wallet-cli:
- Basic interactive commands for mainchain basing on wallet-cli command interfaces.
- Mapping command: TRC20/TRC721 mapping.
- Deposit command: Migrate TRX/TRC10TRC20/TRC721 token to side-chain account.
Side chain view functionalities:
- Basic interactive commands for the mainchain basing on wallet-cli command interfaces.
- Withdraw command: Migrate TRX/TRC10TRC20/TRC721 token back to main-chain account.
- fundInject command: for witness node reward.
- Basic interactive commands for sidechain.