write.asset_manager.compounder
Automatically claims LP trading fees and reinvests them to compound interest in concentrated liquidity positions, increasing effective APY between rebalances.
Instructions
Encode args for the standalone compounder automation. Claims accumulated LP trading fees and reinvests them back into the position (compound interest). LP fees only — does NOT claim staking rewards like AERO; use write.asset_manager.compounder_staked for staked positions earning emission tokens. When paired with a rebalancer, the rebalancer compounds at rebalance time — adding a compounder also compounds between rebalances for higher effective APY. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex_protocol | Yes | DEX protocol of the LP position — used to resolve the correct asset manager address. | |
| enabled | No | True to enable, false to disable | |
| chain_id | No | Chain ID: 8453 (Base) or 130 (Unichain) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datas | Yes | ||
| statuses | Yes | ||
| description | No | ||
| strategy_name | No | ||
| asset_managers | Yes |
Implementation Reference
- The handler function that executes the logic for the "write.asset_manager.compounder" tool.
async (params) => { try { const validChainId = validateChainId(params.chain_id); const amKey = dexProtocolToAmKey(params.dex_protocol); const amAddress = getAmProtocolAddress(validChainId, "compounders", amKey); if (!params.enabled) return formatResult( disabledIntent([amAddress], `Disable compounder (${params.dex_protocol})`), ); const callbackData = encodeCompounderCallbackData(COMPOUNDER_INITIATOR); const result = { description: `Enable compounder (${params.dex_protocol})`, asset_managers: [amAddress], statuses: [true], datas: [callbackData], }; return formatResult(result); } catch (err) { return { content: [ { type: "text" as const, text: `Error: ${err instanceof Error ? err.message : String(err)}`, }, ], isError: true, }; } }, ); - src/tools/write/asset-managers/compounder.ts:18-36 (registration)Tool registration for "write.asset_manager.compounder".
server.registerTool( "write.asset_manager.compounder", { annotations: { title: "Encode Compounder Automation", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, description: "Encode args for the standalone compounder automation. Claims accumulated LP trading fees and reinvests them back into the position (compound interest). LP fees only — does NOT claim staking rewards like AERO; use write.asset_manager.compounder_staked for staked positions earning emission tokens. When paired with a rebalancer, the rebalancer compounds at rebalance time — adding a compounder also compounds between rebalances for higher effective APY. Returns { asset_managers, statuses, datas } — pass to write.account.set_asset_managers. Combinable with other intent tools.", outputSchema: IntentOutput, inputSchema: { dex_protocol: DEX_PROTOCOL_SCHEMA, enabled: z.boolean().default(true).describe("True to enable, false to disable"), chain_id: z.number().default(8453).describe("Chain ID: 8453 (Base) or 130 (Unichain)"), }, },