Skip to main content
Decentralized credit protocol behind DAI and USDS stablecoins. Users deposit collateral into Vaults to mint/borrow DAI. Includes the DAI Savings Rate (DSR) via sDAI.

What it offers

  • depositToSDAI: Deposit DAI into Savings DAI vault (ERC-4626)
  • withdrawFromSDAI: Withdraw DAI from sDAI vault by asset amount
  • redeemFromSDAI: Redeem sDAI shares for DAI

Notes

  • sDAI earns DSR yield (ERC-4626 compliant)
  • DSR yield accrues automatically - sDAI appreciates against DAI over time
  • Approve DAI to sDAI contract before depositing
  • Pot is the internal DSR accumulator - chi() tracks the accumulated rate
  • USDS is the rebranded DAI stablecoin

Its names in a program

On Ethereum, Maker is a namespace: its contracts need no import.

Deployments

ABI

PotABI

import PotABI from "./protocols/maker/PotABI.json"; Speaks for: pot.
  • join(uint256 wad)
  • exit(uint256 wad)
  • chi() view returns (uint256)
  • dsr() view returns (uint256)

SavingsDaiABI

import SavingsDaiABI from "./protocols/maker/SavingsDaiABI.json"; Speaks for: sDAI.
  • deposit(uint256 assets, address receiver) returns (uint256 shares)
  • withdraw(uint256 assets, address receiver, address owner) returns (uint256 shares)
  • redeem(uint256 shares, address receiver, address owner) returns (uint256 assets)
  • convertToShares(uint256 assets) view returns (uint256)
  • convertToAssets(uint256 shares) view returns (uint256)

Next steps