In our Q&A series, we gather the questions most asked on Telegram, Reddit, Twitter, Steemit, etc... and try to provide the community with succinct, precise, and technically accurate answers. In this episode, Alexandre Bourget - Co-Founder at EOS Canada, walks us through how inter-blockchain communication works on the EOS network.
Hello everyone. I wanted to clear a few things up about inter-blockchain communication. There's been a lot of questions asked around, and I want to clarify a few things. especially regarding the mainnet, or a main net -- some people have been debating about that word.
So I want to explain how inter- blockchain communication works, and how it can interact with side chains.
Okay, so let's imagine we launched a mainnet which has the ERC 20 tokens. So a lot of people have a lot of tokens on there and someone launches another sidechain, which does not have the snapshot. There's no money issued over there. And then what we could do is with a pair of contracts, let's call that one here the "source network." Okay, where all the money is. And we'll call that one the "sidechain." And with the contract in here, and in here, you are able to send money to the contract in here. So the money's going to be sort of locked into that contract, right? The contract will not spend it. It'll keep it there, and with the proof of that transaction you can bring it on the other chain. And the other chain has a paired contract. It knows that it's coming from over there, and it's going to honour a transaction, and recognize this was really a transaction that happened on the "source network." It's going to take that transaction, and then you have all the information to unpack it.
So you know the source and destination, you know the amount of EOS that was transferred to that account - or even other currencies - and a contract to do many things. It could say I'm going to also give you, or print that contract, with "print EOS." And then you could transfer it to some other place, right? And so you could start using that money over there. But if you want to go back to the main network, or "the source network," you need to go back through the same contract, saying “okay I'm now going to burn those tokens.” So the contract will give you a proof that it has burnt the token, destroyed them, and you're going to bring that proof to the other smart contract. And the other smart contract has the block headers. They're constantly exchanging through some third party. They're like putting in there the block headers for one of the other chains, and that one will be able to say, "okay you really destroyed the the tokens on the other chain. I'm going to give you back those EOS that are locked in the contract."
So there's only one monetary base. Eventually block producers could be producing for the whole ecosystem, for many sidechains if it starts being worth it, but there would not be inflation on that other chain. Because it doesn't control the monetary base. Only the source chain would. So perhaps the block producer would be rewarded because the EOS ecosystem is growing and growing, also in number of chains. So that would still mean that you need to run servers to support the other chains, but I think that would make sense to have it all be paid off by those who are running the main chain, or the "source network" where the EOS token reigns supreme.