# Smart Contracts

{% hint style="info" %}
The smart contracts of AshSwap have not been public. We plan to make it open source in the future after having all the security audits in place.
{% endhint %}

### Overview

#### Pool Contracts

The Pool Contract acts as an AMM for trading tokens. The AMM is based on Curve's algorithm used for the stable coin. Fee contains two types of fees: trading fee and admin fee.

The trading fee will stay in the liquidity pool to leverage LP holder interest. The admin fee will be sent to the veASH holder.

#### [Router Contract](https://explorer.multiversx.com/accounts/erd1qqqqqqqqqqqqqpgqjtlmapv42pcga5nglgfrnpqvkq06wdqx4fvsvw6xpt)

Manager of Pool Contracts. All Pool Contracts will be deployed through the router. Currently, only the admin (owner) can interact with it.

Another function of the Router is collecting the admin fee from pools and transfer to the Fee Distributor Contract.

This contract may also be referred to as our **Factory Contract.**

#### Farm Contract

The Farm Contract is a contract where users can lock their LP token to receive ASH.

Following Maiar Exchange, the farm position is represented by Farm Token, which is a Semi-Fungible Token. The reasoning behind this is that to calculate the reward for the token owner without storing anything on a smart contract.

#### Voting Escrow Contract (DAO)

Contract where users can lock their ASH token for pre-set periods to gain veASH (Votes). Votes have weight depending on time. A user who has veASH can receive an admin fee from Pool Contract as their reward.

Besides that, they can use their veASH as a voting weight in the DAO voting system.

#### Fee Distributor Contract

The contract contains the admin fee that is collected from Pools and distribute it into veASH owner.


---

# 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.ashswap.io/developers/smart-contracts.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.
