Makerdao

Makerdao stablecoins share the Vat accounting engine

Updated

Makerdao uses the Vat accounting engine for the Multi-Collateral Dai system that underlies both Dai and USDS. The project adopted the Sky name in 2024, while this accounting system continued. Dai and USDS remain separate transferable tokens, and their Ethereum converter exchanges them at a fixed 1:1 ratio. The common ledger connects collateral and debt, while adapters connect internal balances to external tokens. A conversion, a repayment and a savings deposit change different records.

In short: A Dai-to-USDS conversion changes the token balance, while a Vault repayment reduces the debt recorded against collateral.

Collateral draws create an internal Dai balance

Drawing Dai against accepted collateral increases a Vault’s recorded debt and creates an internal Dai balance for its designated recipient. The Vat records both sides of that operation. Each Vault has a collateral balance, called ink , and normalized debt, called art . Its collateral type supplies the risk settings that govern permitted adjustments. The core evaluates borrowing against those settings, which include collateral requirements and limits on debt creation.

The internal Dai balance belongs to an address within Vat accounting. It isn’t automatically the transferable token balance that a wallet displays. Moving that value into a token contract requires the connection between the two ledgers. A token transfer moves the holder’s stablecoins; the originating Vault retains its collateral and debt records.


Are Dai wallet balances the same as Vat balances?

Wallet tokens and Vat balances use separate ledgers, connected by adapters such as DaiJoin. Dai’s ERC-20 contract records external balances that wallets can transfer. The Vat maintains the internal balances that core protocol operations use. An address can have entries in both systems, so a wallet’s token balance doesn’t reveal its complete internal accounting position.

DaiJoin connects internal value to tokens

DaiJoin’s exit operation transfers internal Dai to the adapter and mints corresponding external Dai for the recipient. Its join operation burns external Dai supplied by the caller and credits the recipient with internal Dai from the adapter. During normal operation, external Dai supply corresponds to the adapter’s internal Dai balance, after adjusting for their units.

Entering the ledger differs from repaying debt

Bringing Dai into the Vat supplies internal value for operations such as repayment, auctions or Dai savings. Joining doesn’t itself reduce the Vault’s art field. Repayment consumes internal Dai while reducing that normalized debt. The recipient of a ledger credit and the Vault whose debt decreases are distinct parts of the accounting.


The converter exchanges Dai and USDS representations

The Ethereum Dai-USDS converter exchanges the two tokens at a fixed 1:1 ratio. This relationship connects separate token representations of value in the same core system. The exchange changes the holder’s token balance and leaves a pre-existing Vault debt unchanged. Repayment instead reduces borrowing against collateral.

The direct converter charges no protocol conversion fee, and its route doesn’t support enabling that fee later. Ethereum transaction gas remains a separate cost. Other exchange routes have their own rules, so this property belongs to the Dai-USDS converter. The fixed ratio also describes token quantities, without establishing the price that another trading venue will quote.


A collateral rate turns normalized debt into recorded debt

A Vault’s recorded debt equals its normalized debt multiplied by its collateral type’s stored accumulated rate. The Vat stores these concepts separately as art and rate . Normalized debt records the borrowing quantity before applying that multiplier. A changing multiplier updates debt across the Vaults that share the collateral type, without requiring a separate stored fee balance for every Vault.

Jug calculates stability-fee accumulation using the elapsed time since its previous update and the configured rate inputs. Its drip operation applies the rate change through the Vat’s fold operation. Reading the stored rate before that update can omit fee accrual since Jug’s previous update. The same update credits the associated internal Dai surplus to the Vow, the protocol’s balance-sheet contract. Contract integers also need the appropriate fixed-point scaling; multiplying their raw values doesn’t directly produce a human-readable token amount.

Savings balances use an accumulator or a share conversion

The Dai Savings Rate and Sky Savings Rate attach value to different position records. The Pot keeps an internal savings balance; sUSDS issues transferable savings shares. Simply holding Dai or USDS in a wallet doesn’t create either savings position. Entry into the relevant module establishes that additional relationship.

Pot balances and the chi accumulator

The Pot implements the Dai Savings Rate using a recorded balance called pie and an accumulator called chi . Multiplying the position balance by the stored accumulator, with the appropriate scaling, gives its internal Dai value with savings accrued through the last drip update. The Pot’s drip operation updates that accumulator for elapsed time. This separates the size of a savings position from the Dai value that the position represents.

USDS assets and ERC-4626 shares

sUSDS implements USDS savings through the ERC-4626 tokenized-vault standard. Its deposit interface accepts USDS and issues sUSDS shares; its withdrawal interface returns USDS against those shares. The share-to-asset conversion reflects savings accrual, including elapsed time when drip hasn’t recently run. The fixed Dai-USDS exchange ratio therefore doesn’t establish a fixed relationship between each sUSDS share and its underlying USDS assets.

