Vault Lifecycle
State machines for escrow_vault deposits and redemptions. Executable steps are on the how-to pages below. Load vault addresses from Fund Information. Encode the referral before the request (Referrals).
This page does not apply to SoDEX RWA tokens (clob). A submitted request does not mint shares or return assets in the same transaction. Claim only when User Fund History and the on-chain request show the result was not automatically delivered.
Deposit
Credit is the vault ERC-20 share balance on ValueChain, not Spot or Perps. assets must meet getMinDepositAmount(). Direct submission needs an underlying-asset approval and SOSO for gas. A signed OnBehalf call can be broadcast by the Transaction Relayer.
Confirm the fund is
escrow_vault, is accepting deposits, andchainConfig.pausedis not true. The underlying must already be on ValueChain.Encode
referral(usebytes32(0)when none applies). SubmitrequestDeposit(assets, receiver, referral)or a signedrequestDepositOnBehalf. Save the transaction hash.Wait for settlement. Match history to that hash. If shares were not auto-delivered, call
claimDeposit(receiver, requestId).Verify the receiver's vault share balance before treating the deposit as complete.
Redeem
The request spends vault shares the user already holds. No underlying-asset approval is required. shares must meet getMinRedeemShares(). Credit is the underlying asset on ValueChain. An immediate leg completing does not finish a delayed leg.
Encode
referraland submitrequestRedeem(shares, receiver, referral)or a signedrequestRedeemOnBehalf. Save the transaction hash.Wait for settlement. For the non-delayed portion, confirm auto-delivery or call
claimRedeem(receiver, requestId).If a delayed portion exists, wait for that batch, then confirm auto-delivery or call
claimDelayedRedeem(receiver, requestId).Reconcile the underlying balance for every applicable leg before treating the redemption as complete.
Settlement and Claims
Query User Fund History with the owner address and fund ID. Match the original transaction hash and operation kind; retain entryId when present. Do not select a request solely by its position in the timeline or by a pre-submission next-ID query.
No matching entry
Continue querying with bounded backoff; indexing may lag. Do not submit another deposit or redemption.
claimable=true
Confirm the matching on-chain request and simulate the applicable claim before submitting.
delayedPending=true
Keep tracking the delayed leg, even if an immediate claim is available or has completed.
claimable=false
Do not submit a claim based on this response. Check balances to distinguish pending settlement from an already delivered result.
Either flag omitted
Treat that aspect as unknown; do not substitute false.
For a deposit, the claim method is claimDeposit. For a redemption, distinguish claimRedeem from claimDelayedRedeem using the on-chain request. The aggregate claimable flag does not select the redemption leg. If settlement auto-delivered shares or assets, skip the corresponding claim.
Scripts and claim calls are on Settlement and Claims.
How-tos
Direct submission: the user wallet pays ValueChain gas. Signed submission: the user signs; the Transaction Relayer can broadcast OnBehalf.
Last updated