Work Procedures

NFT Trading

The figure above shows the interaction between nft traders and the protocol in Midaswap. It mainly involves the following modules:

  • MidasRouter is the trade routing, according to the trade path to the liquidity pool that needs to be traded.

  • Pair is the liquidity pool module, which is responsible for trading liquidity according to the price curve set by LP

  • NFTVault is a built-in asset vault module for Pair. All NFT assets in all liquidity pools are held in them. At the same time, the Treasury will record the price range corresponding to each position to ensure that its assets are traded within the price range set by it.

  • FT assets are assets on the other side of NFTS in the liquidity pool. Theoretically, FT assets can be any kind of Fungible Token asset. At this stage, Midaswap supports ETH/WETH/USDC and others as FT assets.

As shown in the figure above:

  • NFT sellers offer NFTS that point to the pair via MidasRouter to trade FT assets at the current floor price;

  • NFT buyers select target NFTS and provide FT assets corresponding to their calibrated price to the Pair to obtain NFTS.

  • Any transaction involving an NFT asset will interact with NFTVault to generate the asset and update the data recorded in it.

Liquidity Management

The figure above illustrates the interaction between the liquidity provider and the protocol in Midaswap. It mainly involves the following modules:

It mainly involves the following modules:

  • NFTVault modules are consistent with the functions involved in the trading process.

  • MidasRouter provides an interface for increasing and decreasing liquidity

  • Pair is the liquidity management module of Midaswap, mainly responsible for creating liquidity pools, increasing/decreasing liquidity, and minting/burning LP tokens.

As shown in the figure above:

  • When providing NFT liquidity, the price ceiling it sets will determine the price of the last NFT it trades, while the floor is the price of the first NFT it trades. All of these NFTS are priced by default in a proportional fashion.

  • When providing FT liquidity, the upper limit of the price it sets is the price of the first NFT it liquidated in exchange for, while the lower limit is the price of the last NFT. All of this liquidity is still priced in proportion by default.

Last updated