šŸŸ Add new dex

This page describes creation of new DEX pool.

These contract methods are called only by admin of that contract.

Creation of pool consist of some parameters for seeting up DEX config.

a_constant

input_tokens

This param is a set of FA12/FA2 tokens that would be traded on DEX. Set type in Tezos contract is the sorted list of unique values, so you must keep in mind that for setting up tokens_info and when calling DEX.

tokens_info

Token info setting

When you want to initialise pool, you should setup initial reserves, rate and precision_multiplier in correct way:

Let 4 TBC = 2 TXZ = 1 TEH (from example)

Token info for TBC

Token info for TXZ

Token info for TEH

Details of how to calculate values are in this table. (You can copy and play with this sheet)

Last updated