> ## Documentation Index
> Fetch the complete documentation index at: https://docs.groundtech.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Risk engine

> How risk rules raise alerts, stop new investments, or exit a position.

The risk engine checks configured conditions for your investments and applies the
rule's action when a condition is breached. Rules can apply to both automatic
and manual Portfolio Wallets.

## Rule actions

Risk rules take priority over allocation targets. A rule can:

* **Alert only:** notify you without changing allocations.
* **Prevent additional allocation:** stop new buys into a source while leaving existing holdings invested.
* **Exit position:** stop new buys and request redemption of the source's available holdings into its settlement stablecoin.

Automatic actions apply when the breach is detected. Actions requiring approval
wait for approval; a pending action does not itself block buys. Other active
restrictions still apply.

Risk exits do not use the ordinary 2% threshold or automatic-rebalance minimum.
They use available, unreserved holdings and still depend on the source's exit
process. Proceeds become usable only after settlement.

## What happens to the strategy?

A risk action does not change your saved targets or redistribute a blocked
source's percentage among other sources. For a 60% A / 40% B wallet, blocking A
means a new \$1,000 deposit can put \$400 into B while \$600 remains cash.
Exiting A instead leaves its proceeds in cash; it does not sell B or invest all
the proceeds into B. While the exit restriction is active, Ground cannot buy A
again, including when that exit needs a retry.

When a later evaluation finds that the condition has recovered, Ground resolves
the alert and removes its buy restriction. Automatic wallets can then reinvest
according to their saved targets, subject to other restrictions. Remove the
source from your strategy if you want it to stay excluded after recovery.

For manual wallets, neither an exit nor recovery causes cash to be reinvested
automatically.

## Foreign-exchange rules

For CETES, an FX rule can watch an MXN-to-USD percentage decline over a lookback
window and use the same actions and approval settings. An exit sells CETES into
USDC. Missing or stale FX data neither triggers a new action nor clears an active alert.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.