> For the complete documentation index, see [llms.txt](https://doppi-finance.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doppi-finance.gitbook.io/docs/readme/automation.md). Agents can also search and read this documentation through its [MCP server](https://doppi-finance.gitbook.io/docs/~gitbook/mcp).

# Doppi Automation

Doppi automation is transaction execution initiated by an off-chain automation runner. The runner reads each contract's `checkUpkeep` result and submits a transaction to the corresponding `performUpkeep` entry point when work is due. It is not a Chainlink Automation workflow.

The automation contracts do not themselves run in the background: a configured runner must call them, and each target accepts execution only from its configured forwarder (or, for the private hub, an authorized executor).

## Automation areas

| Area                                                                                             | What is checked                                                  | What execution does                                              |
| ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| [DoppiCore](https://doppi-finance.gitbook.io/docs/readme/automation/doppi-core.md)               | Expired positions ready for settlement                           | Settles matured positions and their payout/interest accounting   |
| [DoppiOpportunity](https://doppi-finance.gitbook.io/docs/readme/automation/doppi-opportunity.md) | Active opportunity and unwind strikes that meet price conditions | Executes the eligible opportunity swaps and updates strike state |
| [DoppiLiquidity](https://doppi-finance.gitbook.io/docs/readme/automation/doppi-liquidity.md)     | LP unwind orders ready at the current price                      | Nets eligible buy/sell unwind amounts and executes the pool swap |
| [Private vaults](https://doppi-finance.gitbook.io/docs/readme/automation/private-vaults.md)      | Registered trader jobs, checked in bounded batches               | Dispatches execution to Grid, Simple, or DoppiTrader bots        |

## System flow

```mermaid
flowchart LR
    Runner[Off-chain automation runner]

    subgraph Shared["Shared Doppi contracts"]
        Core[DoppiCore<br/>expiry settlement]
        Opp[DoppiOpportunity<br/>opportunity execution]
        LP[DoppiLiquidity<br/>LP unwind execution]
        Core -->|settle and interest calls| LP
        Opp -->|opportunity swaps and state updates| Core
    end

    Runner -->|check / perform| Core
    Runner -->|check / perform| Opp
    Runner -->|check / perform| LP

    subgraph Private["Trader jobs via PrivateAutomationHub"]
        Hub[PrivateAutomationHub]
        Grid[DoppiGridTrader]
        Simple[DoppiSimpleTrader]
        Trader[DoppiTrader]
        Hub -->|check / perform| Grid
        Hub -->|check / perform| Simple
        Hub -->|check / perform| Trader
        Grid -->|swaps| LP
        Simple -->|swaps| LP
        Trader -->|places positions / unwinds| Core
        Trader -->|swaps| LP
    end

    Runner -->|check / perform hub jobs| Hub
```

The shared Core, Opportunity, and Liquidity contracts each expose their own check-and-perform surface and use a configured forwarder. Private bot factories instead register each bot as a job in `PrivateAutomationHub`; the hub calls the bot's own `checkUpkeep` and `performUpkeep`, and the bot then calls the Core or Liquidity contracts as needed. The Grid and Simple traders keep their strategy state in the bot contract; they are not scheduled as separate hub jobs.

## Oracle and legacy naming

The automation runner is not Chainlink Automation. Some Solidity integrations still use Chainlink-compatible interfaces and legacy names: Liquidity price configuration includes a `chainLinkFeed`, and `PrivateAutomationHub` uses an `AggregatorV3Interface` feed to convert execution gas costs into its configured billing token. These are price-feed inputs, not the automation service. A full price-oracle migration is separate from replacing the automation runner.

`DoppiUpkeepManager` and legacy pages describing Chainlink Keepers or LINK-funded upkeeps are not the current automation flow and are intentionally not documented here.
