Davos Docs
  • 🛬Welcome to Davos
    • Mission and Vision
  • 🌸Davos Explained
    • How Davos Works
      • Dynamic Borrowing and Monetary Policy
      • Minting and Utilizing DUSD
      • Innovative Use of Collateral
      • Dynamic Feedback Loop
    • Price Stability Mechanisms
    • Supported Collaterals
      • Expanding the Utility of Collaterals
    • Liquidations
    • Requirements and Fees
    • Benefits of Using Davos Protocol
  • ⚡Protocol Features
    • Omnichain Functionality
      • Bridge
    • Flash Mint
    • DUSD Savings Rate
  • 📚Guides and Tutorials
    • Provide Collateral
    • Borrow DUSD
    • Deposit in DSR
    • Withdraw DUSD from DSR
    • Bridge DUSD
    • Repay DUSD
    • Withdraw Collateral
    • Track or Start Liquidation
  • 🏛️Community & Governance
    • Governance
  • 📄For Developers
    • Development Details
      • Protocol
      • Bridge
      • Flash Mint
      • veDGT Governance
    • Addresses
      • Smart Contracts
      • Tokens
        • DUSD
        • sDUSD
        • Collaterals
    • Smart Contract API
  • 🛡️Security
    • Audit Reports
    • Risks & Best Practises
  • 🔖Resources
    • FAQ
    • Brand assets
Powered by GitBook
On this page
  • Liquidation Penalty
  • chop()
  • Stability/Borrow Fee
  • ilks()
  • Get the minting cap for a specific collateral
  • ilks()
  • Get the borrowed rate for a specific collateral
  • ilks()
  1. For Developers

Smart Contract API

PreviousCollateralsNextSecurity

Last updated 1 year ago

Liquidation Penalty

chop()

Returns the liquidation penalty for an asset.

Parameters

The function takes:

  • ilk (bytes32) — identifier for a collateral. The values are:

    • MATIC on Polygon Mainnet — 0x63654d4154494300000000000000000000000000000000000000000000000000.

    • rETH on Ethereum Mainnet — 0x4d56545f72455448000000000000000000000000000000000000000000000000.

    • sfrxETH on Polygon Mainnet — 0x4d56545f73667278455448000000000000000000000000000000000000000000.

    • stMATIC on Polygon Mainnet — 0x4d56545f73744d41544943000000000000000000000000000000000000000000.

    • wstETH on Polygon Mainnet — 0x4d56545f77737445544800000000000000000000000000000000000000000000.

The function returns:

  • penalty (uint256) — liquidation penalty per collateral. The formula to turn the result into a decimal system number is penalty / 10^18. For example, 1120000000000000000/10^18 = 1.12 = 12%.

Smart contracts

  • (MATIC, stMATIC)

  • (rETH, sfrxETH, wstETH)

Examples

You can query for a liquidation penalty on the contract page by the links above, anytime.

Stability/Borrow Fee

ilks()

Returns the stability fee also known as borrow fee; in simple terms, loan rate.

Parameters

The function takes:

  • ilk (bytes32) — identifier for a collateral. The values are:

    • MATIC on Polygon Mainnet — 0x63654d4154494300000000000000000000000000000000000000000000000000.

    • rETH on Ethereum Mainnet — 0x4d56545f72455448000000000000000000000000000000000000000000000000.

    • sfrxETH on Polygon Mainnet — 0x4d56545f73667278455448000000000000000000000000000000000000000000.

    • stMATIC on Polygon Mainnet — 0x4d56545f73744d41544943000000000000000000000000000000000000000000.

    • wstETH on Polygon Mainnet — 0x4d56545f77737445544800000000000000000000000000000000000000000000.

The function returns:

  • duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is (duty ^31536000) - 1 = borrow_fee. For example, 1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%.

Smart contracts

Examples

You can query for a borrow fee on the contract page by the links above, anytime.

Get the minting cap for a specific collateral

ilks()

Returns the stability fee also known as borrow fee; in simple terms, loan rate.

Parameters

The function takes:

  • ilk (bytes32) — identifier for a collateral. The values are:

    • MATIC on Polygon Mainnet — 0x63654d4154494300000000000000000000000000000000000000000000000000.

    • rETH on Ethereum Mainnet — 0x4d56545f72455448000000000000000000000000000000000000000000000000.

    • sfrxETH on Polygon Mainnet — 0x4d56545f73667278455448000000000000000000000000000000000000000000.

    • stMATIC on Polygon Mainnet — 0x4d56545f73744d41544943000000000000000000000000000000000000000000.

    • wstETH on Polygon Mainnet — 0x4d56545f77737445544800000000000000000000000000000000000000000000.

The function returns:

  • duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is (duty ^31536000) - 1 = borrow_fee. For example, 1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%.

Smart contracts

Examples

You can query for a borrow fee on the contract page by the links above, anytime.

Get the borrowed rate for a specific collateral

ilks()

Returns the stability fee also known as borrow fee; in simple terms, loan rate.

Parameters

The function takes:

  • ilk (bytes32) — identifier for a collateral. The values are:

    • MATIC on Polygon Mainnet — 0x63654d4154494300000000000000000000000000000000000000000000000000.

    • rETH on Ethereum Mainnet — 0x4d56545f72455448000000000000000000000000000000000000000000000000.

    • sfrxETH on Polygon Mainnet — 0x4d56545f73667278455448000000000000000000000000000000000000000000.

    • stMATIC on Polygon Mainnet — 0x4d56545f73744d41544943000000000000000000000000000000000000000000.

    • wstETH on Polygon Mainnet — 0x4d56545f77737445544800000000000000000000000000000000000000000000.

The function returns:

  • duty (uint256) — stability fee a.k.a. borrow fee per collateral. The formula to turn the result into a decimal system number is (duty ^31536000) - 1 = borrow_fee. For example, 1.000000001243680656318820313^31536000 - 1 = 0.04 = 4%.

Smart contracts

Examples

You can query for a borrow fee on the contract page by the links above, anytime.

(MATIC, stMATIC)

(rETH, sfrxETH, wstETH)

(MATIC, stMATIC)

(rETH, sfrxETH, wstETH)

(MATIC, stMATIC)

(rETH, sfrxETH, wstETH)

📄
Dog on Polygon Mainnet
Dog on Ethereum Mainnet
Jug on Polygon Mainnet
Jug on Ethereum Mainnet
Jug on Polygon Mainnet
Jug on Ethereum Mainnet
Jug on Polygon Mainnet
Jug on Ethereum Mainnet