> For the complete documentation index, see [llms.txt](https://rwapact.gitbook.io/whitepaper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rwapact.gitbook.io/whitepaper/pact-execution/policy-enforcement.md).

# Policy Enforcement

## Policy Enforcement

KPV, the **Policy Vault**, turns the owner's risk preferences and trading constraints into enforceable conditions. It evaluates the validated Trade Intent against the policy that applies to it.

KSO and KPV answer different questions. KSO asks, "Is this session and Agent currently authorized to act?" KPV asks, "Does this particular trade comply with the configured policy?"

### Conditions applied to a trade

The policy can define:

* Allowed assets, maximum trade size, and daily limit
* Maximum concentration and maximum slippage
* Fresh oracle requirement and minimum liquidity
* Off-hours policy and risk score threshold

KPV evaluates the proposed asset, amount, and trade conditions against these constraints. It also uses relevant outputs from earlier stages, including KRO's risk score.

For example, a session can be active and the Agent can be correctly authorized. The Pact still rejects a tokenized stock trade if that asset is outside the policy's allowed assets. The same applies when the amount exceeds the configured limit.

### Enforceable decisions

Policy enforcement does not rely on an Agent voluntarily following rules. KPV applies explicit conditions as part of the Pact decision, producing a deterministic outcome for the submitted context.

This keeps delegated authority bounded. A valid session grants an opportunity to request a trade. It does not override the owner's constraints for that trade.

The next stage considers whether execution conditions are acceptable. [Gas Optimization](/whitepaper/pact-execution/gas-optimization.md) brings those conditions into the final decision.

***


---

# 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://rwapact.gitbook.io/whitepaper/pact-execution/policy-enforcement.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.
