> For the complete documentation index, see [llms.txt](https://docs.renzofinance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.renzofinance.com/architecture/risk-protection-layer.md).

# Risk Protection Layer

Two inputs feed the engine: **the live position**, for price, funding, and the state of both legs, **and a single risk preset** that sets the capital split and the guard thresholds together. The engine runs three guards. Each is always detecting, and the user chooses only the response for each, either to act automatically or to leave it for manual adjustment. Revoking the trading key, or letting it expire, sits above all of it.

<figure><img src="https://2200787856-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXtrI3YGWysOEHYt3fLKo%2Fuploads%2FfKGBfeu0uqygit0owHhd%2FScreenshot%202026-09-02%20at%2021.08.24.png?alt=media&amp;token=83c58911-541d-4533-becc-2c317f328232" alt=""><figcaption></figcaption></figure>

### Automations

Three guards watch your position around the clock. Each one looks for a specific problem, and you choose how it responds.

#### How the guards work

**Auto.** The guard acts on its own and signs the repair with your trading key and no action is required.

**Manual.** The guard notifies you when action is needed, and you manually make the changes.

The guards run on a schedule. The hedge guard and safety buffer check every 10 minutes, because a price move needs a fast response. The yield guard checks hourly, because funding changes over hours. A separate daily check watches your trading key's expiry.

The guards can only act while your trading key is active. If the key is revoked or expires, nothing triggers, and your position stays open but unmanaged. Renew your key before it expires to keep the guards running. See Trading Key.

| Guard         | Watches                              | Checks           | Auto response              |
| ------------- | ------------------------------------ | ---------------- | -------------------------- |
| Hedge guard   | Spot and short no longer match       | Every 10 minutes | Re-hedge, or sell and exit |
| Yield guard   | Net funding negative over the window | Hourly           | Exit to USDC               |
| Safety buffer | Distance to liquidation              | Every 10 minutes | Add margin                 |

#### Hedge guard

The hedge guard watches whether your spot holding is still matched by the short. If net exposure moves beyond a small floor, the hedge has broken.

Auto-deleveraging, a perp liquidation and a manual close all look the same from the outside. So the guard watches the shape of the position rather than the cause, and it catches all of them. This matters most in a crash, when the short is what protects you.

On Auto, it re-hedges the position, or sells and exits.

#### Yield guard

The yield guard watches funding. It triggers when funding has been net negative across a two-day window by default and can be adjusted on advanced configuration and in the settings.&#x20;

Netting across the window keeps the guard steady. An hour or two of negative funding inside an otherwise positive stretch doesn't count, so a brief dip won't churn your position.

On Auto, it exits the position to USDC.

#### Safety buffer

The safety buffer watches how close the short is to liquidation. The short carries its own margin, so a rally can threaten it even while the position's total value stays flat.

When the distance to liquidation crosses the trigger (10% towards the liquidation price), the safety buffer adds margin to move the liquidation price away, restoring the position to your preset's target. It first uses any spare USDC in your account, which costs no fees and keeps your funding income intact. If there's no spare USDC, it closes just enough of the position to fund the top-up.

#### Changing your automation settings

1. Go to the portfolio page for the strategy
2. Click the settings icon
3. Set each guard to Auto or Manual

#### What the guards don't cover

The guards lower risk; they don't remove it. A very fast price move can outrun the safety buffer, and exits can fill at worse prices when markets are thin. The guards also can't move funds out of your account. Withdrawals or transfers always require user signature.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.renzofinance.com/architecture/risk-protection-layer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
