# Smart Contact

The [kurosawa\_akira](https://github.com/LayerAkira/kurosawa_akira) repository is a collection of Cairo smart contracts for our exchange.

Below is an overview of the various modules that make up the LayerAkira contract system. Each module plays a specific role in the functionality of the LayerAkira smart contract.

#### `LayerAkira.cairo`

* Main contract module integrating various components
* Includes functions for total supply, balance inquiries, Router operations, and trade validations
* It combines user functions such as deposits, withdrawals, and nonce operations

#### `DepositComponent.cairo`

* Handles deposit functionalities
* Allows users to deposit tokens into the contract

#### `ExchangeBalanceComponent.cairo`

* Manages our Exchange balance operations
* Covers total supply, balance inquiries, gas info and fee recipient

#### `NonceComponent.cairo`

* Manages nonce operations

#### `Order.cairo`

* Defines the structure and operations related to orders
* Includes details on fees, flags, and trade prevention modes (validators)

#### `EcosystemTradeComponent.cairo` & Router`TradeComponent.cairo`

* Handle the logic for executing Ecosystem trades and Router trades&#x20;

#### `WithdrawComponent.cairo`

* Handles withdrawal operations

#### `RouterComponent.cairo`

* Manages routing functionalities

#### `SignerComponent.cairo`

* Responsible for signature verification

#### `FundsTraits.cairo`

* Provides utility functions.
* Relates to Poseidon hashing and signature checks

#### `Utils`

* Includes utility modules such as `erc20.cairo`, `account.cairo`, and `SlowModeLogic.cairo`
* Covers ERC20 operations, account management, and trade execution delay logic


---

# 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://layer-akira.gitbook.io/layerakira-documentation/integration/smart-contact.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.
