> For the complete documentation index, see [llms.txt](https://layer-akira.gitbook.io/layerakira-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://layer-akira.gitbook.io/layerakira-documentation/integration/smart-contact.md).

# 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
