> For the complete documentation index, see [llms.txt](https://city-protocol.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://city-protocol.gitbook.io/docs/developers/city-protocol-sdk/swap/recommended-swap-composition.md).

# Recommended swap composition

How to layer quoting, execution and managed swap methods.

For the best user experience, we recommend splitting swap concerns into clear layers:

* **Quoting layer (`getQuote`, `getLiquidity`, `getSupportedChains`):** pre-trade UI state, chain selection and route previews.
* **Execution layer (`buildSwap`, `getApproveTransaction`, `checkApprovals`):** fine-grained control over approval UX and the transaction lifecycle.
* **Managed layer (`executeSwap`):** the SDK orchestrates the full flow and returns the final transaction hashes.

#### Notes

* `executeSwap` is generic and depends entirely on your `executeTransaction` implementation.
* EVM approval orchestration, including revoke-then-approve for USDT-like tokens, is handled internally.
* When using `readableAmount`, token decimals must be supplied by your application or a metadata service.
