šStorage and types overview
Contract typings and storage
Base types
Staker accumulator - accumulator of QUIPU staking rewards.
accumulator
map(token_pool_idx_t, nat)
For better accuracy, stored with multiplication by .
Mapping of token index and corresponding underlying accumulated balance of token
total_staked
nat
balance of staked QUIPU tokens to current pool
Fee storage - fee rates record
lp
nat
Decimal value. Multiplied by .
Percent of fee goes to liquidity providers.
This fee stays in liquidity pool to increase LP token price.
stakers
nat
Decimal value. Multiplied by .
Percent of fee goes to QUIPU token stakers of pool. This fee goes to staking accumulator and spreads between users who staked QUIPU token to pool. If noone staked this fee part goes to liquidity pool as additional fee.
ref
nat
Decimal value. Multiplied by .
Percent of fee goes to referral of DEX call. This fee goes to referral address passed to DEX call. If referral not passed, fee goes to default referral.
Token information type - pool underlying token info
rate
nat
Calculates with pecisions. By default LP precision is 1e18. Rate is the value allowing to set custom exchange ratios between underlying tokens
Indicates how much LP token belongs to each underlying stablecoin
precision_multiplier
nat
By default LP precision is 1e18. Than precision_multiplier
is
value that underlying token reserves are multiplied by in order to adjust their precision to LP decimal places
reserves
nat
balance of underlying token, locked in pool
Pool type - DEX pool storage
initial_A
nat
A constant stores as multiplied value. (10^2 is precision)
Start value of ramping A contant.
initial_A_time
timestamp
Timestamp in seconds
Time when ramping A constant was started.
future_A
nat
A constant stores as multiplied value. (10^2 is precision)
End value of ramping A contant.
future_A_time
timestamp
Timestamp in seconds
Time when ramping A constant will be finished
total_supply
nat
Total supply of LP token.
Storage - main contract storage
admin
address
Administator of current contract
default_referral
address
Default referral address to apply fees
managers
set(address)
Manager could edit LP token metadata.
Set of managers addresses
pools_count
nat
Counter. Always 1
Amount of pools created inside current contract.
tokens
big_map(pool_id_t, tokens_map_t)
Mapping of tokens, that exchanges inside created pool.
pool_to_id
big_map(bytes, nat)
Bytes - packed by Bytes.pack(tokens)
where tokens is valid tokens_map_t
(sorted tokens).
Mapping that allows finding pool id by packed bytes of tokens_map_t
pools
big_map(pool_id_t, pool_t)
Mapping of pool to it's corresponding pool Pool type - DEX pool storage
ledger
big_map(
(address * pool_id_t), nat)
Mapping of user's LP token balance related to pool
allowances
big_map(
(address * pool_id_t), allowances_data_t)
Storage of operators allowed to transfer LP tokens of user's behalf.
dev_rewards
big_map(token_t, nat)
Mapping of accrued developer rewards by each token.
referral_rewards
big_map(
(address * token_t), nat)
Mapping of accrued referral rewards by each user-token key.
stakers_balance
big_map(
(address * pool_id_t), staker_info_t)
Mapping of accrued staking rewards by each user-token key.
quipu_token
fa2_token_t
QUIPU token address and token ID
factory_address
address
this field setted at deploy and has no methods for changing
address of factory
Full storage type - storage root
storage
storage_t
Indicates how much LP token belongs to each underlying stablecoin
token_metadata
big_map(token_id_t, token_meta_info_t)
TZIP-016, TZIP-012
mapping each token metadata by TZIP-012
admin_lambdas
big_map(nat, bytes)
Administrative lambda-methods storage
dex_lambdas
big_map(nat, bytes)
DEX stable swap protocol lambda-methods storage
token_lambdas
big_map(nat, bytes)
FA2 lambda-methods storage
Last updated