Skip to main content
logo

Liquidation Filterer

The liquidation-filterer contract queries the health status of each account to be liquidated on the current block height, and if the account is no longer health factor < 1 it will remove that liquidation from the msg in order to let other liquidation messages go through successfully.

InstantiateMsg

json
msg.rs
Copy

_4
{
_4
"owner": "...",
_4
"address_provider": "..."
_4
}

ParamsTypeDescription
ownerStringContract owner
address_providerStringAddress provider returns addresses for all protocol contracts

ExecuteMsg

update_owner

Manages admin role state.

json
msg.rs
Copy

_7
{
_7
"update_owner": {
_7
"propose_new_owner": {
_7
"proposed": "..."
_7
}
_7
}
_7
}

update_config

Update contract config (only callable by owner).

json
msg.rs
Copy

_5
{
_5
"update_config": {
_5
"address_provider": "..."
_5
}
_5
}

ParamsTypeDescription
address_providerOption<String>Address provider returns addresses for all protocol contracts

liquidate_many

Liquidate many position for a user.

json
msg.rs
Copy

_18
{
_18
"liquidate_many": {
_18
"liquidations": [
_18
{
_18
"collateral_denom": "...",
_18
"debt_denom": "...",
_18
"user_address": "...",
_18
"amount": "12345"
_18
},
_18
{
_18
"collateral_denom": "...",
_18
"debt_denom": "...",
_18
"user_address": "...",
_18
"amount": "12345"
_18
}
_18
]
_18
}
_18
}

ParamsTypeDescription
liquidationsVec<Liquidate>Vector containing objects of type Liquidate

Liquidate

Liquidate under-collateralized native loans. Coins used to repay must be sent in the transaction this call is made.

json
types.rs
Copy

_6
{
_6
"collateral_denom": "...",
_6
"debt_denom": "...",
_6
"user_address": "...",
_6
"amount": "12345"
_6
}

ParamsTypeDescription
collateral_denomStringDenom of the collateral asset, which liquidator gets from the borrower
debt_denomStringDenom of the debt asset
user_addressStringThe address of the borrower getting liquidated
amountUint128Amount of debt to be repayed

refund

Withdraw all coins held by the contract to the designated recipient.

json
msg.rs
Copy

_5
{
_5
"refund": {
_5
"recipient": "..."
_5
}
_5
}

ParamsTypeDescription
recipientStringDesignated recipient

QueryMsg

config

Queries contract config.

json
msg.rs
Copy

_3
{
_3
"config": {}
_3
}

ConfigResponse

json
msg.rs
Copy

_5
{
_5
"owner": "...",
_5
"proposed_new_owner": "...",
_5
"address_provider": "..."
_5
}

ParamsTypeDescription
ownerOption<String>Contract owner
proposed_new_ownerOption<String>The contract's proposed owner
address_providerStringAddress provider returns addresses for all protocol contracts