The Meson Protocol
In order to enable fast and low-cost circulation of tokens between any public chains, we propose the Meson protocol, which differs from the HTLC-based atomic swap in the following ways.
- We recommend the party that matches a swap lock their token assets in a liquidity pool in advance, as demonstrating the willingness to transact. Therefore, the initiator of a swap (usually the user) can be matched quickly. We refer to the matching party as the Liquidity Provider (LP);
- Waive blockchain network fees (gas fee) for users by using the technique of meta transactions;
- Using signatures as the credential to unlock transactions, thus avoiding the security risks from unsafe random number generators and hash collisions.
There are three major stages in a swap on Meson.
- Preparation stage: In the preparation stage, LPs can deposit tokens they are willing to provide for cross-chain swap into the liquidity pool in the Meson contract in advance to ensure liquidity during a swap.
- Swap stage: A user who wants to do cross-chain token swap can complete the process with an LP without the need of using bridges. Therefore, this process would be fast and inexpensive.
- Rebalance stage: After the LP has accumulated a certain amount of swaps, he can go through the rebalance stage if he wants to adjust his fund pool sizes on different chains. In this stage, other long-term cross-chain methods (bridges, exchanges, etc) can be used to perform the actual cross-chain transfer of assets. However, this process is not time-sensitive, and because LPs can accumulate many swaps and perform a single cross-chain operation in a unified manner, it also saves cross-chain fees.
Users’ swap requests can be better matched with our improved HTLC scheme. Similar to atomic swap, both parties swap their assets on two chains in Meson's process. For the user, it is equivalent to getting tokens directly at the destination chain with fast confirmation and no cross-chain facility fees.
For LPs, using the Meson protocol also provides better capital utilization efficiency - LPs can choose to provide one pool of funds for one-way swap, two pools for swaps between two tokens, or
npools for swaps between
ntokens. The last scenario requires
n(n-1)/2transaction pairs if implemented by one-to-one cross-chain bridges, which means
n(n-1)pools are involved.
Meson smart contracts are implementations of the Meson protocol and can be written in any language, including Solidity, Rust, C++, etc. This means that the Meson protocol not only supports various EVM-compatible public chains but also non-EVM public chains and layer-2 networks. When supporting a new public chain, implementation and deployment of the Meson smart contract on that chain will automatically enable token swaps between the new chain and all previous chains. As the number of public chains grows, the workload of Meson to support multiple chains grows linearly, compared to the quadratic difficulty growth of connecting multiple chains with cross-chain bridges.
To summarize, the Meson protocol for cross-chain swaps has several advantages.
- Connectivity: Cross-chain swaps can be done on any two chains without the need for a direct cross-chain bridge connection between the two;
- Compatibility: The two chains involved in a swap can be any public chain that can execute smart contracts and does not require EVM compatibility;
- Cost: During the swap process, the user does not need to pay the gas fee for the blockchain network; this fee are paid by LP;
- Time: The swap is completed only by waiting for the confirmation of the contracts on chains X and Y. There is no need to wait for cross-chain bridge confirmation. If the confirmation time for both X and Y chains is short, cross-chain swaps can be done quickly;
- Security: Meson does not rely on cross-chain services such as cross-chain bridges and oracles during the swap stage, so it is not affected by security issues of third-party services.