stUSDS also uses an ERC-4626 interface, but its supplied USDS funds borrowing against SKY collateral. That lending relationship determines its variable rate and additional risk exposure. sUSDS represents participation in the variable, governance-set Sky Savings Rate, funded from aggregate protocol surplus. The two modules use a common interface standard for different economic purposes.


Where does liquidated Vault debt go?

Liquidation moves the affected debt into protocol accounting that the Vow manages. In Liquidation 2.0, the Dog transfers collateral into the auction mechanism and assigns the liquidated debt to the protocol. Auction payments credit the Vow’s internal Dai balance. The Vat’s heal operation cancels equal quantities of internal Dai and system debt. Transferring debt into that accounting doesn’t itself mean that the auction has sold collateral or raised enough Dai to cover the obligation.


Peg conversion and collateral recovery measure different things

The stablecoins’ dollar target and their token conversion ratio describe different relationships. A $1 target expresses the intended price anchor. The converter’s 1:1 ratio specifies token amounts in that route. Neither figure establishes the proceeds that the collateral portfolio would realize under stressed recovery conditions. Real-world asset backing involves off-chain agreements and settlement processes, which can take much longer than selling liquid crypto collateral.

LitePSM adds a separate liquidity connection between stablecoins and USDC. Its USDS wrapper routes through the Dai-USDC module, allowing both stablecoins to share USDC liquidity. A swap needs sufficient output liquidity and an enabled direction. Governance controls the module’s directional fee settings and can halt a direction. Those liquidity, fee and halt conditions apply separately from the direct Dai-USDS converter’s rules.

Illustration: Makerdao - Peg conversion and collateral recovery measure different things

View full-size image

Can governance change parameters if the Vat’s code is immutable?

Governance can change permitted parameters even though the Vat’s core accounting code is immutable. Those settings include debt ceilings and the modules that receive authorization. A higher debt ceiling expands the borrowing limit, while the existing collateral requirements continue to apply.

The Ethereum USDS and sUSDS contracts use upgradeable designs with the UUPS pattern and ERC-1967 storage conventions. Their proxy arrangements allow implementation changes through the applicable governance process. Dai uses its own token contract, and savings modules maintain additional position accounting. The shared Vat doesn’t make the implementation properties of every connected contract identical.

Authorized adapters can alter core balances, so faulty or malicious adapter logic can put collateral at risk.

Match the recorded balance to the intended use

Stablecoin transfers, debt repayment and savings deposits depend on different recorded quantities. Identify the relevant balance when choosing among these operations:

USDS transfers move the stablecoin itself. sUSDS transfers move savings shares whose USDS value follows the savings contract’s share-to-asset conversion.

Quick answers about Makerdao

How does Dai encode fractional token amounts on Ethereum?

Dai’s Ethereum token contract uses 18 decimal places. Raw balance values express the amount in units of 10^-18 Dai, so a display converts them by dividing by 10^18. Internal accounting uses its own fixed-point conventions. Comparing raw token integers with Vat fields requires accounting for each field’s units.

Can USDS validate approval signatures from a smart contract wallet?

USDS’s Ethereum contract supports EIP-1271 smart contract signature validation alongside its permit functionality. That provides a way to validate signatures that a compatible contract wallet authorizes. It doesn’t establish that every frontend supports that wallet or that the wallet implements the required validation interface.

Which Vat value tracks all normalized debt for one collateral type?

The Vat’s Ilk.Art field records total normalized debt for a collateral type. It sums the individual art balances of that type’s Vaults. Applying the collateral type’s stored accumulated rate gives the recorded debt, including fees posted through that rate update, with the required fixed-point scaling. The capitalized and lowercase identifiers describe different aggregation levels.

When does DaiJoin disable exits while still accepting Dai?

DaiJoin disables exits when an authorized address cages the adapter. In that state, it can still bring external Dai into Vat accounting, but it can no longer exit internal Dai into external tokens. This directional behavior belongs to DaiJoin; a collateral Join adapter’s shutdown behavior is different.

Does sending tokens directly to a Join adapter record a deposit?

A direct token transfer doesn’t execute the Join adapter’s deposit accounting. Its join function performs the token-specific operations that credit the corresponding internal balance. Sending tokens to the contract address without that call can leave them outside the credited position and prevent retrieval through the normal withdrawal mechanism.

Are ERC-20 allowances equivalent to Vat permissions?

ERC-20 allowances and Vat permissions authorize actions in different contracts. A token allowance lets a spender transfer external tokens within its allowance. The Vat’s hope and nope functions manage permission to affect internal balances. Revoking an allowance doesn’t automatically revoke a separate Vat permission, or vice versa.

Who can update stability-fee accounting through Jug?

Anyone can call Jug’s public drip function for a collateral type. It calculates accrued fees from the existing settings and applies the accounting update. Calling it doesn’t give the caller authority to choose the rate. Administrative changes to the rate inputs require the contract’s governance-controlled authorization.