add_pool

This entrypoint allows anyone to deploy a new own DEX pool.

QUIPU token should be approved (updated operators) before calling this method.

Call parameters

Parameters logically close to Standalone variant of Add new dex, but there is no "reserves" field in tokens_info mapping (because invest performs at second step - start_dex) and some additional config parameters.

  • default_referral - the address that would be the default referral at the new pool.

  • managers - a set of addresses that allowed to manipulate LP token metadata at the new pool.

  • metadata - metadata of deployed contract.

  • token_metadata - metadata of the LP token at the new pool.

FieldTypeDescription

a_constant

nat

constant "A" as represented as Aāˆ—nnāˆ’1A*n^{n-1}.

input_tokens

set(token_t)

sorted set of FA2/FA1.2 tokens to add as DEX.

tokens_info

map(token_pool_idx_t,token_prec_info_t)

map of rates and precisions config

default_referral

address

default referral that will be used in operations with the referral.

managers

set(address)

set of managers that allowed to change LP token metadata.

metadata

big_map(string, bytes)

contract metadata by TZIP-016

token_metadata

big_map(token_id_t, token_meta_info_t)

mapping each token metadata by TZIP-012

type token_prec_info_t  is [@layout:comb] record [
  rate                    : nat;
  precision_multiplier    : nat;
]

type pool_init_param_t  is [@layout:comb] record [
  a_constant              : nat;
  input_tokens            : set(token_t);
  tokens_info             : map(token_pool_idx_t, token_prec_info_t);
  default_referral        : address;
  managers                : set(address);
  metadata                : big_map(string, bytes);
  token_metadata          : big_map(token_id_t, token_meta_info_t);
]

Last updated