Skip to content

protonB/mai-protocol-v3

Repository files navigation

mai-protocol-v3

Mai Protocol V3 designed by MCDEX is an AMM-based decentralized perpetual swap protocol. Perpetual swap is one of the most popular derivatives that has no expiration date, supports margin trading, and has its price soft pegged to index price.

The name Mai comes from two Chinese characters "买" which means buy and "卖" which means sell. Using pinyin (the modern system for transliterating Chinese characters to Latin letters) "买" is spelled Mǎi and "卖" is spelled Mài. Thus, "Mai" means "Buy" and "Sell".

If not specified in advance, we always use decimals 18 as default in the code and documents.

Overview

Overview of mai-protocol-v3.

Reference

Terms

References

AMMDesign

Audit

The smart contracts were audited by quantstamp: MCDEX Audit Report.

Deployed Contracts

Arbitrum Kovan5 Testnet

Contract Description Address
PoolCreator (proxy) A proxy to PoolCreator 0x59edD5AEBf97955F53a094B49221E63F544ddA5a
PoolCreator (implementation) PoolCreator manages the liquidity pools and global variables. 0x1520D5561Dfb209c6dF5149CB6146f6B18d7ad2a
SymbolService Provide a shorter symbol for each perpetuals 0x465fB17aCc62Efd26D5B3bE9B3FFC984Cebd03d1
Broker A relay to execute pre-signed transactions 0x9CaDa02fC03671EA66BaAC7929Cb769214621947
Reader A tool to read status of liquidity pool 0x74F5b3581d70FfdEcE47090E568a8743f9659787
LiquidityPool (implementation) A liquidity pool provides liquidity for multiple perpetuals using the same collateral 0xA158E9f79917892Ce3E7735B3B946a5e06157409
LpGovernor (implementation) Share token and governance functions 0x49FF180FDF2D473F7a38eC53741d7631147DDDa3

Development

Compile contracts

npm install
npx hardhat compile
npx hardhat run scripts/s10test.ts

About

Smart contracts of MCDEX v3 Perpetual

Resources

License

Stars

Watchers

Forks

Packages

No packages published