BTB
/

USDD

CDPwebsite
Over-collateralized, MakerDAO (DSS)-style USD stablecoin on TRON, Ethereum and BNB Chain. Agents can mint/redeem USDD 1:1 against USDT/USDC through the Peg Stability Module (PSM), earn the savings rate by depositing USDD into sUSDD (ERC-4626, Ethereum and BNB Chain), open collateralized vaults (CDPs) via DSProxy + DssProxyActions, and migrate legacy USDDOLD to USDD on TRON.

What you can do

mint USDD with USDT (PSM)Swap USDT (or USDC) into USDD 1:1 minus tin.Check PSM.sellEnabled()==1 and tin(). approve USDT to the PSM's GemJoin (Ethereum 0x217e42CEB2eAE9ECB788fDF0e31c806c531760A3, BSC 0xe229FdA620B8a9B98ef184830EE3063F0F86B790, TRON TSUYvQ5tdd3DijCD1uGunGLpftHuSZ12sQ), then PSM.sellGem(recipient, amount in USDT decimals: 6 on Ethereum/TRON, 18 on BSC).
redeem USDD for USDT (PSM)Swap USDD into USDT (or USDC) 1:1 plus tout.Check buyEnabled()==1, tout() and that the GemJoin holds enough USDT (USDT.balanceOf(gemJoin)). approve USDD (amount*10^(18-gemDecimals) plus fee) to the PSM, then PSM.buyGem(recipient, amount in USDT decimals).
earn savings (sUSDD)Deposit USDD into sUSDD on Ethereum or BNB Chain.approve USDD to sUSDD (Ethereum 0xC5d6A7B61d18AfA11435a889557b068BB9f29930, BSC 0x8bA9dA757d1D66c58b1ae7e2ED6c04087348A82d), then sUSDD.deposit(assets, receiver). Exit any time with redeem(shares, receiver, owner). Value: convertToAssets(shares).
open a vaultBorrow USDD against collateral (e.g. TRX on TRON).ProxyRegistry.build() once to get a DSProxy (read ProxyRegistry.proxies(owner)). Then DSProxy.execute(ProxyActions, abi.encodeWithSignature('openLockTRXAndDraw(address,address,address,address,bytes32,uint256)', cdpManager, jug, TRX-A join TJ1VWPvFVq7sVsN7J7dWJVZz4SLT14qRUr, usddJoin, 'TRX-A', wadD)) with the TRX as call value. Jug and USDD Join addresses are on the deployment-addresses page. Keep collateral ratio well above the ilk minimum or the vault is liquidated (Dutch auction).
migrate USDDOLDConvert legacy USDD (USDDOLD, TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn) to USDD 2.0 on TRON.approve USDDOLD to TQrq2p1aoAkNK94q3Q69ubJcv5nQ9y675R, then exchange(amount).
Two different tokens named USDD exist on TRON: USDD 2.0 is TXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz; the 2022 token TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn is now 'USDDOLD' (issued by TRON DAO Reserve). Always check the contract address. The legacy 2022 Ethereum USDD contract is not the current one.
Peg history: the original USDD (now USDDOLD) traded well below $1 in mid-2022 (widely reported lows around $0.93) and took months to recover. USDD 2.0 relaunched in January 2025 with Maker-style vaults and a PSM.
Collateral includes volatile assets (TRX, sTRX, WBTC, ETH), stablecoins (USDT, USDC via PSM) and protocol-run Smart Allocator ilks (SA001-A/SA002-A), which mint USDD that the team deploys into external yield venues such as Aave; their returns fund the savings rate and they carry those venues' risks.
Admin powers: governance 'wards' can mint USDD, change PSM fees (tin/tout) and disable sellGem/buyGem, change debt ceilings and rates, and trigger emergency shutdown (ESM/End). The USDD token contract itself has no blacklist/freeze or pause function (DAI-style), but USDT and USDC held by the PSM can be frozen by their issuers, and the Ethereum USDT GemJoin stops working if Tether upgrades USDT until governance whitelists the new implementation.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
USDD (TRC-20, USDD 2.0)token on tronTXDk8mbtRbXeYuMNS83CfKPaYYT8XWv9Hz
read balanceOf(address)
USDD balance (18 decimals on every chain).
write transfer(address,uint256)
Transfer USDD (wei, 18 decimals).
write approve(address,uint256)
Approve a spender, e.g. the PSM TBXW4hS5KYjjbJXDpnrPf4zhkLwrpUjbyz before buyGem.
read allowance(address,address)
Current allowance (owner, spender).
read totalSupply()
USDD supply on this chain.
read decimals()
18.
PSM USDT (MCD_PSM_USDT_A)exchange on tronTBXW4hS5KYjjbJXDpnrPf4zhkLwrpUjbyz
write sellGem(address,uint256)
Stablecoin -> USDD. Args (usr = USDD recipient, gemAmt in USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t units, 6 decimals). First approve USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t to the PSM's GemJoin TSUYvQ5tdd3DijCD1uGunGLpftHuSZ12sQ (NOT the PSM; the join pulls the tokens from msg.sender). Receives gemAmt scaled to 18 decimals minus tin fee. tin and tout were 0 at research time.
write buyGem(address,uint256)
USDD -> stablecoin. Args (usr = recipient of USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t, gemAmt in USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t units, 6 decimals). First approve USDD to the PSM itself; it pulls gemAmt*10^(18-6) USDD plus the tout fee. Reverts if the PSM holds less USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t than requested.
read tin()
Fee on sellGem, WAD (1e18 = 100%).
read tout()
Fee on buyGem, WAD (1e18 = 100%).
read sellEnabled()
1 if sellGem is enabled; governance can switch it off.
read buyEnabled()
1 if buyGem is enabled; governance can switch it off.
read gemJoin()
GemJoin adapter that holds the stablecoin (approval target for sellGem).
read usdd()
USDD token address.
PSM USDT GemJoin (JOIN_PSM_USDT_A, AuthGemJoin5)other on tronTSUYvQ5tdd3DijCD1uGunGLpftHuSZ12sQ
read gem()
Underlying stablecoin (USDT TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t).
read dec()
Stablecoin decimals.
read live()
1 while the adapter is live; 0 after cage (emergency shutdown).
USDD Migration (USDDExchange)other on tronTQrq2p1aoAkNK94q3Q69ubJcv5nQ9y675R
write exchange(uint256)
Swap USDDOLD (TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDn) for USDD 2.0 at EXCHANGE_RATE (1 = 1:1), amount in wei (18 decimals). The contract pulls USDDOLD, so approve USDDOLD to this contract first. The docs describe this as migrate(usr, wad); the deployed contract's on-chain ABI exposes exchange(uint256).
read EXCHANGE_RATE()
Old-to-new exchange rate (1 at research time).
read paused()
True if migration is paused by the owner.
read oldUSDD()
USDDOLD token address.
read newUSDD()
USDD 2.0 token address.
ProxyRegistryother on tronTHuVWkvAikvSqmoZXHMUQJAcocsgFr4wuk
write build()
Deploy a DSProxy owned by msg.sender (one per user; needed for vault operations). Returns the proxy address.
read proxies(address)
DSProxy of an owner (zero if none).
DssProxyActions (vaults)vault on tronTEk9usYZsunkc5oYijyMte6sGurspik2Js
write open(address,bytes32,address)
Open an empty vault: (cdpManager, ilk as bytes32 e.g. 'TRX-A', usr = your DSProxy). Returns cdp id. Like every ProxyActions call, it must be sent as DSProxy.execute(ProxyActions, calldata) (delegatecall), never directly.
write openLockTRXAndDraw(address,address,address,address,bytes32,uint256)
Open a vault, lock native TRX (msg.value) and draw USDD: (cdpManager, jug, trxJoin, usddJoin, ilk, wadD = USDD to draw, 18 decimals). Send via DSProxy.execute with value.
write openLockGemAndDraw(address,address,address,address,bytes32,uint256,uint256,bool)
Open a vault, lock an ERC/TRC-20 collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, ilk, amtC in collateral decimals, wadD, transferFrom = true to pull from the owner). Approve the collateral to your DSProxy first.
write lockTRXAndDraw(address,address,address,address,uint256,uint256)
Add native TRX collateral and draw more USDD on an existing vault: (cdpManager, jug, trxJoin, usddJoin, cdp, wadD).
write lockGemAndDraw(address,address,address,address,uint256,uint256,uint256,bool)
Add token collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, cdp, amtC, wadD, transferFrom).
write draw(address,address,address,uint256,uint256)
Draw more USDD: (cdpManager, jug, usddJoin, cdp, wad).
write wipe(address,address,uint256,uint256)
Repay USDD debt: (cdpManager, usddJoin, cdp, wad). Approve USDD to your DSProxy first.
write wipeAll(address,address,uint256)
Repay all debt of a vault: (cdpManager, usddJoin, cdp).
write wipeAllAndFreeTRX(address,address,address,uint256,uint256)
Repay all debt and withdraw native TRX: (cdpManager, trxJoin, usddJoin, cdp, amtC).
write wipeAllAndFreeGem(address,address,address,uint256,uint256)
Repay all debt and withdraw token collateral: (cdpManager, gemJoin, usddJoin, cdp, amtC).
write freeTRX(address,address,uint256,uint256)
Withdraw native TRX collateral: (cdpManager, trxJoin, cdp, wad).
DssCdpManagervault on tronTDDWjmQaquEtUn1Pa8wCd8dfWFPdQLGPYL
read first(address)
First vault id owned by an owner (the DSProxy for app-created vaults).
read count(address)
Number of vaults owned.
read list(uint256)
Linked list (prev, next) to enumerate an owner's vaults.
read ilks(uint256)
Collateral type (bytes32) of a vault.
read urns(uint256)
Urn address of a vault; read its debt/collateral with Vat.urns(ilk, urn).
read owns(uint256)
Owner of a vault.
Vat (core accounting)other on tronTH5dhX7o39afSbfDT2e3c9k4itWjNKD4D9
read ilks(bytes32)
Collateral type params: (Art total normalized debt, rate, spot, line debt ceiling [RAD], dust min debt [RAD]).
read urns(bytes32,address)
Vault state (ink collateral, art normalized debt); debt in USDD = art * rate / 1e27.
read live()
1 unless global settlement (End) has been triggered.
TRX-A collateral join (JOIN_TRX_A)vault on tronTJ1VWPvFVq7sVsN7J7dWJVZz4SLT14qRUr
read ilk()
Collateral type (TRX-A).
read live()
1 while live.
USDD (ERC-20)token on ethereum0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A
read balanceOf(address)
USDD balance (18 decimals on every chain).
write transfer(address,uint256)
Transfer USDD (wei, 18 decimals).
write approve(address,uint256)
Approve a spender, e.g. the PSM before buyGem, or sUSDD before deposit.
read allowance(address,address)
Current allowance (owner, spender).
read totalSupply()
USDD supply on this chain.
read decimals()
18.
write permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)
DAI-style permit (holder, spender, nonce, expiry, allowed, v, r, s): allowed=true sets an unlimited allowance, false sets 0. Not EIP-2612.
sUSDD (Savings USDD, ERC-4626)vault on ethereum0xC5d6A7B61d18AfA11435a889557b068BB9f29930
write deposit(uint256,address)
Deposit USDD (assets, 18 decimals) and mint sUSDD to receiver: (assets, receiver). Approve USDD 0x4f8e5DE400DE08B164E7421B3EE387f461beCD1A to sUSDD first. Returns shares.
write deposit(uint256,address,uint16)
Same as deposit with a uint16 referral code (emits a Referral event).
write mint(uint256,address)
Mint an exact number of sUSDD shares: (shares, receiver). Returns USDD assets pulled.
write redeem(uint256,address,address)
Burn sUSDD shares for USDD: (shares, receiver, owner). No lock-up. Returns assets.
write withdraw(uint256,address,address)
Withdraw an exact USDD amount: (assets, receiver, owner). Returns shares burned.
read convertToAssets(uint256)
USDD value of a sUSDD amount (both 18 decimals); grows over time with the savings rate.
read previewDeposit(uint256)
sUSDD shares minted for a USDD deposit.
read previewRedeem(uint256)
USDD received for redeeming shares.
read maxWithdraw(address)
Max USDD an owner can withdraw.
read totalAssets()
Total USDD held (including accrued savings).
read chi()
Rate accumulator (RAY, 1e27) from the savings Pot; USDD per sUSDD = chi/1e27 after drip.
read pot()
Savings Pot contract whose dsr() (per-second RAY rate) sets the yield.
read balanceOf(address)
sUSDD balance (18 decimals).
PSM USDT (MCD_PSM_USDT_A, UsddPsm7)exchange on ethereum0xcE355440c00014A229bbEc030A2B8f8EB45a2897
write sellGem(address,uint256)
Stablecoin -> USDD. Args (usr = USDD recipient, gemAmt in USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7 units, 6 decimals). First approve USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7 to the PSM's GemJoin 0x217e42CEB2eAE9ECB788fDF0e31c806c531760A3 (NOT the PSM; the join pulls the tokens from msg.sender). Receives gemAmt scaled to 18 decimals minus tin fee. tin and tout were 0 at research time.
write buyGem(address,uint256)
USDD -> stablecoin. Args (usr = recipient of USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7, gemAmt in USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7 units, 6 decimals). First approve USDD to the PSM itself; it pulls gemAmt*10^(18-6) USDD plus the tout fee. Reverts if the PSM holds less USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7 than requested.
read tin()
Fee on sellGem, WAD (1e18 = 100%).
read tout()
Fee on buyGem, WAD (1e18 = 100%).
read sellEnabled()
1 if sellGem is enabled; governance can switch it off.
read buyEnabled()
1 if buyGem is enabled; governance can switch it off.
read gemJoin()
GemJoin adapter that holds the stablecoin (approval target for sellGem).
read usdd()
USDD token address.
PSM USDT GemJoin (JOIN_PSM_USDT_A, AuthGemJoin7)other on ethereum0x217e42CEB2eAE9ECB788fDF0e31c806c531760A3
read gem()
Underlying stablecoin (USDT 0xdAC17F958D2ee523a2206206994597C13D831ec7).
read dec()
Stablecoin decimals.
read live()
1 while the adapter is live; 0 after cage (emergency shutdown).
read implementations(address)
AuthGemJoin7 only accepts USDT while USDT's current implementation (USDT.upgradedAddress()) is whitelisted here; if Tether upgrades USDT, joins/exits revert until governance whitelists it.
PSM USDC (MCD_PSM_USDC_A)exchange on ethereum0x12d0351F68035a41D13fc8324562e2d51B7A3b93
write sellGem(address,uint256)
Stablecoin -> USDD. Args (usr = USDD recipient, gemAmt in USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 units, 6 decimals). First approve USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 to the PSM's GemJoin 0x9A7E1B324060dB7342aeA08c0dc56F55CEd6F519 (NOT the PSM; the join pulls the tokens from msg.sender). Receives gemAmt scaled to 18 decimals minus tin fee. tin was 0.2% (2e15) and tout 0 at research time.
write buyGem(address,uint256)
USDD -> stablecoin. Args (usr = recipient of USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, gemAmt in USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 units, 6 decimals). First approve USDD to the PSM itself; it pulls gemAmt*10^(18-6) USDD plus the tout fee. Reverts if the PSM holds less USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 than requested.
read tin()
Fee on sellGem, WAD (1e18 = 100%).
read tout()
Fee on buyGem, WAD (1e18 = 100%).
read sellEnabled()
1 if sellGem is enabled; governance can switch it off.
read buyEnabled()
1 if buyGem is enabled; governance can switch it off.
read gemJoin()
GemJoin adapter that holds the stablecoin (approval target for sellGem).
read usdd()
USDD token address.
PSM USDC GemJoin (JOIN_PSM_USDC_A, AuthGemJoin5)other on ethereum0x9A7E1B324060dB7342aeA08c0dc56F55CEd6F519
read gem()
Underlying stablecoin (USDC 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48).
read dec()
Stablecoin decimals.
read live()
1 while the adapter is live; 0 after cage (emergency shutdown).
ProxyRegistryother on ethereum0x8BE6B814bEb37e8028258777Af0ec6648A2A908E
write build()
Deploy a DSProxy owned by msg.sender (one per user; needed for vault operations). Returns the proxy address.
read proxies(address)
DSProxy of an owner (zero if none).
DssProxyActions (vaults)vault on ethereum0xb80751eF88d07FA33EE4fc0c6f8B4B6C6C31E708
write open(address,bytes32,address)
Open an empty vault: (cdpManager, ilk as bytes32 e.g. 'ETH-A', usr = your DSProxy). Returns cdp id. Like every ProxyActions call, it must be sent as DSProxy.execute(ProxyActions, calldata) (delegatecall), never directly.
write openLockETHAndDraw(address,address,address,address,bytes32,uint256)
Open a vault, lock native ETH (msg.value) and draw USDD: (cdpManager, jug, ethJoin, usddJoin, ilk, wadD = USDD to draw, 18 decimals). Send via DSProxy.execute with value.
write openLockGemAndDraw(address,address,address,address,bytes32,uint256,uint256,bool)
Open a vault, lock an ERC/TRC-20 collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, ilk, amtC in collateral decimals, wadD, transferFrom = true to pull from the owner). Approve the collateral to your DSProxy first.
write lockETHAndDraw(address,address,address,address,uint256,uint256)
Add native ETH collateral and draw more USDD on an existing vault: (cdpManager, jug, ethJoin, usddJoin, cdp, wadD).
write lockGemAndDraw(address,address,address,address,uint256,uint256,uint256,bool)
Add token collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, cdp, amtC, wadD, transferFrom).
write draw(address,address,address,uint256,uint256)
Draw more USDD: (cdpManager, jug, usddJoin, cdp, wad).
write wipe(address,address,uint256,uint256)
Repay USDD debt: (cdpManager, usddJoin, cdp, wad). Approve USDD to your DSProxy first.
write wipeAll(address,address,uint256)
Repay all debt of a vault: (cdpManager, usddJoin, cdp).
write wipeAllAndFreeETH(address,address,address,uint256,uint256)
Repay all debt and withdraw native ETH: (cdpManager, ethJoin, usddJoin, cdp, amtC).
write wipeAllAndFreeGem(address,address,address,uint256,uint256)
Repay all debt and withdraw token collateral: (cdpManager, gemJoin, usddJoin, cdp, amtC).
write freeETH(address,address,uint256,uint256)
Withdraw native ETH collateral: (cdpManager, ethJoin, cdp, wad).
DssCdpManagervault on ethereum0xB5b08E58E804E5937f56b1E633CF85AbBD269127
read first(address)
First vault id owned by an owner (the DSProxy for app-created vaults).
read count(address)
Number of vaults owned.
read list(uint256)
Linked list (prev, next) to enumerate an owner's vaults.
read ilks(uint256)
Collateral type (bytes32) of a vault.
read urns(uint256)
Urn address of a vault; read its debt/collateral with Vat.urns(ilk, urn).
read owns(uint256)
Owner of a vault.
Vat (core accounting)other on ethereum0xFf77F6209239DEB2c076179499f2346b0032097f
read ilks(bytes32)
Collateral type params: (Art, rate, spot, line [RAD], dust [RAD]).
read urns(bytes32,address)
Vault state (ink, art); debt = art * rate / 1e27.
read live()
1 unless global settlement has been triggered.
USDD Joinother on ethereum0x983DFef6d71862d809e239845Da5A959492f63b8
read usdd()
USDD token.
read live()
1 while live.
USDD (BEP-20)token on bsc0x45E51bc23D592EB2DBA86da3985299f7895d66Ba
read balanceOf(address)
USDD balance (18 decimals on every chain).
write transfer(address,uint256)
Transfer USDD (wei, 18 decimals).
write approve(address,uint256)
Approve a spender, e.g. the PSM before buyGem, or sUSDD before deposit.
read allowance(address,address)
Current allowance (owner, spender).
read totalSupply()
USDD supply on this chain.
read decimals()
18.
write permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32)
DAI-style permit (holder, spender, nonce, expiry, allowed, v, r, s): allowed=true sets an unlimited allowance, false sets 0. Not EIP-2612.
sUSDD (Savings USDD, ERC-4626)vault on bsc0x8bA9dA757d1D66c58b1ae7e2ED6c04087348A82d
write deposit(uint256,address)
Deposit USDD (assets, 18 decimals) and mint sUSDD to receiver: (assets, receiver). Approve USDD 0x45E51bc23D592EB2DBA86da3985299f7895d66Ba to sUSDD first. Returns shares.
write deposit(uint256,address,uint16)
Same as deposit with a uint16 referral code (emits a Referral event).
write mint(uint256,address)
Mint an exact number of sUSDD shares: (shares, receiver). Returns USDD assets pulled.
write redeem(uint256,address,address)
Burn sUSDD shares for USDD: (shares, receiver, owner). No lock-up. Returns assets.
write withdraw(uint256,address,address)
Withdraw an exact USDD amount: (assets, receiver, owner). Returns shares burned.
read convertToAssets(uint256)
USDD value of a sUSDD amount (both 18 decimals); grows over time with the savings rate.
read previewDeposit(uint256)
sUSDD shares minted for a USDD deposit.
read previewRedeem(uint256)
USDD received for redeeming shares.
read maxWithdraw(address)
Max USDD an owner can withdraw.
read totalAssets()
Total USDD held (including accrued savings).
read chi()
Rate accumulator (RAY, 1e27) from the savings Pot; USDD per sUSDD = chi/1e27 after drip.
read pot()
Savings Pot contract whose dsr() (per-second RAY rate) sets the yield.
read balanceOf(address)
sUSDD balance (18 decimals).
PSM USDT (MCD_PSM_USDT_A)exchange on bsc0x939d3FB56cd12d68CaA1125cc57a8d2391F7Ee29
write sellGem(address,uint256)
Stablecoin -> USDD. Args (usr = USDD recipient, gemAmt in USDT 0x55d398326f99059fF775485246999027B3197955 units, 18 decimals). First approve USDT 0x55d398326f99059fF775485246999027B3197955 to the PSM's GemJoin 0xe229FdA620B8a9B98ef184830EE3063F0F86B790 (NOT the PSM; the join pulls the tokens from msg.sender). Receives gemAmt scaled to 18 decimals minus tin fee. tin and tout were 0 at research time.
write buyGem(address,uint256)
USDD -> stablecoin. Args (usr = recipient of USDT 0x55d398326f99059fF775485246999027B3197955, gemAmt in USDT 0x55d398326f99059fF775485246999027B3197955 units, 18 decimals). First approve USDD to the PSM itself; it pulls gemAmt*10^(18-18) USDD plus the tout fee. Reverts if the PSM holds less USDT 0x55d398326f99059fF775485246999027B3197955 than requested.
read tin()
Fee on sellGem, WAD (1e18 = 100%).
read tout()
Fee on buyGem, WAD (1e18 = 100%).
read sellEnabled()
1 if sellGem is enabled; governance can switch it off.
read buyEnabled()
1 if buyGem is enabled; governance can switch it off.
read gemJoin()
GemJoin adapter that holds the stablecoin (approval target for sellGem).
read usdd()
USDD token address.
PSM USDT GemJoin (JOIN_PSM_USDT_A)other on bsc0xe229FdA620B8a9B98ef184830EE3063F0F86B790
read gem()
Underlying stablecoin (USDT 0x55d398326f99059fF775485246999027B3197955).
read dec()
Stablecoin decimals.
read live()
1 while the adapter is live; 0 after cage (emergency shutdown).
PSM USDCexchange on bsc0x57f7ef5f22c8DB13E4F181fc218478a749d7EC4f
write sellGem(address,uint256)
Stablecoin -> USDD. Args (usr = USDD recipient, gemAmt in USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d units, 18 decimals). First approve USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d to the PSM's GemJoin 0x664781cA89A786E66120cD98187d731850516cb3 (NOT the PSM; the join pulls the tokens from msg.sender). Receives gemAmt scaled to 18 decimals minus tin fee. tin was 0.2% (2e15) and tout 0 at research time.
write buyGem(address,uint256)
USDD -> stablecoin. Args (usr = recipient of USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d, gemAmt in USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d units, 18 decimals). First approve USDD to the PSM itself; it pulls gemAmt*10^(18-18) USDD plus the tout fee. Reverts if the PSM holds less USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d than requested.
read tin()
Fee on sellGem, WAD (1e18 = 100%).
read tout()
Fee on buyGem, WAD (1e18 = 100%).
read sellEnabled()
1 if sellGem is enabled; governance can switch it off.
read buyEnabled()
1 if buyGem is enabled; governance can switch it off.
read gemJoin()
GemJoin adapter that holds the stablecoin (approval target for sellGem).
read usdd()
USDD token address.
PSM USDC GemJoinother on bsc0x664781cA89A786E66120cD98187d731850516cb3
read gem()
Underlying stablecoin (USDC 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d).
read dec()
Stablecoin decimals.
read live()
1 while the adapter is live; 0 after cage (emergency shutdown).
ProxyRegistryother on bsc0x0144FCCe201dc3957FcF75269C10c21cCa41ba73
write build()
Deploy a DSProxy owned by msg.sender (one per user; needed for vault operations). Returns the proxy address.
read proxies(address)
DSProxy of an owner (zero if none).
DssProxyActions (vaults)vault on bsc0x777684F6425D095e9166f5f694F50e48A16bCB25
write open(address,bytes32,address)
Open an empty vault: (cdpManager, ilk as bytes32 - read available ilks from the public API /api/v1/vault/collaterals; BSC currently lists PSM and Smart Allocator ilks), usr = your DSProxy). Returns cdp id. Like every ProxyActions call, it must be sent as DSProxy.execute(ProxyActions, calldata) (delegatecall), never directly.
write openLockGemAndDraw(address,address,address,address,bytes32,uint256,uint256,bool)
Open a vault, lock an ERC/TRC-20 collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, ilk, amtC in collateral decimals, wadD, transferFrom = true to pull from the owner). Approve the collateral to your DSProxy first.
write lockGemAndDraw(address,address,address,address,uint256,uint256,uint256,bool)
Add token collateral and draw USDD: (cdpManager, jug, gemJoin, usddJoin, cdp, amtC, wadD, transferFrom).
write draw(address,address,address,uint256,uint256)
Draw more USDD: (cdpManager, jug, usddJoin, cdp, wad).
write wipe(address,address,uint256,uint256)
Repay USDD debt: (cdpManager, usddJoin, cdp, wad). Approve USDD to your DSProxy first.
write wipeAll(address,address,uint256)
Repay all debt of a vault: (cdpManager, usddJoin, cdp).
write wipeAllAndFreeGem(address,address,address,uint256,uint256)
Repay all debt and withdraw token collateral: (cdpManager, gemJoin, usddJoin, cdp, amtC).
DssCdpManagervault on bsc0xa4109496a660eBc8D74dE991ac3b04c136C9BA09
read first(address)
First vault id owned by an owner (the DSProxy for app-created vaults).
read count(address)
Number of vaults owned.
read list(uint256)
Linked list (prev, next) to enumerate an owner's vaults.
read ilks(uint256)
Collateral type (bytes32) of a vault.
read urns(uint256)
Urn address of a vault; read its debt/collateral with Vat.urns(ilk, urn).
read owns(uint256)
Owner of a vault.