Core Program Architecture

The program follows Anchor framework conventions with a clear separation between administrative and user-facing functionality. The program is organized into distinct modules that handle different aspects of the protocol.

Core Components and Code Mapping

The bankineco protocol implements a hierarchical structure where a single BankState manages multiple vaults, each handling a specific yielding asset type.

State Account Structure

Component
Code Entity
Purpose

Bank

BankState

Global protocol management

Vault

VaultGenState

Per-asset vault management

Oracle

OracleGenState

Price feed management

Team

TeamGenState

Fee collection

User Account

UserGenState

User balance tracking

Instruction Entrypoints

The program exposes 15 public instruction entrypoints, organized into three functional categories: bank administration, vault operations, and user operations.

Entrypoint Categories and Flow

Instruction Handler Mapping

Each public entrypoint delegates to a specific handler implementation. The mapping follows a consistent pattern where the function name corresponds to the module path.

Last updated