diff --git a/blockchain/modules/ecdp-emergency-shutdown/Cargo.toml b/blockchain/modules/ecdp-emergency-shutdown/Cargo.toml new file mode 100644 index 00000000..5482f4cc --- /dev/null +++ b/blockchain/modules/ecdp-emergency-shutdown/Cargo.toml @@ -0,0 +1,50 @@ +[package] +name = "module-ecdp-emergency-shutdown" +version = "0.9.81-dev" +authors = ["Setheum Labs"] +edition = "2021" + +[dependencies] +scale-info = { workspace = true } +serde = { workspace = true, optional = true } +parity-scale-codec = { version = "3.0.0", default-features = false, features = ["max-encoded-len"] } +sp-runtime = { workspace = true } +sp-io = { workspace = true } +sp-std = { workspace = true } +frame-support = { workspace = true } +frame-system = { workspace = true } + +primitives = { package = "setheum-primitives", path = "../primitives", default-features = false } +support = { package = "module-support", path = "../support", default-features = false } +orml-traits = { path = "../submodules/orml/traits", default-features = false } + +[dev-dependencies] +sp-core = { workspace = true, features = ["std"] } +pallet-balances = { workspace = true } +orml-tokens = { workspace = true } + +[features] +default = ["std"] +std = [ + "scale-info/std", + "serde", + "parity-scale-codec/std", + "sp-runtime/std", + "sp-std/std", + "sp-io/std", + "frame-support/std", + "frame-system/std", + "primitives/std", + "support/std", + "orml-traits/std", +] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/blockchain/modules/ecdp-emergency-shutdown/README.md b/blockchain/modules/ecdp-emergency-shutdown/README.md new file mode 100644 index 00000000..e4773b1b --- /dev/null +++ b/blockchain/modules/ecdp-emergency-shutdown/README.md @@ -0,0 +1,11 @@ +# ECDP Emergency Shutdown Module + +## Overview + +Provides an Emergency Shutdown protocol for ECDP Stablecoin on Ethical DeFi. When a black swan occurs such as price plunge or fatal bug, the highest priority is to minimize user losses as much as possible. + +The Emergency Shutdown Module enables three types of Emergency Shutdown's which are: +- Setter Emergency Shutdown: To Shutdown the Setter (SETR) Stablecoin ECDP System. +- Slick USD Emergency Shutdown: To Shutdown the Slick USD (USSD) Stablecoin ECDP System. + +When the decision to shutdown the system is made, emergency shutdown module needs to trigger all related modules to halt, and start a series of operations including close some user entry, freeze feed prices, run offchain worker to settle CDPs that have debit, cancel all activities in the auctions module, when debits and gaps are settled, the stable currency holders are allowed to refund the remaining collateral assets.