osmosis-labs / isotonic

Smart Contracts for the Lendex Protocol
MIT License
1 stars 0 forks source link

New liquidation (option 2): each market maintains a list of opt-in liquidators #82

Closed uint closed 2 years ago

uint commented 2 years ago

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:

struct LiquidatorStatus {
    portion: Decimal,
    available_collateral: Coin, // deposit * portion
}
uint commented 2 years ago

This is if we decide to do option 2 from slab: https://confio.slab.com/posts/liquidations-hopfal2s

uint commented 2 years ago

Closing. We're going with option 1.