๐Storage overview
Storage fields and types
Base types
Account type
Field | Type | Description |
---|---|---|
allowances |
| allowances (operators) - set of address allowed to transfer on account's behalf |
borrow |
| amount of borrowed tokens |
lastBorrowIndex |
| account's last borrow index to apply interest to borrowed tokens |
yToken type (market)
Field | Type | Hint | Description |
---|---|---|---|
mainToken |
| FA12/FA2 | underlying asset |
interestRateModel |
| KT1.... | Interest rate contract |
interestUpdateTime |
| updateInterest called with | last time when interest of token updated |
priceUpdateTime |
| PriceFeed.getPrice called with | last time when price of token updated |
totalBorrowsF |
| float value multiplied by 1e+18 | total amount of borrowed tokens |
totalLiquidF |
| float value multiplied by 1e+18 | total liquidity locked at market |
totalSupplyF |
| float value multiplied by 1e+18 | total supply of yToken |
totalReservesF |
| float value multiplied by 1e+18 | "subsidiary" reserves of protocol |
borrowIndex |
| index collecting interest | |
maxBorrowRate |
| float value multiplied by 1e+18 | limit of borrow rate response. Used to verify borrow rate in accrueInterest |
collateralFactorF |
| float value multiplied by 1e+18 | Rate represents by which the borrow limit increases if the yToken is minted |
liquidReserveRateF |
| float value multiplied by 1e+18 | Percent of liquidate collateral amount that goes to reserves |
reserveFactorF |
| float value multiplied by 1e+18 | Rate that represents what part of the interest goes to the protocol reserves |
lastPrice |
| last price of underlying token to XTZ | |
borrowPause |
| flag if borrowing paused for token setBorrowPause | |
isInterestUpdating |
| flag of waiting response from InterestRate contract | |
threshold |
| float value multiplied by 1e+18 | threshold of collateral borrow rate |
yStorage - main Yupana storage values
Field | Type | Hint | Description |
---|---|---|---|
admin |
| tz/KT.... | contract administrator |
ledger |
| storage of token balances | |
accounts |
| Account type storage | |
tokens |
| yToken type (market)storage | |
lastTokenId |
| counter, size of tokens | tokenId of last created market |
priceFeedProxy |
| KT1... | PriceFeed contractaddress |
closeFactorF |
| float value multiplied by 1e+18 | max portion of the loan that can be liquidated per single transaction |
liqIncentiveF |
| float value multiplied by 1e+18 | Rate that the liquidator will earn if liquidate the asset |
markets |
| size of set is limited by | mapping of entered as collateral user markets |
borrows |
| size of set is limited by | mapping of borrowed tokens of user markets |
maxMarkets |
| max markets allowed to enter as collateral or borrow | |
assets |
| mapping underlying asset (FA12/FA2) to corresponding |
fullStorage - contract storage root
Field | Type | Description |
---|---|---|
storage |
| |
metadata |
| contract metadata by TZIP-016 |
token_metadata |
| mapping each token metadata by TZIP-012 |
tokenLambdas |
| FA2 lambda-methods storage |
useLambdas |
| Yupana protocol lambda-methods storage |
Last updated