# Architecture

### Vault Architecture

The Nest vault framework is implemented as a modular smart-contract architecture designed to separate custody, accounting, compliance, and share issuance into independent components. This separation reduces operational risk and allows each layer of the system to evolve or be audited independently.

At the core sits **NestVaultCore**, an abstract vault contract implementing the ERC-4626, ERC-7540, and ERC-7575 tokenized vault standards. The vault serves strictly as the asset custody and execution layer and does not maintain internal share accounting. Instead, share ownership is represented by a dedicated ERC-20 token, **NestShareOFT**, which acts as the authoritative ledger for balances and total supply. Deposits and redemptions are executed through paired internal entry and exit routines that atomically transfer assets and mint or burn shares via privileged functions on the share token contract, ensuring consistent synchronization between assets under custody and issued shares.

Valuation and fee accrual are handled by **NestAccountant**, an independent rate and fee engine referenced by the vault. The accountant maintains the vault’s exchange rate, enforces governance-defined bounds on rate movements, and accrues management fees over time based on assets under management and elapsed time. Any rate update outside the permitted tolerance automatically pauses conversions, creating a built-in safeguard against pricing anomalies.

Access to the vault is mediated by **NestVaultPredicateProxy**, which acts as a compliance gateway. Deposits are first routed through this proxy, which interacts with Predicate Labs’ compliance services to validate KYC and jurisdictional eligibility via signed attestations before forwarding assets into the vault. The proxy also supports deposits identified by hashed depositor IDs, enabling integrations with non-EVM custody or cross-chain workflows.

Vault shares themselves are implemented in **NestShareOFT**, a LayerZero-compatible omnichain fungible token. This design allows shares to move across chains by burning them on the source network and minting an equivalent amount on the destination chain, while the underlying assets remain stationary within the vault.

Finally, **NestVaultComposer** coordinates multi-step operations such as cross-chain deposits. It combines compliance verification, vault entry, and cross-chain share settlement into a single transaction flow, and integrates with Circle’s CCTP infrastructure when USDC must be bridged prior to deposit.

Together, these components form a vault infrastructure that aligns with institutional requirements for custody segregation, controlled pricing mechanisms, regulatory compliance gating, and cross-chain capital mobility.\ <br>

***
