Seashail

Tools: Liquidity

Provide and remove liquidity on Uniswap LP and Orca LP via transaction envelopes.

Liquidity tools manage AMM positions via transaction envelopes. All tools require policy approval. Venue is auto-selected by chain when omitted (EVM defaults to Uniswap LP, Solana defaults to Orca LP).

provide_liquidity

Add liquidity to an AMM pool. Executes a transaction envelope — the agent or a configured adapter must construct the transaction.

Parameters

Prop

Type

Per-Venue Behavior

  • Default venue for EVM chains when venue is omitted - Provide: Supply EVM envelope (to + data + value_wei) for addLiquidity call - The agent or adapter must construct the transaction envelope with the pool contract address and calldata - May involve approvals for ERC-20 tokens — agent/adapter should handle this separately or include in envelope - Supported on Ethereum, Base, Arbitrum, Optimism, Polygon, BNB, Avalanche
  • Default venue for Solana when venue is omitted - Provide: Supply Solana envelope (tx_b64 + allowed_program_ids) - The agent or adapter must construct the transaction envelope with Orca LP program instructions - allowed_program_ids must include Orca LP program ID for security - Supported on Solana mainnet

Response

{
  "chain": "base",
  "venue": "uniswap_lp",
  "txid": "0xabc...txhash",
  "usd_value": 100.0
}

Response shape is representative; actual fields may vary by venue. Solana returns signature instead of txid.

Examples

{
  "chain": "base",
  "venue": "uniswap_lp",
  "to": "0xPoolContractAddress",
  "data": "0xabc123...",
  "value_wei": "0",
  "usd_value": 100.0,
  "usd_value_known": true
}

The to field is the Uniswap pool or router contract address. The data field contains the encoded addLiquidity call.

{
  "chain": "solana",
  "venue": "orca_lp",
  "tx_b64": "AQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9A...",
  "allowed_program_ids": ["9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP"],
  "usd_value": 200.0,
  "usd_value_known": true
}

The tx_b64 field contains the base64-encoded unsigned transaction. The allowed_program_ids must include the Orca LP program ID.

Notes

  • Requires policy approval — transactions may be auto-approved, require confirmation, or be blocked depending on your policy configuration and USD value.
  • Envelope-only execution: These tools execute a transaction envelope. There is no native execution path. The agent or a configured adapter must provide the transaction envelope via envelope fields (to, data, value_wei for EVM; tx_b64, allowed_program_ids for Solana).
  • Adapter support: If no envelope fields are provided, Seashail uses a marketplace adapter (if configured) to fetch the transaction. If no adapter is configured and no envelope is provided, the tool returns an error.
  • Venue auto-selection: If venue is omitted, Seashail selects by chain (EVM → Uniswap LP, Solana → Orca LP).
  • See also: DeFi Guide

remove_liquidity

Remove liquidity from an AMM pool. Executes a transaction envelope — the agent or a configured adapter must construct the transaction.

Parameters

Prop

Type

Per-Venue Behavior

  • Default venue for EVM chains when venue is omitted - Remove: Supply EVM envelope (to + data + value_wei) for removeLiquidity call - The agent or adapter must construct the transaction envelope with the pool contract address and calldata - Returns underlying tokens to the wallet - Supported on Ethereum, Base, Arbitrum, Optimism, Polygon, BNB, Avalanche
  • Default venue for Solana when venue is omitted - Remove: Supply Solana envelope (tx_b64 + allowed_program_ids) - The agent or adapter must construct the transaction envelope with Orca LP program instructions - allowed_program_ids must include Orca LP program ID for security - Returns underlying tokens to the wallet - Supported on Solana mainnet

Response

{
  "chain": "base",
  "venue": "uniswap_lp",
  "txid": "0xabc...txhash",
  "usd_value": 100.0
}

Response shape is representative; actual fields may vary by venue. Solana returns signature instead of txid.

Examples

{
  "chain": "base",
  "venue": "uniswap_lp",
  "to": "0xPoolContractAddress",
  "data": "0xdef456...",
  "value_wei": "0",
  "usd_value": 100.0,
  "usd_value_known": true
}

The to field is the Uniswap pool or router contract address. The data field contains the encoded removeLiquidity call.

{
  "chain": "solana",
  "venue": "orca_lp",
  "tx_b64": "AQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9A...",
  "allowed_program_ids": ["9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP"],
  "usd_value": 200.0,
  "usd_value_known": true
}

The tx_b64 field contains the base64-encoded unsigned transaction. The allowed_program_ids must include the Orca LP program ID.

Notes

  • Requires policy approval — transactions may be auto-approved, require confirmation, or be blocked depending on your policy configuration and USD value.
  • Envelope-only execution: These tools execute a transaction envelope. There is no native execution path. The agent or a configured adapter must provide the transaction envelope via envelope fields (to, data, value_wei for EVM; tx_b64, allowed_program_ids for Solana).
  • Adapter support: If no envelope fields are provided, Seashail uses a marketplace adapter (if configured) to fetch the transaction. If no adapter is configured and no envelope is provided, the tool returns an error.
  • Venue auto-selection: If venue is omitted, Seashail selects by chain (EVM → Uniswap LP, Solana → Orca LP).
  • See also: DeFi Guide

On this page