BTTC utilizes side chains to achieve blockchain scalability and adopts a bi-directional anchored cross-chain bridge to establish connection and interoperability with the mainnet.
During deposits, the assets on the main chain are locked, while corresponding assets are issued on the side chain. In the case of withdrawals, the assets on the side chain are burned, and the equivalent assets on the main chain are unlocked.
Implementation
BTTC uses a proof of stake (POS) mechanism and deploys multi-node validation. It leverages sidechains to scale smart contracts and ensure compatibility with Ethereum-based smart contracts and features.
Three-layered Architecture
Root Contract
Role
The root contract serves as the fundamental layer, providing core smart contract functionalities. It interacts with external blockchain networks and establishes basic rules and interfaces for cross-chain interactions.
How it works
The root contract identifies and handles requests from different blockchains using pre-defined smart contract rules. For instance, when a cross-chain asset transfer request is received, the root contract performs initial validation and processes the requests according to these rules.
Delivery
Role
Positioned in the middle, the delivery layer connects the preceding and succeeding layers, processing information from the root contract for seamless operations within the BTTC layer.
How it works
The delivery layer refines data formats received from the root contract. For example, when handling a cross-chain asset transfer request, it reformats the data into BTTC-compatible versions. This includes adding details like timestamps and transaction sequence numbers to ensure the data’s integrity and precision.
BTTC
Role
As the application’s top layer, the BTTC layer is user-facing and executes the final cross-chain actions and transactions. Utilizing the functions and processed information offered by the underlying layers, it executes essential tasks such as cross-chain asset transfer, transaction validation, and confirmation.
How it works
Upon receiving the processed information from the delivery layer, the BTTC layer performs actual asset-related operations accordingly. In the case of a cross-chain token transfer, BTTC validates the legitimacy of the transaction within its blockchain network and then updates the balance of the relevant account to complete the asset transfer. Additionally, this layer interacts with other components of the BTTC ecosystem, such as wallets and validators, to ensure the smooth execution of the entire cross-chain process.
RootChain <-> BTTC
Deposit Process
Deposit
The transaction initiator approves the corresponding Predicate contract on the root chain, authorizing it to consume tokens. This involves transferring tokens from the initiator’s account to the Predicate address to lock the tokens on the root chain.
The initiator calls the depositFor() method of RootChainManager.sol, which triggers the StateSynced event that includes relevant transaction details.
2. StateSynced
The StateSynced event is sent; the event contains information about the deposit transaction, such as the transaction’s initiator, the root token, and the child chain ID.
3. Fetch block
On BTTC, the onStateReceive() method of ChildChainManager.sol retrieves the block and executes related operations based on the event records.
Withdrawal Process
Withdraw
To initiate a withdrawal, the user calls the withdraw() method of the ChildToken.sol contract and receives the proof and other relevant information for the token involved after submitting the checkpoint.
2. Checkpoint
The delivery layer aggregates the blocks generated by BTTC into a Merkle tree and periodically publishes the Merkle root to the root chain. This regular publication is referred to as the submission of a checkpoint.
The delivery bridge syncs to the latest BTTC block header. Upon verifying the header and discovering the checkpoint submitted, the current proposer creates a corresponding checkpoint transaction for each root chain and sends the transaction info to the BTTC node.
These checkpoint transactions are packed into a block; once executed, a log for the EventTypeCheckpoint event is generated. Validators then conduct Precommit voting on the execution result, and only with votes from over two-thirds of the nodes is it considered valid.
Lastly, the checkpoint information is synchronized and stored in the RootChainStorage contract on the root chain.
3. Exit from the root contract
The exit process involves calling the exit method of the RootChainManager contract to unlock and receive the tokens from the ERC20Predicate contract. It needs to wait for the successful submission of the checkpoint containing the burn transaction, and proof of this burn needs to be provided.
RootChain <-> RootChain
Deposit assets into BTTC
Take WIN, a token that is natively deployed on TRON, as an example. When transferring 100 WIN from TRON to BSC, the TRON account signs and initiates a transaction to deposit the token into the BTTC network, resulting in 100 WIN deducted on TRON and 100 WIN_t minted on BTTC.
2. Withdraw assets from BTTC to other chains
To withdraw 100 WIN from BTTC to BSC, the user first performs “swapIn”, which deducts 100 WIN_t and mints 100 WIN_b. Next, the user executes “withdrawTo”, burning 100 WIN_b in the process and receiving 100 WIN on BSC.
The procedures for transferring assets between different root chains are similar; however, the specifics, such as the token contracts involved and the procedural details, will vary depending on the particular root chain and child token contract.
Technology
Advanced mechanism
BTTC employs a Proof of Stake (PoS) mechanism, implements multi-node validation, and leverages sidechains for the scaling of smart contracts. This approach not only fortifies network security and reliability but also boosts the efficiency of transaction processing.
2. Superior compatibility
BTTC is fully compatible with Ethereum-based smart contracts and features, which allows applications and developers from Ethereum to effortlessly migrate and utilize BTTC’s cross-chain capabilities, thereby reducing development costs and simplifying the process.
3. Intelligent design
BTTC is built on a three-tiered architecture consisting of the root contract layer, the validator layer, and the BTTC layer (also known as the block production layer). As each layer serves a unique function, this design guarantees the efficiency of system maintenance and upgrades.
The root contract layer handles various tasks, such as transaction collection and staking management. The validator layer verifies blocks and sends checkpoints, while the BTTC layer is responsible for block production. These layers work together to deliver robust cross-chain functionalities.
Cross-chain Connectivity
Flexible cross-chain approach
BTTC adopts a bi-directional anchored cross-chain bridge to establish connection and interoperability with the mainnet. This innovative approach facilitates seamless asset transfers across multiple chains and supports cross-chain connectivity for a wide array of tokens.
Here’s how it works: during deposits, the assets on the main chain are locked, while corresponding assets are issued on the side chain. In the case of withdrawals, the assets on the side chain are burned, and the equivalent assets on the main chain are unlocked. The entire procedure is straightforward and user-friendly.
2. Connectivity with multiple chains
BTTC now supports cross-chain interactions with root chains such as TRON, Ethereum, and BSC. Designed with adaptability at its core, the BTTC framework is ready to incorporate more public blockchains in the future. This will allow BTTC to manage asset transfers across diverse blockchains and embrace broader applications.
Security
Multi-node verification and state synchronization
BTTC deploys multiple nodes for verification and state synchronization (StateSync, Checkpoint). This design reduces the risk of asset loss that could arise from potential side chain malfunctions, as well as mitigates the likelihood of malicious activities from notaries and operating nodes on the side chain.
2. PoS consensus mechanism
By employing a Proof of Stake (PoS) consensus mechanism, the side chain achieves a high level of decentralization. Every transaction on the side chain requires Precommit votes, and the transaction results are validated only after receiving votes from over two-thirds of the nodes. This voting mechanism further ensures the safety and fairness of cross-chain transactions.
Comparison
BTTC vs. Polygon
Among public chains that facilitate cross-chain connectivity, Polygon currently only supports Ethereum, while BTTC offers broader adaptability by extending its support to TRON, Ethereum, and BSC.
2. BTTC vs. Cosmos
Cosmos operates much like a Layer-0 protocol, requiring users to adopt the network’s standards for cross-chain functionality. In contrast, BTTC employs a Layer-2 scaling solution, which not only slashes transaction costs but also bolsters blockchain scalability, offering a more comprehensive set of features.