storage.move
Error Codes
STORAGE_CALLER_NOT_OWNER: u64 = 43001
STORAGE_CALLER_NOT_CONFIGURATOR: u64 = 43002
STORAGE_NO_MORE_RESERVES_ALLOWED: u64 = 43003
STORAGE_INVALID_INDEX: u64 = 43004
STORAGE_AMOUNT_NOT_ENOUGH: u64 = 43005
STORAGE_DUPLICATE_RESERVE: u64 = 43006pause(storage: &Storage): bool
pause(storage: &Storage): boolCheck if protocol is in paused state
get_supply_cap_ceiling(storage: &mut Storage, asset: u8): u256
get_supply_cap_ceiling(storage: &mut Storage, asset: u8): u256Retuns the supply cap of an asset
get_borrow_cap_ceiling_ratio(storage: &mut Storage, asset: u8): u256
get_borrow_cap_ceiling_ratio(storage: &mut Storage, asset: u8): u256Retuns the borrow cap of an asset
get_total_supply(storage: &mut Storage, asset: u8): (u256, u256)
get_total_supply(storage: &mut Storage, asset: u8): (u256, u256)Returns the total supplied of an asset
get_index(storage: &mut Storage, asset: u8): (u256, u256)
get_index(storage: &mut Storage, asset: u8): (u256, u256)Returns the borrow_index and the supply_index of an asset
get_borrow_rate_factors(storage: &mut Storage, asset: u8): (u256, u256, u256, u256, u256)
get_borrow_rate_factors(storage: &mut Storage, asset: u8): (u256, u256, u256, u256, u256)Returns the parameters of the Interest Rate Model of a specific asset, e.g.:
base_ratemultiplierjump_rate_multiplierreserve_factoroptimal_utilization
For a comprehensive overview of these parameters, refer to this article
get_liquidation_factors(storage: &mut Storage, asset: u8): (u256, u256, u256)
get_liquidation_factors(storage: &mut Storage, asset: u8): (u256, u256, u256)Returns the liquidation parameters of an asset, e.g.:
ratiobonusi.e. the bonus discount given to the liquidatorthresholdi.e. the liquidation threshold below which a position gets liquidated
get_last_update_timestamp(storage: &Storage, asset: u8): u64
get_last_update_timestamp(storage: &Storage, asset: u8): u64Get the latest timestamp at which the borrow rate was updated
get_current_rate(storage: &mut Storage, asset: u8): (u256, u256)
get_current_rate(storage: &mut Storage, asset: u8): (u256, u256)Returns the supply_rate and borrow_rate of an asset
get_user_balance(storage: &mut Storage, asset: u8, user: address): (u256, u256)
get_user_balance(storage: &mut Storage, asset: u8, user: address): (u256, u256)Returns a user's borrow_balance and supply_balance
get_user_assets(storage: &Storage, user: address): (vector, vector)
get_user_assets(storage: &Storage, user: address): (vector, vector)Returns two vectors with the user's collateral assets and loans assets
get_asset_ltv(storage: &Storage, asset: u8): u256
get_asset_ltv(storage: &Storage, asset: u8): u256Returns an asset's LTV
get_coin_type(storage: &Storage, asset: u8): String
get_coin_type(storage: &Storage, asset: u8): StringReturns a coin's type
Last updated