Operation Flows

The program operates through two distinct instruction flows: administrative setup and configuration operations, and user-facing mint/burn operations.

Administrative vs User Operation Flow

Administrative vs. User Operations

The USD* program distinguishes between two classes of operations:

  • Administrative Operations establish and manage the protocol’s infrastructure. They include creating banks and vaults, initializing oracle and team accounts, assigning yield managers, updating oracle prices and yield reports, collecting protocol fees, and activating circuit breakers at the vault or bank level.

  • User Operations are interactions with the protocol’s vaults. They include minting USD* by depositing assets, burning USD* to redeem collateral, and creating user accounts to track deposits and redemptions.

This separation ensures a clear boundary between protocol-level governance and user-level interactions.

Transaction Workflow

Every instruction, whether administrative or user-facing, follows a strict validation and execution sequence:

  1. Permission Verification – Confirm the caller has the appropriate authority.

  2. System Status Check – Ensure the target bank and vault are not halted by a circuit breaker.

  3. Collateralization Verification – Match vault balances against the accounting layer.

  4. Operation Execution – Perform the intended action (e.g., mint, burn, deposit, withdraw, update).

  5. Consistency Check – Re-run collateralization and accounting checks post-operation.

  6. Rounding and Sanity Validation – Confirm that rounding does not degrade system integrity.

  7. State Commitment – Apply changes only if all validations succeed.

This deterministic workflow ensures vault states remain consistent, even if a transaction fails or attempts malicious behavior.

Entrypoints

  • Administrative Entrypoints

    • Bank Management: Create and manage bank instances.

    • Vault Management: Create vaults, assign managers, and configure circuit breakers.

    • Oracle & Yield Management: Initialize oracle accounts, update prices, report yields, and handle protocol fees.

  • User Entrypoints

    • Account Operations: Create user accounts that track deposits, redemptions, and balances.

    • Token Operations: Mint USD* against accepted collateral or burn USD* to redeem vault assets.

    • Price & Team Operations: Interact with vaults under the constraints set by oracles and team roles.

Administrative Entrypoints

Bank Management

Entrypoint
Context Type
Purpose

create_bank

CreateBankState

Initialize new bank instance

name_bank_manager

NameBankManager

Set bank manager authority

trigger_bank_circuit_breaker

TriggerBankCircuitBreaker

Emergency bank controls

Vault Management

Entrypoint
Context Type
Purpose

create_gen_vault

CreateVault

Create new vault

trigger_vault_circuit_breaker

TriggerVaultCircuitBreaker

Emergency vault controls

create_gen_team_account

CreateTeamAccount

Initialize team state

create_gen_oracle_account

CreateOracleState

Setup price oracle

User Operation Entrypoints

Account and Token Operations

Entrypoint
Context Type
Purpose

create_gen_user_account

CreateGenUA

Create user account

mint_w_yielding_gen

MintWYieldingGen

Deposit assets, mint USD*

burn_for_yielding_gen

BurnForYieldingGen

Burn USD*, withdraw assets

Price and Team Operations

Entrypoint
Context Type
Purpose

update_yielding_price_gen

UpdateYieldingPrice

Update asset price

team_withdraws_to_invest

TeamWithdrawsToInvest

Team external investment

team_deposits_from_invest

TeamDepositsFromInvest

Return from investment

team_withdraws_fees

TeamWithdrawsFees

Collect team fees

Last updated