# Guardian Risk Protocol

While the AI Engine focuses on Profit Optimization (Offense), the Guardian Protocol focuses entirely on Capital Preservation (Defense). It is a deterministic, code-based safety net that runs in parallel to the trading engine.

#### Real-Time Anomaly Detection

The Guardian Protocol monitors the state of the blockchain for structural threats.

* Bayesian Inference Models: The system constantly updates the probability of a protocol exploit based on real-time data. Factors include:
* Flash Loan Spikes: Sudden, massive borrows from lending pools often precede price manipulation attacks.
* State Changes: Abnormal changes in a smart contract’s variable state (e.g., an implementation contract upgrade or a pause status change).
* Liquidity Drain Monitoring: If a target pool’s liquidity drops by a standard deviation greater than the historic norm (e.g., >15% in 1 block), the Guardian flags it as a potential "Rug Pull" or panic event.

#### Dynamic Risk Scoring & De-Risking

Every protocol and asset in the Axon ecosystem is assigned a live "Risk Score" (0-100).

* Quantitative Scoring: Derived from on-chain metrics (Volatility, Liquidity Depth, Holder Concentration).
* Qualitative Scoring: Derived from audit status, time-lock durations, and multisig transparency.
* Circuit Breakers: If a protocol's Risk Score crosses a user-defined or system-defined threshold (e.g., Risk Score > 80), the Emergency Eject Mechanism is triggered.
* Immediate Unwind: The system automatically unwinds positions in that specific protocol.
* Flight to Quality: Funds are moved to the safest designated asset (e.g., USDC in a top-tier lending protocol) or returned to the user’s wallet. This happens autonomously, often reacting faster than a human could read a Twitter alert.

#### Impermanent Loss (IL) Protection Logic

For liquidity provision strategies, the Guardian Protocol employs predictive hedging.

* Volatility Delta Tracking: The system calculates the rate of change in the price ratio of paired assets.
* Active Rebalancing: If the price divergence suggests that Impermanent Loss will exceed the yield generated by fees, the AI exits the LP position.
* Single-Sided Hedging: In advanced "Degen" modes, the protocol can open a short position on a perpetuals DEX to make the liquidity provision delta-neutral, effectively neutralizing market risk to farm yields purely on trading fees.

#### Smart Contract Security

The Axon architecture itself undergoes rigorous security practices.

* Timelocks: Governance decisions regarding upgrades to the AI execution logic are subject to a 48-hour timelock, allowing users to withdraw funds if they disagree with a protocol update.
* Immutable Core: The core logic governing user withdrawals and ownership is immutable and cannot be upgraded by the DAO, ensuring that no governance attack can ever confiscate user funds.


---

# Agent Instructions: 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://docs.axontoken.vip/2.technical-architecture/guardian-risk-protocol.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.
