Deposits, withdrawals, and claiming fees through the SDK.
LP capital flows are asynchronous and two-step: a request escrows funds, then a process settles them. This lets the policy validate at every transition.
Withdrawals mirror deposits, with a mandatory delay enforced in the core.
// Phase 1: escrow sharesawait hyro.requestWithdrawal({ vault, shares: 500_000 });// withdrawal_delay must elapse (enforced in core, a policy cannot waive it)// Phase 2: validate, burn shares, transfer underlying outawait hyro.processWithdrawals({ vault });
The withdrawal delay (vault.config.withdrawal_delay_seconds) is enforced in the core, not the policy. A policy cannot waive it. Some policies add a further time-of-period gate (e.g. policy_withdrawal_window).
claim_fees moves accrued (unclaimed) fees to their recipient. It is not a charge — charging happens during fund operations and only writes bookkeeping.
The dispatcher verifies recipient == recipients.get_recipient(fee_type) and amount <= unclaimed, then the core executes the SPL transfer signing as vault_share_signer.