, 34 tweets, 4 min read Read on Twitter
Bytom Cross-chain Technology from @Bytom_Official
With the official launch of Bystack main-side chain architecture, the cross-chain issue between mainchain and sidechain has been the major problem for Bytom team.
Now Bytom has adopted two mechanisms for the cross-chain issue.
Bytom Cross-chain types

The cross-chain models of Bytom adopt Notary Scheme and Hash-locking.
There are no assets on sidechain Vapor so that we use the Notary Scheme to transfer assets from mainchain to sidechain.
Meanwhile, Notary Scheme needs time to sign and confirm so we use hash-locking to accelerate the transfer of the assets.
Notary Scheme

If you have participated in Bystack BP voting, you won’t be strange about cross-chain of Bytom. You can realize one-click cross-chain in Bycoin wallet.
So what’s the principle behind the Notary Scheme? Let’s ignore the technical details, the core point is the value generation and burn, interface communication between asset custody and the main-side chain.
When you transfer assets from mainchain to sidechain, you need to create corresponding assets on sidechain; Vice Versa, you need to burn corresponding assets on sidechain
if you want to transfer your assets from sidechain to mainchain, these are the generation and destruction of value.
While cross-chain from mainchain to sidechain The assets of the main chain need to be in custody. In order to ensure security, we usually adopt multi-sig and separation of large assets.
Validator: BPs of sidechain
Collector: Monitor the transaction in the Federation contract address, collect transactions on mainchain and create equal assets on sidechain, monitor the sidechain cross-chain request,
burn the assets on the sidechain and release equal assets on the mainchain.
Federation address: Multi-sig address generated by Federation members’ public key
What if users click cross-chain?

From mainchain to sidechain:

Collector monitors the Federation address of mainchain have received a transfer
Collector waits for pending on the mainchain until the transaction can't be reversed
Collector creates equal assets on the sidechain and confirms it through multi-sig, then transfer to the sidechain addresses of users
Users can acquire assets on sidechain
From sidechain to mainchain:

Collector monitors a transaction to destroy assets

Collector waits for pending on the sidechain
Collector send equal assets from Federation address, confirms it through multi-sig

Users can acquire assets on mainchain
Hash-locking

Hash-locking is a mechanism by which the user guesses the original value of the hash value within a specified period of time.
On the basis of the smart contract, both parties lock the asset first, and if both parties input the original value of the correct hash value in a limited time, the transaction can be completed.
Through the Notary Scheme, the assets of Bytom can be transferred to the side chain, and the assets of Bytom and the sidechain can be directly exchanged through the hash time lock.
For example, if you have BTC on the mainchain and I have ETH on the side chain, if I use the Notary Scheme, I need to transfer BTC to the sidechain or the ETH to the mainchain, so that the exchange can be made.
With the hash-lock mechanism, you can directly send the assets on my mainchain, and you can send the assets on the sidechain to me, and guarantee the atomicity and safety of the whole process.
Process:

User A wants to exchange the BTC on the mainchain with the ETH of user B on the sidechain
A opens a smart contract on the mainchain and sets up Hash-locking H and a time-locking T. A can get his BTC back beyond the time.

A gives the H to B and B can use the same hash to open a smart contract on the sidechain and set time-locking t.
A and B check their own contract

After confirming the smart contract, A uses the original hash value to unlock the sidechain smart contract of B within t and gets the ETH.
Once A unlocks the smart contract of B, the original hash value will be shown and B gets the original hash value and B can unlock the smart contract of A’s mainchain and get BTC

Assets exchange completed.
The Bystack cross-chain tech is being optimized over and over. We can realize the high-performance of sidechain and circulate the different types of assets on the sidechain.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Alagbe Adedeji Simon
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!