How Does the Two-Way Peg Mechanism Work for a Sidechain?
The two-way peg is the mechanism that allows assets to be transferred between the main blockchain and the sidechain and back again. To move an asset to the sidechain, the asset is "locked" on the main chain.
A corresponding amount of the asset is then "unlocked" or minted on the sidechain. To move it back, the process is reversed: the asset is burned on the sidechain, and the original asset is unlocked on the main chain.
This peg ensures the supply of the asset remains consistent across both chains.