> For the complete documentation index, see [llms.txt](https://hxz-1.gitbook.io/redelegator-finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hxz-1.gitbook.io/redelegator-finance/security-model/threat-mode.md).

# Threat Mode

Redelegator's design assumes agents can fail, be exploited, or be prompt-hijacked — and bounds the blast radius accordingly.

<figure><img src="/files/0qUqbB5vfSL6kOJaWjuU" alt="" width="189"><figcaption></figcaption></figure>

| Scenario                      | Outcome                                                                                             |
| ----------------------------- | --------------------------------------------------------------------------------------------------- |
| A middle agent is compromised | It can redeem only up to the cap it received; it **cannot** widen authority or redirect the outcome |
| An agent's prompt is hijacked | The strategy is zod-validated and the route is fixed before execution; spend stays capped on-chain  |
| The relayer misbehaves        | It can only redeem the signed chain as-is; the swap recipient is the user's wallet                  |
| The user changes their mind   | One revoke disables the root → the whole chain dies                                                 |
| The grant is forgotten        | It is periodic and expires in \~1 hour                                                              |

What the model deliberately does **not** rely on: trusting agent code, off-chain promises, or the relayer's honesty. The guarantees are the `Erc20TransferAmount` caveat, the scoped EIP-7715 grant, the user-as-recipient swap, and on-chain revocation.

> 🔒 **Server-side secrets:** agent keys and API keys live only in `.env.local` and are read only by API routes — the browser sees addresses, never keys.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://hxz-1.gitbook.io/redelegator-finance/security-model/threat-mode.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.
