Keep accounting current
Run refreshes as often as possible, including while the vault is idle. Choose a cadence, automate it with a keeper, and monitor failed runs. Refreshing is permissionless, so the keeper does not need a manager role.Run a refresh
Update the oracle and protocol inputs your vault uses, then recalculate AUM. Exponent’s cached prices must be updated in the same slot as the calculation, so keep the price updates and AUM refresh together. Start with a loadedvault and build the ordered refresh instructions:
pricePlan.lookupTableAddresses and submit refreshInstructions in one transaction when they fit.
The price plan builds supported source refreshes and Exponent price updates. getKaminoRefreshIxs adds refreshes for tracked Kamino lending reserves and obligations. Add any other updates required by your integration, and keep the underlying feeds within their oracle provider’s freshness requirements. The Scope helper combines duplicate Scope updates and places them first, as Scope requires.
Refresh before an operation
Place the refresh sequence before the operation that needs current accounting. For policy execution, vault validation requires fresh AUM and marks it stale after the action. Refresh again before the next operation that requires fresh accounting. Valuation-sensitive configuration changes also require a refresh afterward. If you use VaultTransactionBuilder, it prepares the required AUM refreshes around supported strategy actions. Include those refreshes yourself when assembling transactions manually.When one transaction is not enough
If the refreshes and operation exceed one transaction’s compute, account, or size limits, split the sequence across a Jito bundle: oracle and price updates, AUM refresh, then the operation. Jito executes the bundle in order within one slot, keeping the price updates and calculation in the same slot. Load the price plan’s lookup tables intolookupTableAccounts, then pack the refresh instructions into unsigned v0 transactions:
operationTransaction to your signed operation, including its required protocol refreshes and a Jito tip. Submit the signed transactions as base64 through Jito’s sendBundle. To run only the refresh, use a signed tip transaction in place of operationTransaction.
Simulate the full bundle to check compute use; the packer checks transaction size and account count. Each transaction must still fit Solana’s limits. Keep any protocol refreshes that must share a transaction with their action together. Jito accepts at most five transactions, including any separate tip transaction.