Red Bank
The Red Bank Contract is the heart of the Mars Protocol's Money Market. It holds all assets deposited to Mars and provides the v1 market interactions through the user's wallet.
Last updated
The Red Bank Contract is the heart of the Mars Protocol's Money Market. It holds all assets deposited to Mars and provides the v1 market interactions through the user's wallet.
Last updated
Neutron:
Osmosis:
The types of the Incentives Contract can be found .
For reference on the Queries and Methods:
type Decimal = string
type Uint128 = string
Returns the Contracts configuration.
config: {}
}
{
data: {
address_provider: string
owner?: string | null
proposed_new_owner?: string | null
}
}
{
market: {
denom: string
}
}
{
data: {
borrow_index: Decimal
borrow_rate: Decimal
collateral_total_scaled: Uint128
debt_total_scaled: Uint128
denom: string
indexes_last_updated: number
interest_rate_model: {
base: Decimal
optimal_utilization_rate: Decimal
slope_1: Decimal
slope_2: Decimal
}
liquidity_index: Decimal
liquidity_rate: Decimal
reserve_factor: Decimal
}
}
{
market_v2: {
denom: string
}
}
{
data: {
borrow_index: Decimal
borrow_rate: Decimal
collateral_total_amount: Uint128
collateral_total_scaled: Uint128
debt_total_amount: Uint128
debt_total_scaled: Uint128
denom: string
indexes_last_updated: number
interest_rate_model: {
base: Decimal
optimal_utilization_rate: Decimal
slope_1: Decimal
slope_2: Decimal
}
liquidity_index: Decimal
liquidity_rate: Decimal
reserve_factor: Decimal
utilization_rate: Decimal
}
}
{
markets: {
limit?: number | null
start_after?: string | null
}
}
{
data: {
data: [
{
borrow_index: Decimal
borrow_rate: Decimal
collateral_total_scaled: Uint128
debt_total_scaled: Uint128
denom: string
indexes_last_updated: number
interest_rate_model: {
base: Decimal
optimal_utilization_rate: Decimal
slope_1: Decimal
slope_2: Decimal
}
liquidity_index: Decimal
liquidity_rate: Decimal
reserve_factor: Decimal
},
...
]
}
}
{
markets_v2: {
limit?: number | null
start_after?: string | null
}
}
{
data: {
data: [
{
borrow_index: Decimal
borrow_rate: Decimal
collateral_total_amount: Uint128
collateral_total_scaled: Uint128
debt_total_amount: Uint128
debt_total_scaled: Uint128
denom: string
indexes_last_updated: number
interest_rate_model: {
base: Decimal
optimal_utilization_rate: Decimal
slope_1: Decimal
slope_2: Decimal
}
liquidity_index: Decimal
liquidity_rate: Decimal
reserve_factor: Decimal
},
...
]
meta_data: {
has_more: boolean
}
}
}
{
scaled_debt_amount: {
amount: Uint128
denom: string
}
}
{
data: Uint123
}
{
scaled_liquidity_amount: {
amount: Uint128
denom: string
}
}
{
data: Uint123
}
{
underlying_debt_amount: {
amount_scaled: Uint128
denom: string
}
}
{
data: Uint123
}
{
underlying_liquidity_amount: {
amount_scaled: Uint128
denom: string
}
}
{
data: Uint123
}
{
user_collateral: {
account_id?: string | null
denom: string
user: string
}
}
{
data: {
amount: Uint128
amount_scaled: Uint128
denom: string
enabled: boolean
}
}
{
user_collaterals: {
account_id?: string | null
limit?: number | null
start_after?: string | null
user: string
}
}
{
data: [
{
account_id?: string | null
limit?: number | null
start_after?: string | null
user: string
},
...
]
}
{
user_collaterals_v2: {
account_id?: string | null
limit?: number | null
start_after?: string | null
user: string
}
}
{
data: {
data: [
{
account_id?: string | null
limit?: number | null
start_after?: string | null
user: string
},
...
]
meta_data: {
has_more: boolean
}
}
}
{
user_debt: {
denom: string
user: string
}
}
{
data: {
amount: Uint128
amount_scaled: Uint128
denom: string
uncollateralized: boolean
}
}
{
user_debts: {
limit?: number | null
start_after?: string | null
user: string
}
}
{
data: [
{
amount: Uint128
amount_scaled: Uint128
denom: string
uncollateralized: boolean
},
...
]
}
{
user_position: {
account_id?: string | null
user: string
}
}
{
data: {
health_status: 'not_borrowing' | {
borrowing: {
liq_threshold_hf: Decimal
max_ltv_hf: Decimal
}
}
total_collateralized_debt: Uint128
total_enabled_collateral: Uint128
weighted_liquidation_threshold_collateral: Uint128
weighted_max_ltv_collateral: Uint128
}
}
{
user_position_liquidation_pricing: {
account_id?: string | null
user: string
}
}
{
data: {
health_status: 'not_borrowing' | {
borrowing: {
liq_threshold_hf: Decimal
max_ltv_hf: Decimal
}
}
total_collateralized_debt: Uint128
total_enabled_collateral: Uint128
weighted_liquidation_threshold_collateral: Uint128
weighted_max_ltv_collateral: Uint128
}
}
{
borrow: {
amount: Uint128
denom: string
recipient?: string | null
}
}
{
deposit: {
account_id?: string | null
on_behalf_of?: string | null
}
}
{
liquidate: {
collateral_denom: string
recipient?: string | null
user: string
}
}
{
repay: {
on_behalf_of?: string | null
}
}
{
withdraw: {
account_id?: string | null
amount?: Uint128 | null
denom: string
liquidation_related?: boolean | null
recipient?: string | null
}
}