> For the complete documentation index, see [llms.txt](https://docs.carbondefi.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.carbondefi.xyz/contracts-and-functions/contracts/carboncontroller.md).

# CarbonController

The `CarbonController`  purpose is to manage liquidity strategies and execute trades while ensuring compliance with the protocol's rules.&#x20;

Its functions include:

1. **Liquidity Management**:\
   The `CarbonController` facilitates the creation and management of liquidity strategies by users. These strategies define how liquidity is allocated across various market conditions to optimize trading outcomes.
2. **Strategy Execution**:\
   It controls the execution of user-defined strategies. By automating the trade processes, the controller ensures that trades align with the parameters defined in the liquidity strategies.
3. **Trade Handling**:\
   The contract processes trades by interacting with connected liquidity pools. It calculates optimal trade routes and ensures that trades occur within the bounds of user-defined parameters like slippage limits.
