Skip to main content
The CLMM instructions module enables vault managers and allocators to provide concentrated liquidity, trade PT and YT, and claim farm emissions on the Exponent CLMM. All interactions are executed as Squads sync transactions validated against onchain policies.

Transaction Structure

Every CLMM interaction goes through createVaultSyncTransaction, which returns three parts:

Deposit Liquidity

clmmAction.depositLiquidity creates a new LP position on the CLMM with a specified tick range. The LP position keypair is generated internally and returned in result.signers.

Parameters

The LP position keypair is generated internally by the SDK. After calling createVaultSyncTransaction, the keypair is available in result.signers[0]. Save the public key to reference this position in future operations (add liquidity, withdraw, claim emissions).
A matching policy must exist before executing. See Policy Builders.

Add Liquidity

clmmAction.addLiquidity adds more liquidity to an existing LP position.

Parameters

A matching policy must exist before executing. See Policy Builders.

Withdraw Liquidity

clmmAction.withdrawLiquidity removes liquidity from an LP position, receiving PT and SY back.

Parameters

A matching policy must exist before executing. See Policy Builders.

Buy PT

clmmAction.buyPt buys PT with SY on the CLMM.

Parameters

A matching policy must exist before executing. See Policy Builders.

Sell PT

clmmAction.sellPt sells PT for SY on the CLMM.

Parameters

A matching policy must exist before executing. See Policy Builders.

Buy YT

clmmAction.buyYt buys YT with SY on the CLMM.

Parameters

A matching policy must exist before executing. See Policy Builders.

Sell YT

clmmAction.sellYt sells YT for SY on the CLMM.

Parameters

A matching policy must exist before executing. See Policy Builders.

Trade PT (Low-Level)

clmmAction.tradePt is a low-level PT/SY swap that accepts a SwapDirection. For most use cases, prefer buyPt or sellPt.

Parameters

A matching policy must exist before executing. See Policy Builders.

Claim Farm Emission

clmmAction.claimFarmEmission claims farm emissions from an LP position.

Parameters

A matching policy must exist before executing. See Policy Builders.

Full Flow Example

This example demonstrates providing concentrated liquidity on the CLMM, buying PT, and then withdrawing the liquidity position.

Step 1: Deposit Liquidity (Create LP Position)

Step 2: Buy PT with SY

Step 3: Withdraw Liquidity