ConfigBase
primary_asset_info
secondary_asset_info
astro_token_info
primary_pair
astro_pair
astro_generator
red_bank
oracle
treasury
governance
operators
max_ltv
fee_rate
bonus_rate
ConfigUnchecked
/ Config
UpdateConfig
UpdatePosition
Harvest
max_spread
*slippage_tolerance
*Liquidate
user
Callback
Config
State
Positions
start_after
*limit
*Postion
user
Health
user
Snapshot
user
StateBase
total_bond_units
total_debt_units
pending_rewards
PositionBase
total_bond_units
total_debt_units
pending_rewards
Health
bond_amount
bond_value
debt_amount
debt_value
ltv
*debt_value
to bond_value
; None if bond_value
is zeroSnapshot
update_position
, we record a snaphot of the position. This snapshot does not have any impact on the contract's normal functioning. Rather it is used by the frontend to calculate PnL. Once we have the infrastructure for calculating PnL off-chain available, we will migrate the contract to delete this. time
height
position
health
PositionsResponseItem
user
position
Action
Deposit
Borrow
amount
: Uint 128Repay
amount
: Uint 128Bond
slippage_tolerance
* : DecimalUnbond
bond_units_to_reduce
: Uint 128Swap
offer_amount
: Uint128max_spread
* : DecimalCallbackMsg
provide_liquidity
user_addr
* : Stringslippage_tolerance
* : Decimalwithdraw_liquidity
user_addr
: Stringbond
user_addr
* : Stringunbond
user_addr
: Addrbond_units_to_reduce
: Uint128borrow
user_addr
: Addrborrow_amount
: Uint128repay
user_addr
: Stringrepay_amount
*: Uint128swap
user_addr
*: Stringoffer_asset_info
: Stringoffer_amount
*: Uint128max_spread
*: Decimalbalance
Harvest
function callmax_spread
*: Decimalcover
Liquidate
function calluser_addr
: Stringrefund
user_addr
: Stringrecipient_addr
: Stringpercentage
: Decimalassert_health
position_updated
event; if above the maximum LTV, throw an erroruser_addr
: Stringclear_bad_debt
bad_debt
eventuser_addr
: Stringpurge_storage
update_position
and liquidate
callback chainsuser_addr
: Stringsnapshot
Snapshot
. This callback should be removed at some point after launch when our tx indexing infrastructure is readyuser_addr
: String