# Overview

Divigent is a router, oracle, and receipt-token protocol for agent wallet float.

The user-facing action is simple: a wallet deposits USDC and later withdraws USDC. The protocol logic behind that action is more deliberate: deciding where new capital should go, tracking each wallet's principal, minting non-transferable receipts, planning withdrawals across multiple venues, calculating realised yield, and charging fees only when yield actually exists.

## The Three Layers

* **Smart contract layer.** Base contracts that hold vault claims, mint and burn dvUSDC, route deposits, redeem withdrawals, and collect fees.
* **SDK layer.** TypeScript integration that wraps agent payment flows, including x402 lifecycle hooks.
* **MCP layer.** Tooling that lets agent frameworks query balances, rates, yield, status, and supported capital-management actions.

The smart contract layer is the settlement and accounting layer. The SDK and MCP layers make Divigent usable inside agent workflows.

```mermaid
flowchart TD
    agent["Agent wallet"] --> sdk["SDK / payment lifecycle"]
    sdk --> router["DivigentVaultRouter"]
    router --> oracle["DivigentYieldOracle"]
    router --> token["dvUSDC"]
    router --> fees["DivigentFeeCollector"]
    router --> aave["Aave V3"]
    router --> morpho["Morpho MetaMorpho USDC"]
```

## Core Components At A Glance

| Component                                                                             | Role                                                                          |
| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [DivigentVaultRouter](/divigent-docs/architecture/contracts.md#divigentvaultrouter)   | User-facing contract. Handles deposits, withdrawals, routing, and accounting. |
| [DivigentYieldOracle](/divigent-docs/architecture/contracts.md#divigentyieldoracle)   | Time-weighted rate observation and route selection.                           |
| [dvUSDC](/divigent-docs/architecture/contracts.md#dvusdc)                             | Non-transferable receipt token representing proportional vault claims.        |
| [DivigentFeeCollector](/divigent-docs/architecture/contracts.md#divigentfeecollector) | Pulls the protocol fee from realised yield at withdrawal time.                |

For full contract-level detail, see [Contracts.](/divigent-docs/architecture/contracts.md)

## Supported Venues

Divigent v1 routes USDC to:

* **Aave V3 on Base.** The router supplies USDC and receives aUSDC.
* **Morpho Steakhouse USDC MetaMorpho V1.** The router deposits USDC into an ERC-4626 vault and receives vault shares.

The router holds the pooled venue receipts. Individual wallet ownership is represented internally through dvUSDC balances and cost-basis accounting.

See [Address Registry](broken://pages/c887579de5e5d3c52ec4329e1e20f34ed1e03bf0) for venue contract addresses.

## Where The Contracts End And The SDK Begins

The contracts enforce:

* deposits and withdrawals;
* accounting (cost basis, share math, virtual offset);
* routing gates (oracle freshness, safety checks, capacity checks);
* fee logic (yield-only, calculated post-redemption);
* permissions (wallet registration and operator delegation);
* emergency controls (deposit pause, TVL caps, treasury rotation).

The SDK and MCP layers add:

* payment-lifecycle awareness;
* reserve-floor calculation;
* pre-payment liquidity checks;
* post-settlement redeployment.

The SDK never holds funds. Every state change passes through the router. See [Payment Lifecycle](/divigent-docs/quick-start/payment-lifecycle.md) for the integration pattern.

{% hint style="info" %}
The smart contracts enforce deposits, withdrawals, accounting, routing gates, and fee logic. SDK and MCP integrations automate timing around payment flows, but those timing decisions are integration-layer behaviour, not on-chain guarantees.
{% endhint %}

## 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://divigent.gitbook.io/divigent-docs/architecture/overview.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.


---

# 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://divigent.gitbook.io/divigent-docs/architecture/overview.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.
