Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makerdao/usds
https://github.com/makerdao/usds
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/makerdao/usds
- Owner: makerdao
- License: agpl-3.0
- Created: 2023-05-03T13:40:54.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-07T13:03:45.000Z (3 months ago)
- Last Synced: 2024-12-13T07:42:18.130Z (27 days ago)
- Language: Python
- Size: 1.87 MB
- Stars: 36
- Watchers: 2
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audit/20231124-cantina-report-review-makerdao-nst.pdf
Awesome Lists containing this project
README
# USDS Token and contracts associated
This repository includes 3 smart contracts:
- USDS token
- UsdsJoin
- DaiUsds Converter### USDS token
This is a standard erc20 implementation with regular `permit` functionality + EIP-1271 smart contract signature validation.
The token uses the ERC-1822 UUPS pattern for upgradeability and the ERC-1967 proxy storage slots standard.
It is important that the `UsdsDeploy` library sequence be used for deploying the token.#### OZ upgradeability validations
The OZ validations can be run alongside the existing tests:
`VALIDATE=true forge test --ffi --build-info --extra-output storageLayout`### UsdsJoin
This is the contract in charge of `mint`ing the erc20 IOUs in exchange of native `vat.dai` balance. It also manages the reverse operation, `burn`ing tokens and releasing `vat.dai`.
A noticeable code difference against `DaiJoin` is this contract doesn't have any permissions system at all.
However, in practice, `UsdsJoin` acts the exact same way as the production `DaiJoin` implementation. This is because there isn't any `wards(address)` set there.### DaiUsds
It is a permissionless converter between `Dai` and `Usds` (both ways). Using the `public` functions of `UsdsJoin` and `DaiJoin` moves from one token to the other. The exchange rate is 1:1.
It is just a "convenience" contract, users could still get the same outcome executing the separate methods in the `join`s or use any other converter implementation.