šStorage and types overview
Contract typings and storage
Base types
Staker accumulator - accumulator of QUIPU staking rewards.
accumulator
map(token_pool_idx_t, nat)
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
Percent of fee goes to liquidity providers.
This fee stays in liquidity pool to increase LP token price.
stakers
nat
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
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
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
Start value of ramping A contant.
initial_A_time
timestamp
Timestamp in seconds
Time when ramping A constant was started.
future_A
nat
End value of ramping A contant.
future_A_time
timestamp
Timestamp in seconds
Time when ramping A constant will be finished
tokens_info
map(token_pool_idx_t, token_info_t)
fee
fees_storage_t
staker_accumulator
staker_accum_t
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
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)
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
dev_store
dev_storage_t
Full storage type - storage root
storage
storage_t
Indicates how much LP token belongs to each underlying stablecoin
metadata
big_map(string, bytes)
TZIP-016
token_metadata
big_map(token_id_t, token_meta_info_t)
TZIP-016, 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