GithubHelp home page GithubHelp logo

cleancoindev / dss-add-ilk-spell Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makerdao/dss-add-ilk-spell

0.0 1.0 1.0 44 KB

Spell template for adding a new collateral type

License: GNU Affero General Public License v3.0

Makefile 100.00%

dss-add-ilk-spell's Introduction

Dss Add Ilk Spell

Spell contract to deploy a new collateral type in the DSS system.

Additional Documentation

Deployment

Prerequisites:

Steps:

  1. Export contract variables
  • export TOKEN=<TOKEN ADDR>
  • export PIP=<TOKEN/USD FEED ADDR>
  • export ILK="$(seth --to-bytes32 "$(seth --from-ascii "<COLLATERAL NAME>")")"
  • export MCD_VAT=<VAT ADDR>
  • export MCD_CAT=<CAT ADDR>
  • export MCD_JUG=<JUG ADDR>
  • export MCD_SPOT=<SPOTTER ADDR>
  • export MCD_PAUSE=<PAUSE ADDR>
  • export MCD_PAUSE_PROXY=<PAUSE PROXY ADDR>
  • export MCD_ADM=<CHIEF ADDR>
  • export MCD_END=<END ADDR>
  1. Deploy Adapter (e.g. GemJoin)
  • export JOIN=$(dapp create GemJoin "$MCD_VAT" "$ILK" "$TOKEN")
  1. Deploy Flip Auction and set permissions (e.g. Flipper)
  • export FLIP=$(dapp create Flipper "$MCD_VAT" "$ILK")

  • seth send "$FLIP" 'rely(address)' "$MCD_PAUSE_PROXY"

  • seth send "$FLIP" 'deny(address)' "$ETH_FROM"

  1. Export New Collateral Type variables
  • export LINE=<DEBT CEILING VALUE> (e.g. 5M DAI "$(seth --to-uint256 $(echo "5000000"*10^45 | bc))")
  • export MAT=<LIQUIDATION RATIO VALUE> (e.g. 150% "$(seth --to-uint256 $(echo "150"*10^25 | bc))")
  • export DUTY=<STABILITY FEE VALUE> (e.g. 1% yearly "$(seth --to-uint256 1000000000315522921573372069)")
  • export CHOP=<LIQUIDATION PENALTY VALUE> (e.g. 10% "$(seth --to-uint256 $(echo "110"*10^25 | bc))")
  • export LUMP=<LIQUIDATION QUANTITY VALUE> (e.g. 1K DAI "$(seth --to-uint256 $(echo "1000"*10^18 | bc))")
  1. Deploy Spell
  • export SPELL=$(seth send --create out/DssAddIlkSpell.bin 'DssAddIlkSpell(bytes32,address,address[8] memory,uint256[5] memory)' $ILK $MCD_PAUSE ["${MCD_VAT#0x}","${MCD_CAT#0x}","${MCD_JUG#0x}","${MCD_SPOT#0x}","${MCD_END#0x}","${JOIN#0x}","${PIP#0x}","${FLIP#0x}"] ["$LINE","$MAT","$DUTY","$CHOP","$LUMP"])
  1. Create slate
  • seth send "$MCD_ADM" 'etch(address[] memory)' ["${SPELL#0x}"]
  1. Wait for the Spell to be elected

  2. Schedule Spell

  • seth send "$SPELL" 'schedule()'
  1. Wait for Pause delay

  2. Cast Spell

  • seth send "$SPELL" 'cast()'

dss-add-ilk-spell's People

Contributors

brianmcmichael avatar gbalabasquer avatar godsflaw avatar zdumitru avatar

Watchers

 avatar

Forkers

cleancoindev2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.