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.
IdlePayoutPlan
Planned payout details for satisfying a queued withdrawal from idle assets.
KernelResult
Result of applying a kernel action.

Enums§

AtomicPayoutKind
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.
convert_to_assets
Convert a share amount to assets (floor rounding — fewer assets, favors vault).
convert_to_assets_ceil
Convert a share amount to assets (ceil rounding — more assets, favors user).
convert_to_shares
Convert an asset amount to shares (floor rounding — fewer shares, favors vault).
convert_to_shares_ceil
Convert an asset amount to shares (ceil rounding — more shares, favors user).
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.