Credit Manager
The Credit Manager Contract is the centerpiece of the Mars Protocol v2. It serves as a proxy between the user, the Red Bank, the liquidation engine, and the Perps contracts.
Deployments
Types
type AccountKind =
| ('default' | 'high_levered_strategy')
| {
fund_manager: {
vault_addr: string
}
}
type ActionKind = 'default' | 'liquidation'
type Expiration =
| {
at_height: number
}
| {
at_time: Timestamp
}
| {
never: {}
}
type HealthState =
| 'healthy'
| {
unhealthy: {
max_ltv_health_factor: Decimal
}
}
type Int128 = string
type Uint128 = stringConditions
health_factor
oracle_price
relative_price
Actions
borrow
claim_astro_lp_rewards
claim_rewards
create_trigger_order
delete_trigger_order
deposit
deposit_to_perp_vault
enter_vault
execute_perp_order
exit_vault
exit_vault_unlocked
lend
liquidate
provide_liquidity
reclaim
refund_all_coin_balances
repay
request_vault_unlock
stake_astro_lp
swap_exact_in
unlock_from_perp_vault
unstake_astro_lp
withdraw
withdraw_from_perp_vault
withdraw_liquidity
withdraw_to_wallet
Queries
account_kind
accounts
all_account_trigger_orders
all_coin_balances
all_debt_shares
all_total_debt_shares
all_trigger_orders
all_vault_positions
all_vault_utilizations
config
estimate_provide_liquidity
estimate_withdraw_liquidity
positions
total_debt_shares
vault_bindings
vault_position_value
vault_utilization
Methods
create_credit_account
execute_trigger_order
repay_from_wallet
update_balances_after_deleverage
update_credit_account
Last updated