USDD Docs
  • INTRODUCTION
    • What is the new version of USDD?
    • What is USDDOLD?
    • Why upgrade USDD?
    • Core Features
    • Collateral Asset Contract Addresses
  • Ecosystem Migration Progress
  • SYSTEM ARCHITECTURE
    • System Architecture
  • USER GUIDE
    • Getting Started
    • Open a Vault
    • Manage a Vault
    • Close a Vault
    • Liquidation
    • Collateral Auction
    • PSM (Peg Stability Module)
    • Migrate
  • DEVELOPERS
    • Glossary
    • Core Contracts
      • Vat
      • Dog
      • Clip
      • Spot
      • Jug
      • Median
      • OSM
      • Proxy contract
      • PSM
      • Migrate
    • Deployment Addresses
    • Liquidation & Auction
      • Key Features of Liquidation
      • Example Process
      • Benefits
    • Oracle
  • GOVERNANCE
    • Overview
  • SECURITY
    • Secure Framework
    • Audits
  • LRGALS
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page
  • Purpose
  • Key Responsibilities
  • Key Methods
Export as PDF
  1. DEVELOPERS
  2. Core Contracts

Vat

Purpose

The core accounting contract of the protocol, VAT tracks system-wide balances, including user Vaults, collateral types, and debt. It ensures that all collateral and debt are properly accounted for and enforces system solvency.

Key Responsibilities

  • Tracks collateral and debt balances for all users and collateral types.

  • Ensures Vault operations (e.g., minting and repaying USDD) adhere to protocol parameters.

  • Integrates with other contracts to trigger auctions or manage liquidations.

Key Methods

  • slip(ilk, usr, wad) Adjusts the balance of a specific collateral type (ilk) for a user (usr).

    • Example Use: Adding or removing collateral from a user's Vault.

  • frob(ilk, u, v, w, dink, dart) Adjusts collateral (dink) and debt (dart) for a Vault.

    • Example Use: Minting new USDD or repaying debt.

  • grab(ilk, u, v, w, dink, dart) Executes adjustments on collateral and debt during liquidation.

  • fold(ilk, u, rate) Increase the Ilk.rate with rate, and hence the debt balances of all Vaults collateralized with the specified Ilk are updated implicitly.

  • file(what, data) / file(what, ilk, data) Sets or updates system-wide parameters like debt ceilings, stability fees, or collateralization thresholds.

    • Example Use: Setting a collateral type’s maximum mintable USDD.

PreviousCore ContractsNextDog

Last updated 3 months ago