This is a rewrite of the Maker stablecoin DEI, drawing from insights on smart contract development from the YouTube playlist.
forge build
forge test
par [ray] 1000000000000000000000000000
mat [ray] 1450000000000000000000000000
val [wad] 2067300000000000000000
spot [ray] 1429862068965517241379310344827
liquidation ratio = mat / par
= collateral USD value / debt USD value
liquidation price = spot = val * 1e9 * par / mat