Withdrawal Queue
The withdrawal queue is the part of Hako that manages withdrawals over time. It keeps track of user requests, locks the corresponding LP tokens and coordinates liquidity movements across chains.
sequenceDiagram
participant U as User wallet
participant APP as Hako app
participant AL as Allocator
participant HV as Home vault
participant EX as External vaults
participant NI as Hako NEAR Intents
participant DST as User address<br>(terget chain)
U->>APP: Fill amount, chain, token to withdraw
APP->>U: Show typed data
U-->>APP: Signed EIP-712<br>withdrawal message
APP-->>AL: Forward signed message
AL->>HV: Submit withdrawal signed data
Note over HV: Verify signature,<br>create queue entry,<br>lock LP tokens
HV-->>AL: Withdrawal request event
AL->>EX: Redeem from external vaults
EX-->>HV: Return stablecoins<br>to Hako vaults
AL->>HV: Approve Near Intent<br>to spend required amount
HV->>NI: Transfer stablecoins
AL->>NI: Swap/bridge to target chain
NI->>DST: Send requested stablecoin
AL->>HV: Finalize withdrawal tx
Note over HV: Burn locked LP tokens,<br>update total assets
Last updated