Module actions

Source
Expand description

Kernel action dispatch for vault state transitions.

This module defines the public KernelAction enum and a dispatcher that applies actions to VaultState and returns effects.

Structs§

EffectiveTotals
Effective totals after applying virtual share/asset offsets.
FeeAccrualOutcome
Shares minted and anchor produced by one fee-accrual pass.
FeeAccrualOverflow
Fee accrual would push total shares past u128::MAX.
IdlePayoutPlan
Planned payout details for satisfying a queued withdrawal from idle assets.
KernelResult
Result of applying a kernel action.

Enums§

KernelAction
Kernel actions supported by the dispatcher.
PayoutOutcome
Outcome for payout settlement.

Functions§

apply_action
Apply a kernel action to state, returning updated state and effects.
compute_fee_accrual
Compute fee shares and the replacement anchor for one accrual pass.
convert_to_assets
Convert a share amount to assets (floor rounding — fewer assets, favors vault).
convert_to_assets_bounded
Convert shares to assets and reject quotients above the operation’s legal cap.
convert_to_assets_ceil
Convert a share amount to assets (ceil rounding — more assets, favors user).
convert_to_assets_ceil_bounded
Convert shares to assets with ceil rounding and reject quotients above the operation’s cap.
convert_to_redeem_assets
Convert shares to redeemable assets without exceeding real pro-rata backing.
convert_to_redeem_assets_bounded
Convert shares to redeemable assets and enforce an operation cap.
convert_to_shares
Convert an asset amount to shares (floor rounding — fewer shares, favors vault).
convert_to_shares_bounded
Convert assets to shares and reject quotients above the operation’s legal cap.
convert_to_shares_ceil
Convert an asset amount to shares (ceil rounding — more shares, favors user).
convert_to_shares_ceil_bounded
Convert assets to shares with ceil rounding and reject quotients above the operation’s cap.
convert_to_withdraw_shares_ceil_bounded
Convert withdrawal assets to shares without consuming remaining holders’ backing.
convert_to_withdrawable_shares
Return shares withdrawable against available assets on both virtual and real bases.
effective_totals
Compute effective totals including virtual shares/assets for conversion math.
plan_idle_payout
Plan an idle-funded payout from the current vault state.
preview_deposit_shares
Preview the shares minted for a deposit of assets using kernel conversions.
preview_withdraw_assets
Preview the assets redeemed for shares using kernel conversions.
should_refresh_fees_for_value_transfer