> For the complete documentation index, see [llms.txt](https://docs.ensemble.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ensemble.io/how-it-works/system-architecture.md).

# System architecture

The roles of vault contracts, transaction policy, and asynchronous trading.

The vault calculates shares and manages the strategy. CircuitBreaker checks transaction permissions and limits. VaultLens groups on-chain value and state reads. Permissionless maintenance calls request capital movement, orders and confirmations.

```mermaid
flowchart TB
    User["User or integrator"] --> Lens["VaultLens: derived on-chain reads"]
    User --> Breaker["CircuitBreaker: route authority"]
    User -->|"Direct ERC-4626 calls"| Vault["Product vault: accounting authority"]
    Breaker --> Vault
    Vault -->|"Direct-call authorization"| Breaker
    Caller["Permissionless maintenance caller"] --> Vault
    Vault --> CoreWriter["CoreWriter system contract"]
    CoreWriter --> HyperCore["HyperCore positions and settlement"]
    Vault --> Events["Contract events and transaction receipts"]
```

## Contract authority

The vault decides how many shares a deposit creates and how much USDC an exit pays. CircuitBreaker checks whether the request is allowed and within its limits. A displayed estimate cannot override those rules.

## Derived on-chain reads

Clients can request related vault readings together instead of assembling them from separate calls.

VaultLens groups storage and contract reads into previews, limits, state, and keeper-action eligibility. Its compatibility checks are part of the read result.

## Execution

Automation asks the vault to perform maintenance. The contract checks whether the requested action is allowed, and the trading venue may finish it later.

Permissionless vault functions determine whether maintenance is eligible. Automation selects and submits eligible actions; HyperCore changes settle asynchronously and may require later confirmation.

## Observations and history

A historical observation describes an earlier block. It does not establish current pricing or transaction capacity. Use fresh compatible contract reads before preparing a transaction.

## Integrator view

Integrators need to read vault state and check the route that will execute the transaction.

Read [Contract roles](/protocol-transparency/contract-architecture.md), [Share accounting](/how-it-works/nav-and-share-accounting.md), and [CircuitBreaker](/safety/circuit-breaker.md).
