Omnichain reflections
Last updated
Last updated
To allow for fastest possible transmission of reflections across chains using LayerZero, we came up with a unique inter-chain communciation protocol.
A swap on a higher gas chain, e.g. Ethereum main net, is transmitted to all lower gas chains. At the same time, the lowest gas chain we are present on is asked for its local state. The lowest gas chain has always the most recent local state since it receives updates from all other chains. That makes it the perfect target for requests. The lowest gas chain (in our example Polygon) then answers to the chain that made the request with its current local state, which the higher gas chain integrates into its respective own local state.
That means in practice, that transactions happening on higher gas chains are always instantly transmitted to lower gas chains (due to the nature of inter-chain communication this might still take a few minutes to settle on all chains). Transactions happening on lower gas chains are reported to the higher gas chains as soon as a transaction happens on them again.
This architecture brings the benefit that users never thave to pay the fees of a higher gas chain when transacting on a lower gas chain, e.g. a BSC user never has to pay the gas fees of Ethereum main net. The higher gas chain users on the other hand barely notice the impact of e.g. the additional cost of a transaction on Polygon when paying for gas on Ethereum.
This enables maximum user experience with the least amount of delay involved, so that all chains are as close to the correct global state as possible.