Risk management

Additional Risk params

During the development of the protocol, additional risk mitigation steps are taken into account.

// Max Percent of the pool amount that can not be utilized // weft limit
pool_reserves: HashMap<ResourceAddress, Decimal>,

// Max Percent of the pool amount that a single account can borrow
max_borrow_percents: HashMap<ResourceAddress, Decimal>,

// The minimum collateral ratio = 1
min_collateral_ratios: HashMap<ResourceAddress, Decimal>,

Pool Reserve

Represents the buffer at the high pool utilization, so the transactions can always be made. It is possible to get at the state when the requirement isn't met. The reserve_factor is then manually set to 0 to prevent further risk.

Once the threshold is met, the reserve_factor is manually set back by the Admin.

Max Borrow Percent

It is a configurable parameter, preventing a single account from being a holder of most borrowed balances in a given pool.

Min Collateral Ratio

tbd. Currently set at 1 - not taken into account

Pool Locking

In addition, each pool interaction could be locked by the Admin to prevent calling Deposit, Withdraw, Borrow or Repay functions:

// Deposit lock state (true if locked)
deposits_locked: HashMap<ResourceAddress, bool>,
// Borrow lock state (true if locked)
borrows_locked: HashMap<ResourceAddress, bool>,
// Withdraw lock state (true if locked)
withdraws_locked: HashMap<ResourceAddress, bool>,
// Repay lock state (true if locked)
repays_locked: HashMap<ResourceAddress, bool>,

Last updated