> 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/the-five-layer-pact/kro-risk-oracle.md).

# KRO, Risk Oracle

How KRO evaluates RWA-specific risk before an autonomous trade reaches execution.

## KRO, Risk Oracle

Before RWAPACT decides whether a trade should execute, it needs a structured view of its risk context. KRO provides that assessment for tokenized real-world asset trades.

KRO is the risk intelligence layer of the Five-Layer Pact. It assesses RWA-specific conditions that can make an otherwise valid trade unsafe or unsuitable.

```
Trade Intent
  -> KRO
  -> Risk Score
  -> Pact Decision
```

KRO contributes a risk assessment. It does not independently approve or reject every trade. The Pact combines the score with session, policy, and gas conditions.

### RWA risk context

KRO evaluates the following factors under the current protocol specification. These thresholds are protocol conditions, not universal financial rules.

| Factor            | Source / Context                    | Specification Threshold or Condition |
| ----------------- | ----------------------------------- | ------------------------------------ |
| Oracle staleness  | Chainlink feed timestamp            | < 60 minutes                         |
| Price deviation   | Market vs oracle                    | < 5%                                 |
| Liquidity depth   | Uniswap v4 pool reserves            | > $10K USDG                          |
| Slippage estimate | Pool math + trade size              | < 3%                                 |
| Market hours      | Off-chain market calendar           | Flag outside hours                   |
| Compliance freeze | Token contract freeze status        | Must not be frozen                   |
| Concentration     | Agent's current position            | < 25% portfolio                      |
| Volatility        | Historical price standard deviation | Below configured tier                |

Oracle staleness and price deviation test whether the price context is current and aligned. Liquidity depth and slippage estimate test whether the proposed size can be supported by available pool conditions.

Market hours add context from the relevant off-chain calendar. Freeze status identifies whether the token contract reports a compliance freeze. Concentration considers the agent's existing position. Volatility evaluates historical price variation against the configured tier.

### Risk score and tiers

KRO returns a risk score from `0` to `100`. A score of `0` represents no risk. A score of `100` represents critical risk.

| Score     | Tier     | Action                          |
| --------- | -------- | ------------------------------- |
| 0 to 20   | Safe     | Approve                         |
| 21 to 50  | Caution  | Approve with reduced size       |
| 51 to 80  | Risky    | Reject, require manual override |
| 81 to 100 | Critical | Reject, agent flagged           |

These are the specified KRO risk tiers. The final RWAPACT decision still depends on Pact logic and the active policy. A favorable KRO result does not bypass KSO, KPV, KGR, or KAR.

### Data relationships

KRO uses defined sources for each part of the assessment:

* **Chainlink** supplies price feed timestamps and RWA stock token price data.
* **Uniswap v4** supplies pool reserves for liquidity-depth evaluation.
* **Off-chain market calendar** supplies market-hours context.
* **Token contract** supplies freeze status.
* **Agent position** supplies the concentration input.
* **Historical price data** supplies the volatility input.

KRO uses these inputs to construct risk context for the Pact. It is not a generic DeFi risk oracle.

### Decision flow

```
Trade Intent
  |
  v
Collect RWA Risk Context
  |
  v
Evaluate Risk Factors
  |
  v
Calculate Risk Score
  |
  v
Compare Against Threshold
  |
  v
Return Risk Assessment to Pact
```

The returned assessment gives the Pact a consistent risk input. Session authority, policy compliance, and gas conditions remain separate responsibilities.

### Example: stale oracle

An agent requests a purchase of an RWA token. KRO detects that the oracle is stale. In this specification example, KRO returns a risk score of `85`.

The score falls within the **Critical** tier. The reason is the stale oracle condition. The Pact rejects the trade, and KAR records the rejection context. This example illustrates the protocol model. It does not describe a production transaction.

### Scope of KRO

KRO answers one question:

> How risky is this trade under the protocol's RWA risk model?

It does not determine whether the agent is authorized, whether policy permits the trade, or how gas should be optimized. Those responsibilities continue with [KSO, Session Oracle](/whitepaper/the-five-layer-pact/kso-session-oracle.md).

***


---

# 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/the-five-layer-pact/kro-risk-oracle.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.
