For every market we need a list of LIQUIDATORS. Anyone with money deposited in the market can add themself to the opt-in LIQUIDATORS list. Being on the list means you're willing to use a portion (you choose, it's the Decimal value below) of your collateral to pay off someone's debt.
LIQUIDATORS: Map<&Addr, Decimal> // in the range of [0, 1]
We need:
an exec msg that lets a user change their liquidator status (opt in, opt out, change portion)
a query to get a specific account's Option<LiquidatorStatus>
a query to list all the liquidators for this market Vec<LiquidatorStatus>
For every market we need a list of
LIQUIDATORS
. Anyone with money deposited in the market can add themself to the opt-inLIQUIDATORS
list. Being on the list means you're willing to use a portion (you choose, it's theDecimal
value below) of your collateral to pay off someone's debt.We need:
Option<LiquidatorStatus>
Vec<LiquidatorStatus>