> For the complete documentation index, see [llms.txt](https://docs.ambient.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ambient.finance/governance-and-policy/policy.md).

# Policy

*The policy controller* is an intermediate layer that sits between DAO governance and the DEX contract itself. Policy is coordinated by the `CrocPolicy` smart contract which has direct administrative authority over the DEX contract. Governance decisions are called as *resolutions* in the policy contract, which directly pass through an arbitrary *protocol commands* to the DEX contract interface.&#x20;

Protocol commands can be invoked with or without escalated privilege (*sudo mode*). Sudo mode is required for all major operations in the `CrocSwapDex`contract, including upgrading code, transferring authority to a new controller or disbursing accumulated protocol fees. Only the treasury and emergency multisigs can call protocol commands in sudo mode.

The policy layer can also delegate a restricted set of administrative controls on the `CrocSwapDex` contract to external *policy oracles*. Governance can install a *policy conduit* which defines a narrow mapping between a fixed address and a narrow subset of protocol commands. The policy oracle can then independently and directly invoke these protocol commands.

The purpose of a policy oracle is to dynamically extend the base capabilities of the protocol in a modular, safely contained and pre-defined avenue without having to directly upgrade the underlying DEX contract code. An example of a policy oracle is a smart contract that dynamically adjusts the liquidity fee in a pool based on market conditions. This allows governance to offload that responsibility to a deterministic oracle.


---

# 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.ambient.finance/governance-and-policy/policy.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.
