# Executing

Once you have calldata from [Encoding](/tycho/for-solvers/execution/encoding.md), you can execute your trade via the Tycho Router.

## Tycho Router

Send the encoded calldata to the TychoRouter [contract](https://github.com/propeller-heads/tycho-indexer/blob/main/crates/tycho-execution/contracts/src/TychoRouter.sol) (see contract addresses [here](/tycho/for-solvers/execution/contract-addresses.md)). Preparation depends on the `user_transfer_type` in your `Solution`:

* `TransferFrom`: Call `approve()` on your input token to allow the TychoRouter to spend it.
* `TransferFromPermit2`: Approve the Permit2 contract - use the `Permit2` utility from the encoding crate to build and sign the `PermitSingle`. You must handle the permit; the encoder does not.
* `UseVaultsFunds`: No approval needed — the router draws from your vault balance. Deposit sufficient funds into the vault before swapping.

For an example of how to execute trades using the Tycho Router, refer to the [Quickstart](https://docs.propellerheads.xyz/tycho/for-solvers/execution/pages/3c4AMsI85u084fqG3nxA#id-5.-simulate-or-execute-the-best-swap).

### Fee Taking

The TychoRouter V3 supports a dual fee system:

* **Client fees**: Construct a `ClientFeeParams` with your `client_fee_bps`, `client_fee_receiver`, and signature, and pass it when calling the router. Fees are credited to the receiver's vault balance.
* **Router fees**: Configured on-chain by Propeller Heads. These are mandatory and cannot be bypassed through encoding. The router can charge a fee on the output amount and/or a percentage of the client fee. Currently set to 10 bps (0.1%) on the swap output and 20% share of the client fee (the integrator keeps 80%).

### Client Contribution (Slippage Subsidy)

If the swap output falls below `min_amount_out`, the router covers the shortfall from the client's vault balance, up to `max_client_contribution`. Beyond that, the transaction reverts. This lets clients absorb minor slippage without a separate transaction — but set `max_client_contribution` conservatively, as a high value can expose you to MEV attacks.


---

# 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.propellerheads.xyz/tycho/for-solvers/execution/executing.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.
