Configure the policy
Use a loaded Strategy Vaultvault, connection, and manager Keypair. Select clmmMarket from the Exponent markets; it identifies the CLMM MarketThree account.
actions allows all seven. tradePt authorizes both PT directions and exact-in/exact-out instructions.
allowedMarkets and allowedSyMints form a union: a match on either permits the market. An SY scope can cover future maturities. Omitting both allows any CLMM market. actions: [] is rejected. An empty SY list is rejected unless a market list is supplied; an empty market list alone leaves market scope open. These filters do not impose trade amounts or price limits; set those in action inputs.
Prepare a liquidity position
Configure PT and SY price paths to your vault’s accounting denomination; YT trades also need tracked YT token accounts and price coverage. The builder prepares supported token accounts and tracks a newly created LP position. Existing untracked LP positions require an explicitAddClmmPositionEntry settings update, with the market and PT/SY price references, before use.
To create a new position, load the market with MarketThree.load(vault.env, connection, clmmMarket) and choose boundaries from its state.ticks data. The intent amounts below cap PT and SY deposits in their smallest units:
lpPosition only after creation and registration confirm. For an existing position, load its address from the vault’s registered CLMM entries instead.
Provide liquidity and trade
Add liquidity to the registered position with the same PT/SY intent units:- Transaction builder
- Sync helpers
build() returns an execution plan: ordered transactionSets containing instructions, additional signers, and lookup table addresses. The builder schedules supported setup and refreshes; send() simulates and submits the sequence.Withdraw liquidity and collect emissions
lpIn, a liquidity-unit amount, and a quote for the minimum PT/SY outputs. Select rewards from the loaded market’s state.lpFarm.farmEmissions and configure their price paths before claiming.
Trade PT and YT
Use one trade peraddActions step or sync execution. For example, buying PT spends an exact SY input with a PT output floor:
Trade amounts use the relevant token’s smallest units. Trades also accept
lnImpliedApyLimit, expressed in the market’s log-APY representation.
Claim farm emissions manually
The action helper adds top-level ATA setup with the Squads PDA as payer. That requires a signature an outer transaction cannot supply. For claims, create the reward ATA with the manager as payer, register/price it, and construct the claim directly:createRewardAta, register that reward balance using Configure assets and prices, then refresh accounting. Package claim.ixs through manual transaction construction under the emission policy. Replace its returned ATA setup with the manager-paid setup above. Retain any remaining required refreshes around the execution.