Binance Chain, like any other decentralized exchange, faces the eternal problem that has been plaguing DEXs for ages:
So far the following solutions to this problem have been implemented:
Overall, these previous solutions are not perfect, as they either require a high level of trust in a centralized entity (Custodian Model) or have many drawbacks (Atomic Swaps).
For these reasons, Binance came up with the BEP3 peg, a new kind of peg for tokens that come from Smart contract enabled chains, such as Ethereum, EOS or NEO.
BEP3 pegs draw inspiration from atomic swaps to construct a mechanism that takes the Custodian Model and strips away the trust required in some parts of the system.
If you’d like to learn more about atomic swaps and how they work check out this article, but no knowledge of them is required to understand the rest of this article.
But enough talking, let’s look at the mechanism itself:
BEP3 maintains the figure of a deputy, who is in charge of initially creating a new token inside Binance Chain and deploying a smart contract in the other chain. Afterwards, whenever a user wants to port their tokens over to Binance Chain the following steps are taken:
Once the user wants to redeem their pegged tokens for real ones the process can be reverted, the steps are reproduced here for the sake of completion but if this is trivial for you feel free to skip to the next section or just look at the diagram:
To learn more about BEP3 check out the original BEP and it’s official documentation page