Vault Types and Yield Strategies
This page covers the advanced yield management features in the bankineco protocol, specifically for handling external yield generation and distribution in specialized vault types. The yield management system enables the protocol to integrate with external yield-bearing assets where yield is generated off-chain and reported back to the protocol through oracle updates.
Vault Types and Yield Strategies
All vaults are implemented under a unified generalized vault state, but differentiated by configuration flags that dictate their behavior. At present, three categories of vaults exist:
Yield-Bearing Vaults (Internal) Assets in these vaults never leave the protocol. Their value is determined exclusively through oracle-reported prices. The team cannot withdraw collateral from these vaults, ensuring strict containment and security.
External Collateralized Yield Vaults Assets such as USD’ are stored directly within the USD* smart contract. While the collateral remains under custody of the protocol, yield is generated externally and reported back to the vault. The yield is first acknowledged and then distributed, but at no point can the team remove collateral or adjust asset prices.
External Uncollateralized Yield Vaults Designed for advanced strategies like Drift, these vaults allow collateral to be temporarily withdrawn and deployed externally. All withdrawals are meticulously tracked in a dedicated team account and must be repaid in full. Yield is reported and distributed in the same manner as in collateralized external vaults, but collateral and yield are managed separately for transparency. Importantly, the team cannot redeposit more than was withdrawn, and outstanding balances awaiting repayment are publicly visible on-chain.
This structure balances flexibility with accountability. The generalized vault model ensures that all vaults follow the same accounting and verification logic, while individual flags enable differentiated yield strategies.
Redemption and Availability
To guarantee baseline liquidity, one of the sixteen vaults is permanently reserved for USDC. This vault is categorized as an external collateralized yield vault but with a default yield rate of zero. However, the team retains the option to introduce occasional rewards, which would directly increase the total value of vaults and, by extension, the price backing USD*.
This ensures that redemptions are always possible in a highly liquid, widely recognized stable asset, while leaving room for periodic enhancements to user value.
External Yield Vault Types
The yield management system operates exclusively on vaults with specific types that support external yield generation:
COLLATERALIZED_EXTERNAL_YIELD
Vaults where external yield is backed by collateral
UNCOLLATERALIZED_EXTERNAL_YIELD
Vaults where external yield is generated without additional collateral
These vault types allow the protocol to track yield that is generated through external investment strategies, such as lending protocols or liquidity mining, where the actual yield generation happens outside the program.
Yield Management Process Overview
The yield management system operates through a two-phase process that separates yield reporting from yield distribution:

Yield Reporting Process
Update Yield Info Instruction
The updateYieldingInfo
instruction handles the reporting of newly generated yield to the protocol. This updates the oracle state to reflect yield that has been generated externally but not yet physically transferred to the vault.

Key Validation Steps
The yield reporting process includes several critical validation steps:
Authorization Check - Verifies the oracle signer matches the registered oracle
Bank Status Check - Ensures the bank is not halted
Vault Type Validation - Confirms vault supports external yield
Price Gap Validation - Prevents excessive yield increases
Oracle Consensus - Requires agreement between dual oracles
Yield Distribution Process
Update Yield Amount Instruction
The updateYieldingAmount
instruction handles the physical transfer of yielding tokens from the team's distributor account to the vault's token account. This represents the actual delivery of previously reported yield.
Transfer Mechanics
The yield distribution uses Solana's transfer_checked
instruction to move tokens with the following key characteristics:
Source Account:
team_yield_distributor
- Team-controlled token account holding generated yieldDestination Account:
ey_yielding_vault_ata
- Vault's associated token accountAuthority: Oracle signer - The oracle that reported the yield authorizes its distribution
Amount:
pushed_yield
- Must not exceed the previously reportedyielding_pending_amount
Safety Mechanisms
Price Gap Validation
The yield management system implements strict price gap validation to prevent manipulation or errors:

The system calculates yield increases as basis points relative to the current reserve amount and rejects updates that exceed the configured maximum gap threshold.
Dual Oracle Consensus
The protocol requires consensus between two oracle values before confirming yield updates:
oracle_pending_yield[0]
Primary oracle yield report
oracle_pending_yield[1]
Secondary oracle yield report
oracles_difference_bps
Calculated difference between oracles
Only when oracles_difference_bps == 0
does the system proceed with TVL updates and USD* price recalculation.
Accounting Integrity
The system enforces several accounting invariants:
Monotonic Yield Growth -
pending_yield >= old_confirmed_pending_amount
Distribution Limits -
pushed_yield <= yielding_pending_amount
TVL Consistency - Updated TVL must be calculated precisely using
get_precise_tvl()
Integration with USD* Pricing
TVL Impact Calculation
When yield is reported and confirmed, the system updates the vault's TVL and recalculates the USD* price:

The TVL increase from yield directly impacts the USD* price, making the stablecoin appreciate relative to its backing assets as yield is generated.
State Synchronization
The yield management system maintains consistency across multiple state accounts:
VaultGenState
yielding_tvl
, yielding_reserve_amount
OracleGenState
yielding_pending_amount
, oracle_pending_yield[]
BankState
yielding_tvl
, vault_tvls[]
, usdstar_price
All updates are performed atomically within single transactions to maintain state consistency.
Last updated