Overview
Confirms and submits a signed fee claim transaction to the Solana blockchain. This endpoint validates the transaction structure, adds the LP owner’s signature, and broadcasts it to the network. The transaction claims fees from a Meteora DAMM v2 pool and transfers 70% to the configured destination address.Request Parameters
/fee-claim/claim)/fee-claim/claim endpointResponse
tokenA(string): Total Token A fees claimedtokenB(string): Total Token B fees claimed
Success Response
Error Responses
400 - Missing Parameters
400 - Missing Parameters
400 - Request Not Found
400 - Request Not Found
400 - Request Expired
400 - Request Expired
400 - Transaction Deserialization Failed
400 - Transaction Deserialization Failed
400 - Missing Blockhash
400 - Missing Blockhash
400 - Expired Blockhash
400 - Expired Blockhash
400 - Fee Payer Mismatch
400 - Fee Payer Mismatch
400 - LP Owner Not Required
400 - LP Owner Not Required
400 - Fee Payer Not Signed
400 - Fee Payer Not Signed
400 - Invalid Fee Payer Signature
400 - Invalid Fee Payer Signature
400 - Amount Exceeds Expected
400 - Amount Exceeds Expected
500 - Configuration Error
500 - Configuration Error
500 - Transaction Submission Failed
500 - Transaction Submission Failed
Process Flow
This endpoint performs extensive validation before submitting the transaction:Validate Parameters
Retrieve Request Data
Acquire Pool Lock
Check Request Expiry
Deserialize Transaction
Validate Blockhash
Verify Fee Payer
Verify Fee Payer Signature
Validate Transaction Structure
Add LP Owner Signature
Submit Transaction
Wait for Confirmation
Cleanup
Security Validations
This endpoint implements comprehensive transaction validation to prevent attacks:1. Lock System
1. Lock System
2. Blockhash Validation
2. Blockhash Validation
3. Allowed Programs
3. Allowed Programs
- Token Program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA)
- Associated Token Program (ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL)
- Compute Budget Program
- Lighthouse Program (for optimization)
- Meteora CP-AMM Program (CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C)
- System Program (for native SOL transfers)
4. Token Instruction Validation
4. Token Instruction Validation
- Only Transfer (opcode 3) and TransferChecked (opcode 12) are allowed
- All transfers must be signed by the LP owner
- Transfer amounts cannot exceed calculated fees
5. Destination Validation
5. Destination Validation
- Configured destination address token accounts (70% recipient)
- LP owner token accounts (30% remainder) Any other destination is rejected.
6. System Transfer Validation
6. System Transfer Validation
- Only SystemProgram.transfer (instruction type 2) allowed
- Must be from LP owner to configured destination address
- Amount cannot exceed Token B fees
7. ATA Instruction Validation
7. ATA Instruction Validation
8. Amount Validation
8. Amount Validation
Rate Limiting
This endpoint is subject to rate limiting:- 10 requests per 5-minute window per IP
- Returns HTTP 429 when limit exceeded
Transaction Confirmation
The API attempts to wait for transaction confirmation but continues even if confirmation times out:- Confirmation Commitment: confirmed
- Timeout Handling: Logs warning but returns success
- User Responsibility: Check transaction status on Solana explorer
https://solscan.io/tx/{signature}
Pool Lock System
Request Cleanup
After successful submission:- Request data is immediately removed from memory
- Pool lock is released
- requestId cannot be reused
Logging
The endpoint logs comprehensive information for monitoring:- Pool address
- Token mints and fee amounts
- Destination address
- Transaction signature
- Solscan link for easy verification
Best Practices
Check Blockhash Age
/fee-claim/claim. Blockhashes expire after ~60 seconds.Handle Expiry
Monitor Transaction
Wait for Lock
Environment Variables
Required server configuration:RPC_URL: Solana RPC endpointDAMM_POOL_ADDRESS: Meteora DAMM v2 pool addressPROTOCOL_PRIVATE_KEY: LP owner’s private key (Base58)FEE_DESTINATION_ADDRESS: Address to receive 70% of claimed fees
Related Endpoints
/fee-claim/claim- Create the unsigned fee claim transaction
