> For the complete documentation index, see [llms.txt](https://braindex.gitbook.io/braindex-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://braindex.gitbook.io/braindex-documentation/protocol-information/technical-documentation/the-braindex-executor.md).

# The BrainDex Executor

The BrainDex Executor is a modular, internal contract which contains the on-chain logic for handling swap routes produced by the BrainDex Router. The Executor interprets the `swapData` component of the Router contract's calldata and routes the swap accordingly.

At the end of the Executor's swap execution, the tokens received are then passed to the Router, which performs final security checks before returning the results of the swap to the caller.
