# Hooks

Squid is a transaction bundler at heart. Squid's hooks enable users to sign one transaction and that transaction handles a series of contract interactions like staking, minting, or withdrawing and on either the source chain(the are executing the transaction from) or the destination chain(the chain that they are receiving bridged assets on).

<figure><img src="/files/1bJeAzJcnCu3E2flrCC3" alt=""><figcaption></figcaption></figure>

### **Key Benefits**

* **Automation:** Both preHooks and postHooks automate repetitive and necessary tasks, reducing manual intervention and the potential for errors.
* **Efficiency:** By handling preparatory and follow-up actions automatically, preHooks and postHooks streamline the transaction process, improving efficiency and user satisfaction.
* **Flexibility:** Developers can customize workflows to meet specific needs, such as integrating additional checks, swaps, or minting processes tailored to their applications.

### **Examples**

Squid's hooks are what makes it possible to do *anything* across chain.

* Buy or mint an NFT after a bridging assets
* Cross-chain swap then stake the assets
* Unstake assets then perform a cross-chain swap
* Performa cross-chain swap and then deposit into an exchange


---

# 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.squidrouter.com/old-v2-documentation-deprecated/key-concepts/hooks.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.
