šStorage and types overview
Contract typings and storage
Base types
Staker accumulator - accumulator of QUIPU staking rewards.
Field | Type | Hint | Description |
---|---|---|---|
accumulator |
| Mapping of token index and corresponding underlying accumulated balance of token | |
total_staked |
| balance of staked QUIPU tokens to current pool |
Fee storage - fee rates record
Field | Type | Hint | Description |
---|---|---|---|
lp |
| Percent of fee goes to liquidity providers. This fee stays in liquidity pool to increase LP token price. | |
stakers |
| 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 |
| 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
Field | Type | Hint | Description |
---|---|---|---|
rate |
| 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 |
| value that underlying token reserves are multiplied by in order to adjust their precision to LP decimal places | |
reserves |
| balance of underlying token, locked in pool |
Pool type - DEX pool storage
Field | Type | Hint | Description |
---|---|---|---|
initial_A |
| Start value of ramping A contant. | |
initial_A_time |
| Timestamp in seconds | Time when ramping A constant was started. |
future_A |
| End value of ramping A contant. | |
future_A_time |
| Timestamp in seconds | Time when ramping A constant will be finished |
tokens_info |
| ||
fee |
| ||
staker_accumulator |
| ||
total_supply |
| Total supply of LP token. |
Storage - main contract storage
Field | Type | Hint | Description |
---|---|---|---|
admin |
| Administator of current contract | |
default_referral |
| Default referral address to apply fees | |
managers |
| Manager could edit LP token metadata. | Set of managers addresses |
pools_count |
| Counter. Always | Amount of pools created inside current contract. |
tokens |
| Mapping of tokens, that exchanges inside created pool. | |
pool_to_id |
| Bytes - packed by | Mapping that allows finding pool id by packed bytes of |
pools |
| Mapping of pool to it's corresponding pool Pool type - DEX pool storage | |
ledger |
| Mapping of user's LP token balance related to pool | |
allowances |
| Storage of operators allowed to transfer LP tokens of user's behalf. | |
dev_rewards |
| Mapping of accrued developer rewards by each token. | |
referral_rewards |
| Mapping of accrued referral rewards by each user-token key. | |
stakers_balance |
| Mapping of accrued staking rewards by each user-token key. | |
quipu_token |
| QUIPU token address and token ID | |
started |
| flag that used in initialization stage | |
factory_address |
| this field setted at deploy and has no methods for changing | address of factory |
Full storage type - storage root
Field | Type | Hint | Description |
---|---|---|---|
storage |
| Indicates how much LP token belongs to each underlying stablecoin | |
metadata |
| TZIP-016 | contract metadata by TZIP-016 |
token_metadata |
| TZIP-016, TZIP-012 | mapping each token metadata by TZIP-012 |
admin_lambdas |
| Administrative lambda-methods storage | |
dex_lambdas |
| DEX stable swap protocol lambda-methods storage | |
token_lambdas |
| FA2 lambda-methods storage |
Last updated