0g-chain/x/cdp/spec
Nick DeLuca ba73f69688
Fix CDP keeper liquidation collateral ratio check (#1488)
* add test for exact collateral ratio; fix bug that allows cdps created at
the limit to be liquidated by a keeper; update spec

* touch up spec to be more clear

* adjust test name to better reflect what we are testing
2023-03-07 20:19:29 -07:00
..
01_concepts.md [R4R] Better docs (#541) 2020-06-03 14:54:31 -04:00
02_state.md Cdp accumulators (#751) 2021-01-18 12:12:37 -07:00
03_messages.md Fix CDP keeper liquidation collateral ratio check (#1488) 2023-03-07 20:19:29 -07:00
04_params.md [R4R] Better docs (#541) 2020-06-03 14:54:31 -04:00
05_events.md [R4R] Better docs (#541) 2020-06-03 14:54:31 -04:00
06_begin_block.md [R4R] Better docs (#541) 2020-06-03 14:54:31 -04:00
README.md [R4R] Better docs (#541) 2020-06-03 14:54:31 -04:00

cdp

Table of Contents

  1. Concepts
  2. State
  3. Messages
  4. Parameters
  5. Events
  6. BeginBlock

Overview

The x/cdp module stores and manages Collateralized Debt Positions (or CDPs).

A CDP enables the creation of a stable asset pegged to an external price (usually US Dollar) by collateralization with another asset. Collateral is locked in a CDP and new stable asset can be minted up to some fraction of the value of the collateral. To unlock the collateral, the debt must be repaid by returning some stable asset to the CDP at which point it will be burned and the collateral unlocked.

Pegged assets remain fully collateralized by the value locked in CDPs. In the event of price changes, this collateral can be seized and sold off in auctions by the system to reclaim and reduce the supply of stable assets.