> For the complete documentation index, see [llms.txt](https://docs.nondollar.life/autonomint/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nondollar.life/autonomint/technical-docs/smart-contracts-flow.md).

# Smart Contracts flow

## Link to smart contract flow

{% embed url="<https://miro.com/app/board/uXjVN0A_INw=/?share_link_id=233969184000>" %}

## Overview of smart contracts

Autonomint protocol has 4 main contracts in which borrowing and dcds are the user interactive contracts.&#x20;

1. Borrowing contract

   **Key Points:**

   * **Contract Purpose:** The `Borrowing` contract facilitates a borrowing mechanism with stablecoin (AMINT) issuance, options integration, collateral management, and connections to external protocols like AAVE and Compound.
   * **Key Features:**
     * Deposit ETH, borrow AMINT stablecoins
     * Integrate options for risk mitigation
     * Manage collateral and liquidations
     * Interact with AAVE and Compound for yield
   * **Governance:** Pause functions via MultiSig
   * **Links to Other Contracts:**
     * `IAMINT`: Stablecoin contract
     * `CDSInterface`: Contract for Credit default swap (CDS)
     * `IABONDToken`: Abond token contract (likely for additional collateralization)
     * `ITreasury`: Treasury contract managing ETH deposits and borrowing
     * `IOptions`: Options contract for risk management
     * `IMultiSign`: MultiSig contract for governance
     * `AggregatorV3Interface`: Chainlink oracle for ETH price
2. dCDS contract

   **Key Points:**

   * **Contract Purpose:** The `dCDS` contract facilitates a staking mechanism with stablecoin in which user can also opt for liquidation gains from borrowing contract. &#x20;
   * **Key Features:**&#x20;
     * Deposit stable-coin, get \~ 50% - 150% of yield and liquidation gains.
   * **Governance:** Pause functions via MultiSig
   * **Links to Other Contracts:**
     * `IAMINT`: Stablecoin contract
     * `IBorrowing` :   Borrowing contract&#x20;
     * `CDSInterface`: Contract for Credit default swap (CDS)
     * `ITreasury`: Treasury contract managing ETH deposits and borrowing
     * `IMultiSign`: MultiSig contract for governance
     * `AggregatorV3Interface`: Chainlink oracle for ETH price
3. Options contract

   **Key Points:**

   * **Contract Purpose:** The `dCDS` contract facilitates a comprehensive set of functionalities for managing options within ecosystem, including price tracking, volatility calculation, option pricing.
   * **Key Features:**&#x20;
     * EMA Calculation of the Ethereum price.
     * Standard Deviation Calculation to compute the standard deviation of Ethereum prices.
     * Option Price Calculation of an option based on Ethereum price, volatility, borrowing volume, CDS pool value, and the chosen strike price percentage.
   * **Links to Other Contracts:**
     * `ITreasury`: Treasury contract managing ETH deposits and borrowing
     * `IBorrowing` :   Borrowing contract&#x20;
     * `CDSInterface`: Contract for Credit default swap (CDS)
