Skip to content

This tool watches pegged asset oracle prices and performs a shutdown of SparkLend if they depeg below defined thresholds.

License

Notifications You must be signed in to change notification settings

marsfoundation/sparklend-kill-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparkLend Kill Switch

This module registers pegged asset oracles and will trigger a lockdown mode for SparkLend if certain price thresholds are met. For example, if WBTC/BTC is observed to reach a market price of 0.95 and the threshold for this oracle is set to 0.95 then anyone can permissionlessly trigger to set SparkLend into lockdown mode which prevents new borrows on all assets.

The reasoning behind this is to limit the damage in the event of extreme market conditions. Depegging assets may be temporary, but there is no harm in an excess of caution in these situations. Users can still top up collateral and repay/withdraw in lockdown mode. This just prevents further borrowing to limit downside exposure to lenders.

After the initial trigger is done, the kill switch can triggered as many times as needed unconditionally until it is reset by the Spark Proxy under the Governance Security Module delay. MKR holders will also need to re-activate the market if it is deemed safe to do so.

Usage

forge build

Test

forge test

The IP in this repository was assigned to Mars SPC Limited in respect of the MarsOne SP

About

This tool watches pegged asset oracle prices and performs a shutdown of SparkLend if they depeg below defined thresholds.

Resources

License

Stars

Watchers

Forks

Packages

No packages published