protofire / makerdao-scd-subgraph

MakerDAO Single-Collateral Dai subgraph
https://thegraph.com/explorer/subgraph/protofire/makerdao
GNU Lesser General Public License v3.0
1 stars 2 forks source link

Add the field ratio and safe to the CDP #14

Open cristianmalfesi opened 5 years ago

cristianmalfesi commented 5 years ago

Estimated Time: 2pt To Do: Using the new entity that returns the eth price in time, add 2 calculated fields named Ratio and Safe. Ratio: This is the ratio between the value of the collateral deposited in your CDP and how much Dai you have generated from it. Because the price of ETH constantly fluctuates, you should keep this well above the 150% minimum ratio to avoid your CDP from being liquidated. Safe: returns a boolean indicating a CDP is well collateralized or not. (https://developer.makerdao.com/dai/1/api/tub)

Acceptance Criteria: