SWP Data-Tables
SWP-Pair Global Properties
The global configuration for the SWP-Pair infrastructure is stored in the SWP|Properties
table, defined within the SWP module and structured according to the {SWP|PropertiesSchema}
.
This table maintains four key global properties that govern the behaviour of the SWP-Pair architecture:
principals:[string]
– A list of DPTF tokens designated as Principal Tokens for SWP-Pair issuance.For SWP-Pair Types W or P, the first token must be a Principal Token (ownership is not enforced at issuance).
For SWP-Pair Type S, the first token must already be part of an existing W or P-type SWP-Pair before it can be used in an S-type issuance.
liquid-boost:bool
– A global toggle that, when set totrue
, enables automatic boosting of theKadenaLiquidIndex
.This boost occurs by burning an amount of LKDA equal to the liquidity provider fee set during SWP-Pair creation, increasing the index value with each swap.
spawn-limit:decimal
– The minimum amount of KDA liquidity required to create a new non-principal SWP-Pair (Liquidity Pool).Initially set to 1000 KDA.
inactive-limit: decimal
– The minimum KDA liquidity required for swaps to remain active in a non-principal SWP-Pair.If liquidity falls below this limit, swaps are automatically disabled.
To re-enable swaps, the pool’s liquidity must be replenished above this threshold.
SWP-Pair Individual Properties
Each individual SWP-Pair’s configuration is stored in the SWP|Pair
table, defined in the SWP module and structured according to the {SWP|PairSchema}
.
This schema defines 18 distinct properties for managing and operating SWP-Pairs:
owner-konto:string
– The standard or smart Ouronet account that owns the SWP-Pair, referred to as the SWP-Pair Manager (SWPPM).Ownership must be verified for any operation related to this SWP-Pair.
can-change-owner:bool
– Indicates whether the SWP-Pair Manager can be changed.can-add:bool
– Determines if liquidity can be added or removed.If set to
<false>
, liquidity operations are disabled.
can-swap:bool
– Determines if swapping is enabled.If set to
<false>
, swaps are disabled.This property will automatically switch to
<false>
if liquidity falls below the global<inactive-limit>
.
genesis-weights:[decimal]
– The initial weight distribution of tokens when the SWP-Pair was created.weights:[decimal]
– The current weight distribution used in the SWP-Pair's operations.genesis-ratio:[object{Swapper.PoolTokens}]
– The initial token amounts issued at the time of SWP-Pair creation.pool-tokens:[object{Swapper.PoolTokens}]
– The current token balances held by the SWP-Pair.token-lp:string
– The identifier of the native DPTF LP Token associated with this SWP-Pair.fee-lp:decimal
– The portion of the swap fee (in promile) allocated to increase LP token value, benefiting liquidity providers.fee-special:decimal
– The portion of the swap fee (in promiles) allocated to external accounts.fee-special-targets:[object{Swapper.FeeSplit}]
– Specifies the target Ouronet accounts and their respective shares for distributing the<fee-special>
.fee-lock:bool
– Indicates whether the SWP-Pair’s fee structure is locked. Once a proper fee structure is set, it can be locked in place. If<true>
, the fee parameters cannot be changed unless unlocked.unlocks:integer
– The number of times the<fee-lock>
has been unlocked for this SWP-Pair.amplifier:decimal
– Represents the amplifier value, relevant only for S-Type SWP-Pairs, used in the computation of the swap amounts. The Amplifier or Amplification Coefficient decides how “curved” the line is for a Stable Swap Pool, the higher the A, the less curved the line is and the less the relative price movement impact.primality:bool
– Indicates whether the SWP-Pair is marked as primal.frozen-lp:bool
– Specifies whether Frozen LP mode is enabled.When set to
<true>
(immutable), the SWP-Pair can accept Frozen Tokens for liquidity and can generate Frozen LP from native LP.
sleeping-lp:bool
– Specifies whether Sleeping LP mode is enabled.When set to
<true>
(immutable), the SWP-Pair can accept Sleeping Tokens and can generate Sleeping LP from native LP.
SWP-Pair Pool Data
Data for all existing SWP-Pairs is stored in the SWP|Pools
table, defined within the SWP module and structured according to the {SWP|PoolsSchema}
.
This table includes the following key:
pool:[string]
– Stores all active SWP-Pair data, organized by type and token count.Each entry is labelled using a prefix that indicates the SWP-Pair type:
P
: Represents W- or P-Type SWP-Pairs.S
: Represents S-type SWP-Pairs.
The prefix is followed by a number indicating the number of tokens in the pair.
For example:
P2
stores all W and P-type SWP-Pairs that contain 2 tokens.S3
stores all S-type SWP-Pairs that contain 3 tokens.
This structure facilitates efficient management and traceability of tokens across all existing pools.
Last updated