Module op_state

Source
Expand description

Operation state machine for asynchronous vault operations.

This module provides a chain-agnostic state machine for managing the lifecycle of allocation, withdrawal, refresh, and payout operations in a vault.

§State Machine

                   +-------+
                   | Idle  |<-----------------------+
                   +-------+                        |
                       |                            |
         +-------------+-------------+              |
         |                           |              |
         v                           v              |
   +------------+            +-------------+        |
   | Allocating |            | Refreshing  |--------+
   +------------+            +-------------+        |
         |                                          |
         | (on completion or stop)                  |
         v                                          |
   +-------------+                                  |
   | Withdrawing |----------------------------------+
   +-------------+                                  |
         |                                          |
         | (when enough collected)                  |
         v                                          |
   +--------+                                       |
   | Payout |---------------------------------------+
   +--------+

Structs§

AllocatingState
Supplying idle underlying to targets according to a plan or queue.
AllocationPlanEntry
IdleState
No operation in-flight. The vault is ready to start a new allocation or withdrawal.
PayoutState
Final step that transfers assets to the receiver and settles the share escrow.
RefreshingState
Read-only refresh of target principals to update stored AUM.
WithdrawingState
Collecting liquidity from targets to satisfy a user withdrawal/redeem request.

Enums§

OpState
Operation state machine for asynchronous allocation, withdrawal, and payout flows.

Type Aliases§

TargetId