# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nondollar.life/autonomint/technical-docs/smart-contracts-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
