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

Commit

Permalink
devdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbreak committed Sep 16, 2017
1 parent 0b104ac commit 75c6fbb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 36 deletions.
53 changes: 19 additions & 34 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@ the [white paper], a high level overview of Dai. A reading of the
[purple paper], the (in progress) detailed Dai technical specification
and reference implementation is useful but not required.

XXX: include LL link?

There is ongoing work to specify Sai (and Dai) using Linear Logic,
forming the [teal paper]. This is at a very early draft stage and is
provided for interest. Eventually, this work aims to allow formal
reasoning about system properties.

[white paper]: https://github.com/makerdao/docs/blob/master/Dai.md
[purple paper]: https://makerdao.com/purple
[teal paper]: https://dapphub.github.io/LLsai/sai

### Note on memes

Expand Down Expand Up @@ -58,20 +50,17 @@ Sai uses the following tokens:

Sai has the following core components:

- `jar`: A token wrapper
- `tub`: CDP record store
- `tip`: target price feed
- `tap`: liquidation mechanism
- `top`: global settlement facilitator

TODO: jar, `pot` and `pit` vault info

TOOD: risk parameters


### `jar`: A Token Wrapper
### `skr`: A Token Wrapper

The `jar` is a token wrapper.
`skr` is a token wrapper.

- `join`: deposit `gem` in return for `skr`
- `exit`: claim `gem` with their `skr`.
Expand Down Expand Up @@ -115,7 +104,7 @@ The `tub` is the CDP record system. An individual CDP is called a `cup`
It is crucial to know whether a CDP is well collateralised or not:
`safe(cup)` returns a boolean indicating this.

`safe` aggregates price information from the `tip` and the `jar` and
`safe` aggregates price information from the `tip` and the `tub` and
compares the reference value of a CDPs debt and collateral.

The following `tub` acts are not possible if they would transition a CDP
Expand Down Expand Up @@ -205,8 +194,8 @@ and increasing `per`, giving SKR holders more GEM per SKR. When there is
surplus Woe, SKR is inflated, increasing the SKR supply and decreasing
`per`, giving SKR holders less GEM per SKR.

The reason for wrapping GEM in the `jar` is now apparent: *it provides a
way to socialise losses and gains incurred in the operation of the system.*
The reason for wrapping GEM in SKR is now apparent: *it provides a way
to socialise losses and gains incurred in the operation of the system.*

Two features of this mechanism:

Expand Down Expand Up @@ -255,7 +244,7 @@ total unprocessed revenue, with varying `tax`, in constant time.

## Auth setup

ds-auth is used, with no owners (XXX: check) and two authorities:
ds-auth is used, with no owners and two authorities:

1. `dad`: ds-guard, used for internal authority

Expand Down Expand Up @@ -289,32 +278,28 @@ Script output gist
- `par`: ref per sai
- `tag`: ref per skr
- `pip`: ref per gem
- `price`: sai per gem
- `fix`: gem per sai after `cage`
- `fit`: gem per skr after `cage`

- `fit`: ref per skr after `cage`

### Meme Mnemonics

- `pip`: trading pips
- `jar`: where collateral is kept
- `tip`: target price tip-off
- `cup`: small container for CDP info
- `tub`: larger container for cups
- `tap`: liquidity provider
- `top`: top-level system manager

- `way`: which way the target price is heading
- `mat`:
- `hat`:
- `axe`
- `tax`
- `gap`

- `air`
- `fog`
- `joy`: SKR holders are happy about this
- `woe`: SKR holders are sad about this

- `pot`:
- `pit`: where to put unwanted things
- `hat`: upper limit of Sai issuance
- `mat`: lower limit of collateralisation
- `tax`: continually paid by CDP holders
- `axe`: penalty applied to bad CDP holders
- `gap`: gap between buy and sell

- `pie`: Real collateral that SKR holders share
- `air`: Abstracted Collateral backing CDPs
- `ice`: Debt that is locked up with CDPs
- `fog`: Murky liquidated `air`that we want to get rid of
- `joy`: SKR holders are happy about this Sai surplus
- `woe`: SKR holders are sad about this Sin debt
2 changes: 1 addition & 1 deletion src/tip.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// tip.sol -- target price feed
/// tip.sol -- target price feed (see `vox`)

// Copyright (C) 2017 Nikolai Mushegian <[email protected]>
// Copyright (C) 2017 Daniel Brockman <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/tub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract SaiTub is DSThing, DSWarp, SaiTubEvents {
bool public off; // Cage flag
bool public out; // Post cage exit

uint256 public fit; // Gem per SKR (just before settlement)
uint256 public fit; // REF per SKR (just before settlement)

uint64 public rho; // Time of last drip
uint256 _chi; // Price of internal debt unit
Expand Down

0 comments on commit 75c6fbb

Please sign in to comment.