0.0.3 • Published 4 years ago

@mcdex/mai-tp.js v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Tokenized Position for mai protocol v2

Build Status Coverage Status

Mai Tokenized Position (TP) is used to convert a long position of Mai Protocol v2 - Perpetual into ERC20 token. A long position can be kept fully collateralized automatically, so it is possible to make a long position leave the Perpetual and enter the public Ethereum ecosystem.

For example: An ETH-PERP inverse perpetual is collteralized with ETH. So the short position (The short position is from a human perspective. In the contract it is still a long position) is a synthetic USD. A BTC-USDT-PERP vanilla perpetual is collteralized with USDT. So the long position is a synthetic BTC. etc.

Design Details

Check the "tokenized-position" part of our documents to get more information.

Develop

  1. Deploy a mai protocol v2 by running truffle migrate in that project
  2. Do not forget to create the AMM by running truffle exec scripts/create_pool_for_test_eth.js
  3. Deploy the TP by running npx oz deploy -k upgradable. When prompting init(), enter "eUSD" and 18 decimals
  4. Do not forget to add the TP into perpetual whitelist. await perp.globalConfig.addComponent(perp.perpetual.address, tokenizer.address)
0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago