Technology
An overview of XChains Protocol with an innovative approach for security and transaction confirmation speed
Last updated
An overview of XChains Protocol with an innovative approach for security and transaction confirmation speed
Last updated
XChains Protocol is empowered by an innovative approach to address the security risk and cross-chain transaction confirmation time of the existing cross-chain bridges, by using:
: Decentralize the liquidity pools to avoid the single point of failures and to diminish the attach aftermath of shared liquidity pools-based cross-chain bridges.
: Enables atomic swaps and cross-chain trading without the need for a trusted third party, which in result enhance security and cross-chain transaction confirmation speed.
Alongside with the private liquidity pool contracts and HTLCs, XChains also has other supplement components such as a relay network or oracle to facilitate the cross-chain communication and bridge contracts to coordinate cross-chain operations, verifies transfer requests, and communicates with event listeners or oracles.
Deposit and Lock:
User 1 deposits 1BTC into their private pool contract on Chain A.
The private pool contract locks 1BTC and emits a transfer request event containing the details of the intended transfer (sender_address, send_amount, send_token, , receiver_address)
to Chain B.
Emit Transfer Request:
The private pool contract locks the 1BTC and emits a transfer request event that is captured by an oracle or cross-chain messaging protocol.
2. Cross-Chain Communication
Event Relay:
The oracle or cross-chain messaging protocol relays the transfer request event from Chain A to Chain B.
The event includes details such as (sender_address, send_amount, send_token, , receiver_address)
on Chain B.
3. Chain B (Destination Chain) Process
Verify and Unlock:
The bridge contract on Chain B receives and verifies the transfer request using the relayed event.
Upon successful verification, the bridge contract instructs User 3’s private pool contract to unlock the 1BTC directly to User 3's wallet.
if User 3's private pool doesn't have sufficient fund of 1BTC, the bridge contract instructs other's private pool which meets the fund of 1BTC to perform a cross-chain swap by using HTLCs - Atomic Swap Protocol between two private pools from User 4's to User 3's for example.
Prevent Unauthorized Unlocking:
Implement multi-signature oracles to validate the transfer request before the bridge contract instruct the corresponding private pool to release the token or process further such as asking for the fund through out all of the private pools in the chain.
Use time-locked contracts or additional authentication steps to ensure the legitimacy of the transfer request.
Confirm Transfer:
After unlocking and , a confirmation event is sent back to Chain A to update the status of the transfer.
Shared Liquidity Pools can be used to swap the requested token (BTC in this case) if User 3's private pool does have enough BTC.
In our innovative cross-chain bridge solution, we also introduce a significant enhancement by leveraging the concept of reverse transaction handling between chains. This improvement is designed to optimize the efficiency and speed of cross-chain transactions, particularly in scenarios where symmetrical transfers occur between two chains.
Concept Overview: The core idea is to monitor and detect pairs of transactions involving the same token or the same pair of tokens where one transaction involves a transfer from Chain A to Chain B, and a corresponding reverse transaction occurs from Chain B to Chain A. By identifying these symmetrical or reverse transactions, the bridge contracts on each chain can optimize the transaction process, reducing the need for redundant operations and minimizing the overall network load.
Mechanism:
Transaction Pair Detection: When a transaction request is made on Chain A to transfer tokens to Chain B, the bridge contract on Chain A checks the transaction pool and history for any pending or recently completed reverse transactions from Chain B to Chain A involving the same token and amount.
Optimized Handling: If a reverse transaction is detected, the bridge contracts on both chains can effectively "cancel out" the two transactions, treating them as a net-zero movement of assets. This results in the immediate settlement of both transactions without the need to process them independently.
Resource Efficiency: By handling reverse transactions in this manner, the system reduces the number of cross-chain operations that need to be fully executed, saving on gas fees, reducing latency, and alleviating network congestion.
Security Considerations: The use of Hash Time-Locked Contracts (HTLCs) remains integral to ensuring that all transactions are securely validated and that the "cancellation" of reverse transactions is only performed when cryptographic proofs are fully verified.
Benefits:
Reduced Costs: Users save on gas fees by avoiding redundant transaction processing.
Faster Settlements: Transactions are settled more quickly since the system does not require full cross-chain validation for symmetrical transactions.
Lower Network Congestion: By reducing the number of transactions that need to be broadcast and confirmed across multiple chains, overall network congestion is minimized.