Refactor Layer2 Pool Token Mechanics and Bonding Logic #675
Labels
invalid
This doesn't seem right
Priority: Critical
refactor
Codebase cleaning & improvement
x/layer2
Description
The current pool logic for dApp is wrong: the dp tokens (dApp tokens) do not exist, are never minted, and are not paired against the KEX tokens (similar to Uniswap v2 pools).
Expected Behaviour
A big refactor is needed for Layer2
total_bond
parameters should be renamed topooled_kiratoken
ratio
should be renamed tosupply_init
, which corresponds to the initial supply ofdp/token
to be minted when RollApp proposal passes.supply_cap
parameter should be added (since token minting will use the minting module Migrate Minting module from Layer 2 module to Token Module and Refactor Token Module Structure #664). It can accept0
value. It cannot be set belowsupply
or transaction fails.pooled_dapptoken
parameters must be added to contain minteddp/denom
pooled_kiratoken
,pooled_dapptoken
andsupply_init
should be integrated into aLiquidityPool
param of dApp object.dapp_pool_fee
Network Property #674 should be resolved ,pool_fee
parameter must be deleted from dApp objectIssuanceConfig
is relevant.IssuanceConfig
must containdrip
,deposit
,postmint
,premint
,premint_time
,postmint_time
parameters (ratio
belongs to LiquidityPool object).dp/<denom>
should be minted usingsupply_init
at the same time aslp/<denom>
, and put intoLiquidityPool.pooled_dptoken
against the bonded KEX.redeem-dapp-pool
CLI command should be implemented to lock dp tokens/KEX tokens, according to the bonding curve similarly to Uniswap v2.redeem-dapp-pool
,swap-dapp-pool
, andconvert-dapp-pool
must be refactored since they should transact withdp/token
. Refactorconvert-dapp-pool
and add CLI for Cross-App LP Token Swapping #678bin
:version
parameter is missing #677 must be resolvedProto Example
Dapp
LiquidityPool
IssuanceConfig
The text was updated successfully, but these errors were encountered: