Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
update devdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbreak committed Dec 17, 2017
1 parent 6043044 commit d28fe50
Showing 1 changed file with 31 additions and 12 deletions.
43 changes: 31 additions & 12 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,28 +290,47 @@ change in a future release).

## Auth setup

ds-auth is used, with no owners and a ds-guard authority.
Sai is designed with two authorities, `dad` and `chief`.

The auth setup looks as follows: sai-auth.jpeg [XXX: do this in graphviz]
- `dad` is a DSGuard, and is used for internal contract-contract
permissions, allowing e.g. the `tub` to `mint` and `burn` Sai. `dad`
is the authority of the `tub` and `tap`, and also `sai`, `sin` and
`skr`.

- `chief` restricts access to `top` and `mom`, which are the admin
interfaces to the system. `chief` is intended to be a DSRoles
instance, but any authority implementation could be used.

### Sai v1 features

- `drip` == 1 (optimisation)
- `auth` on all functions
## Deployment

### Changes in Sai v2
Sai is a complex multi-contract system and has a slightly involved
deployment process. The prerequisities to the deployment are:

- `auth` only on admin functions
- updated to latest dappsys
- simplified contract layout
1. `pip`, a collateral price feed
2. `pep`, a governance price feed
3. `gem`, a collateral token
4. `pit`, a token burner
5. `chief`, the external authority

For testing purposes, `bin/deploy` will create the prerequisites for you
if you don't supply them.

## Deployment
In addition, Sai utilises on-chain deployers, called fabs, for creating
fresh basic components on chain. These are defined in `fab.sol`.

The main contract deployment is defined in `DaiFab`, and requires
multiple calls because of the size of the contracts.

Scripts, scripts, scripts.. also see test setup.
The full contracts can be deployed to e.g. ethlive with the following,
after which the contract addresses will be saved in `load-env-ethlive`.

```
bin/deploy-fab
. load-fab-ethlive
bin/deploy
```

Script output gist

## Glossary

Expand Down

0 comments on commit d28fe50

Please sign in to comment.