Meson (https://meson.fi) is the faster and safer way to execute low-cost, zero-slippage stablecoin cross-chain swaps across all leading blockchains and layer-2 rollups. As Aptos' mainnet launched on October, Meson is also preparing for launching on Aptos and other Move-based layer-1 blockchain, such as Sui and Starcoin.
As shown in the figure below, Meson is now ready on Aptos Devnet!
See Introducing Meson : the boundless highway for cross-chain stablecoins swap to learn more about Meson. If you want to dive into the technical details, you can also read our documentation on Meson Docs.
If you wants to try using Meson on Aptos Devnet, enter Meson Testnet App to make a transaction and find it on the Meson Testnet Explorer.
If you wants to use Meson on other EVM chains to swap your real stablecoin assets, enter Meson App to make a transaction and find it on the Meson Explorer. Meson now supports 11 blockchains on mainnet.
Follow the steps to deploy a new Meson protocol on Aptos Devnet:
yarn install
yarn deploy
After that, the Meson protocol should already be published on a new address and well initialized. For convenience, we use two deployed fake coins to simulate USDC and USDT: 0x1015ace920c716794445979be68d402d28b2805b7beaae935d7fe369fa7cfa0::aUSDC::TypeUSDC
and 0xaaefd8848cb707617bf82894e2d7af6214b3f3a8e3fc32e91bc026f05f5b10bb::aUSDT::TypeUSDT
.
The address and the private key (just for test) of the liquidity provider is given in environment variables file .env
, and it has enough fake USDC and fake USDT to deposit into the liquidity pool in contracts.
Then, you can see a cross-chain swap demo by running:
yarn swap
And you will see the swap process.
Meson contracts on move contains the module below:
-
MesonCoins.move
: The contract about the supported stablecoins. We use the coin standardaptos_framework::coin
on Aptos to support stablecoins. -
MesonConfig.move
: The constant variables used in the contracts. -
MesonHelpers.move
: Contains some utils functions used in other contracts. -
MesonStates
: Contains some utils functions about LP (Liquidity Provider) related functions. -
MesonSourceChain.move
: The contract for cross-chain swaps when Aptos is the source chain. The main entry function ispostSwap
andexecuteSwap
, which is the implementation of Step 2 (Post and bond a swap) and Step 6 (Receive initial funds) in Meson Swap Process. -
MesonTargetChain.move
: The contract for cross-chain swaps when Aptos is the target chain. The main entry function islock
andrelease
, which is the implementation of Step 3 (Lock the swap) and Step 5 (Release fund) in Meson Swap Process.
Project Author: wyf-ACCEPT
This project was originally created by wyf-ACCEPT and has since been taken over and maintained by MesonFi. We would like to thank wyf-ACCEPT for his professional assistance in completing the work for Aptos. If you have any questions or suggestions, please feel free to contact MesonFi in discord or wyf-ACCEPT.