> ## Documentation Index
> Fetch the complete documentation index at: https://pessoal-86816071.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Accounts and Types

> Reference for the main on-chain account types and shared TypeScript domain structures.

# Accounts and Types

## On-chain account types

### `VaultState`

Primary vault state, including:

* authority
* deposit mint
* share mint
* treasury
* total shares
* total deposited USDC
* total portfolio value
* liquid USDC
* pending withdrawals

### `RiskPolicy`

Static guardrails:

* reserve minimum
* strategy and protocol caps
* exotic cap
* MarginFi cap
* cooldown and min rebalance delta

### `ManagerConfig`

Execution authority and rebalance permissions.

### `StrategyState`

Registered strategy definition and policy envelope.

### `AllocationState`

Target/current weights and notionals for a strategy.

### `WithdrawalRequest`

Asynchronous withdrawal bookkeeping.

### `RebalancePlanProof`

Submitted and executed rebalance metadata.

## Shared TypeScript domain types

The central shared file is `services/shared/src/domain.ts`.

Key types:

| Type                 | Purpose                           |
| -------------------- | --------------------------------- |
| `PolicyConstraints`  | Solver guardrails                 |
| `ManagerConfig`      | Off-chain execution settings      |
| `StrategyDefinition` | Registry entry for a strategy     |
| `StrategySnapshot`   | Live or historical market data    |
| `ExecutionStep`      | Adapter output consumed by Ranger |
| `RebalancePlan`      | Solver output                     |
| `ExecutionProof`     | Post-execution proof              |
| `HistoricalPeriod`   | Backtest scenario input           |
| `BacktestReport`     | Backtest output                   |

## Important cross-layer contract

The repo works because both sides agree on:

* strategy IDs
* plan hashes
* target weight hashes
* tx bundle hashes
* instruction semantics

That contract is what lets the off-chain runtime remain flexible while the on-chain program stays simple.
