Keeper

VaultKeeper contract

The VaultKeeper contract manages the examination of vaults, including charging and managing risk penalties or triggering vault liquidations.

  • Setting: riskPenaltyFrameInSecond

    Default is set to 86,400 seconds (24 hours). This defines the interval at which the risk penalty is calculated and accrued.

checkVault function

The Tab Keeper module performs offchain monitoring and calculations of vault conditions at fixed intervals. When a vault's reserve ratio drops below the minimum reserve ratio (default 180%) established by the protocol, the Keeper triggers the checkVault function on-chain with the signed live median rate.

The on-chain checkVault function verifies the vault's reserve ratio and records the highest calculated risk penalty amount for the current time frame associated with the under-reserved vault.

Upon the maturity of the risk penalty time frame, or if the reserve ratio no longer breaches the minimum threshold, the accumulated risk penalty amount is applied to the corresponding vaults and reflected in the vault's outstanding Tabs.

If the vault's reserve ratio falls below the liquidation threshold, the checkVault function will immediately apply the highest recorded risk penalty and initiate vault liquidation.

pushVaultRiskPenalty function

This function calculates the risk penalty amount and charges it to the vault.

Last updated