The cross-chain models of Bytom adopt Notary Scheme and Hash-locking.
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.
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,
From mainchain to sidechain:
Collector monitors the Federation address of mainchain have received a transfer
Collector monitors a transaction to destroy assets
Collector waits for pending on the sidechain
Users can acquire assets on mainchain
Hash-locking is a mechanism by which the user guesses the original value of the hash value within a specified period of time.
User A wants to exchange the BTC on the mainchain with the ETH of user B on the sidechain
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.
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.
Assets exchange completed.