Skip to content

Smart Contract

mimo V1 smart contract is based on Uniswap V1, adapted for the IoTeX blockchain.

Contract Architecture

The mimo V1 system consists of:

Factory Contract

Creates and manages exchange contracts for each IOTX/XRC20 token pair.

Exchange Contracts

Each token pair has its own exchange contract that:

  • Holds liquidity reserves
  • Facilitates swaps
  • Issues LP tokens to liquidity providers
  • Calculates prices using the x * y = k formula

Contract References

mimo V1 is based on Uniswap V1, which has been:

  • Widely used in production
  • Thoroughly tested and audited
  • Proven to be secure

Interacting with Contracts

Web API

For simple integrations, you can use the web API:

Add Liquidity

https://mimo.exchange/add/{token address}/0x06959153b974314bf1b4e10b67a1cfe407fa698c/500?protocol=v2

Swap

https://mimo.exchange/swap?inputCurrency=IOTX&outputCurrency={token address}

Smart Contract API

Developers can integrate with mimo.exchange by calling smart contract APIs directly.

IoTeX JS SDK

The IoTeX JS SDK (Antenna) is available at: https://github.com/iotexproject/iotex-antenna

dApp Sample

Start your dApp with this sample code: https://github.com/iotexproject/iotex-dapp-sample

Note

Detailed smart contract API documentation will be released soon. For now, refer to the Uniswap V1 documentation for contract interfaces.

Released under the MIT License.