https://tars.loopscale.com/v1/markets). Transactions are built by the Pandora API (https://tars.loopscale.com/v1/pandora). For how the vault works underneath, see Earn Vault Architecture and Earn Vault Flows.
1. Find a vault
Get Earn Vaults lists every registered vault with its latest snapshot. That includes Draft vaults that aren’t open for deposits yet, so filter onstatus == 1 before offering deposits. The fields you need most:
realizedApyBps* fields are deprecated aliases of realizedReturnBps*. Use the new names.
Get Earn Vault History returns the same snapshot fields over time for charts, newest first. Snapshots are taken every 15 minutes.
Reading vault configuration
parsedAccountJson.exponentStrategyVault on Get Earn Vault is the decoded onchain vault account. Fields worth knowing:
2. Acknowledge the vault’s terms
IfrequiresAcknowledgment is true, show the vault’s terms and call Acknowledge Earn Vault once per wallet before its first deposit. It only records the acceptance (a timestamp on the wallet’s position), so it builds no transaction. Check acknowledgedAt on Get Earn Position to see whether a wallet has already accepted.
3. Deposit
Call Deposit to Earn Vault with the wallet and an amount in base units. The response carries two transactions intxBase64s: an AUM refresh, then the deposit. Sign both with the wallet and submit them in order as one Jito bundle.
minLpOut to protect against NAV moving between quote and landing. You can estimate expected shares as amount × 1e18 / navPerShareE18. Deposits fail onchain if they would exceed the vault’s deposit cap.
Sending the bundle
The two transactions must land in the same slot, because the vault program rejects price data that wasn’t refreshed in the current slot. Any Jito-compatible sender works. The action transaction already pays the tip.4. Track the position
Get Earn Position returns a wallet’s share balance, cost basis and realized PnL in one vault, plus its open withdrawal requests. Get Earn Portfolio returns the same for every vault the wallet holds, including vaults where it only has open withdrawal requests.shareBalance is the wallet’s live share-token balance. queuedShares are shares sitting in escrow behind open withdrawal requests, and they still earn until filled. Cost basis is average cost across both. feesPaidAssets isn’t populated yet and reads 0.
5. Withdraw
Call Withdraw from Earn Vault withmode:
instantredeems from the vault’s reserves right away, paying the withdrawal fee plus the instant fee, while reserves and the per-window instant cap allow.queuedopens a withdrawal request. The response’srequestIdidentifies it.
mint to pick a payout token from acceptedAssetMints. Instant mode pays it out directly. For queued requests the mint is recorded as a preference: the manager chooses the payout token(s) at fill time, so check fills on the request for what was actually paid.
Instant capacity
Before offering instant mode, estimate capacity from the vault account:Queued requests
Watch a queued request with Get Earn Withdrawal Queue or Get Earn Position. A request moves through0 Pending → 1 Partial → 2 Fulfilled, or 3 Cancelled.
- Claim. Claim Earn Withdrawal pays out everything filled so far. It succeeds only once
sharesFilled > sharesClaimedand the vault’s withdrawal period has unlocked (the lock interval, or the next scheduled withdrawal day). - Cancel. Cancel Earn Withdrawal returns the shares. It needs
cancelEnabled, and the vault’s cancel cooldown to have passed. The Loopscale app only offers it while nothing has been filled.
Building directly against the vault program
The Pandora API is the easiest path, but you can also build transactions yourself with Exponent’s TypeScript SDK (@exponent-labs/exponent-sdk). The Pandora endpoints use the same calls:
You’re then responsible for the same-slot bundling, Kamino/Scope reserve refreshes (Scope’s refresh must be the first instruction in its transaction), and lookup tables. See Exponent’s strategy vault developer docs.