Skip to content
Launch App >

All fees charged by the Turbine.cash protocol.

OperationFee RatePaid By
Deposit[PLACEHOLDER: FEE_DEPOSIT_PCT]Depositor
Withdraw[PLACEHOLDER: FEE_WITHDRAW_PCT]Withdrawn amount
Swap[PLACEHOLDER: FEE_SWAP_PCT]Withdrawn amount
RevertSame as depositOriginal depositor

When you deposit tokens, a fee is deducted:

netDeposit = depositAmount - depositFee
depositFee = depositAmount * (depositFeeBps / 10000)
const depositAmount = 100_000_000; // 100 USDC
const depositFeeBps = 50; // 0.5% [PLACEHOLDER]
const fee = depositAmount * depositFeeBps / 10000;
// fee = 500_000 (0.5 USDC)
const netDeposit = depositAmount - fee;
// netDeposit = 99_500_000 (99.5 USDC)

The relayer deducts a fee from withdrawals:

recipientReceives = withdrawAmount - relayFee
relayFee = withdrawAmount * (withdrawFeeBps / 10000)
const withdrawAmount = 99_500_000; // Amount in pool
const withdrawFeeBps = 100; // 1% [PLACEHOLDER]
const fee = withdrawAmount * withdrawFeeBps / 10000;
// fee = 995_000 (0.995 USDC)
const received = withdrawAmount - fee;
// received = 98_505_000 (98.505 USDC)

Withdraw+swap has additional fees:

totalFee = withdrawFee + swapFee + jupiterFees
recipientReceives = (swapOutput - swapFee) * (1 - jupiterFees)
FeeDescription
Withdraw FeeProtocol withdrawal fee
Swap FeeAdditional fee for swap service
Jupiter FeesDEX routing fees (varies)
// Withdraw 100 USDC, swap to SOL
const withdrawAmount = 100_000_000;
const withdrawFeeBps = 100; // 1%
const swapFeeBps = 50; // 0.5%
// Step 1: Withdraw fee
const afterWithdrawFee = withdrawAmount * (10000 - withdrawFeeBps) / 10000;
// 99_000_000 USDC
// Step 2: Swap (Jupiter handles conversion + their fees)
const jupiterOutput = /* varies by market */;
// Step 3: Swap fee
const afterSwapFee = jupiterOutput * (10000 - swapFeeBps) / 10000;
// Final SOL amount received
RecipientShare
Protocol Treasury~90% (varies)
Affiliate[PLACEHOLDER: AFFILIATE_FEE_PCT]
const BPS_DENOMINATOR = 10000;
function calculateFee(amount: bigint, feeBps: number): bigint {
return (amount * BigInt(feeBps)) / BigInt(BPS_DENOMINATOR);
}
function calculateNetAmount(amount: bigint, feeBps: number): bigint {
return amount - calculateFee(amount, feeBps);
}
function calculateGrossFromNet(netAmount: bigint, feeBps: number): bigint {
return (netAmount * BigInt(BPS_DENOMINATOR)) / BigInt(BPS_DENOMINATOR - feeBps);
}
// Examples
const deposit = 100_000_000n;
const depositFee = calculateFee(deposit, 50); // 0.5%
const netDeposit = calculateNetAmount(deposit, 50);
console.log(`Deposit: ${deposit}`);
console.log(`Fee: ${depositFee}`);
console.log(`Net: ${netDeposit}`);

Fees are stored in the MerkleState account:

interface MerkleState {
// ...
depositFeeBps: number; // Deposit fee in basis points
withdrawFeeBps: number; // Withdrawal fee in basis points
}
// Query current fees
const merkle = await program.account.merkleState.fetch(merklePda);
console.log('Deposit fee:', merkle.depositFeeBps / 100, '%');
console.log('Withdraw fee:', merkle.withdrawFeeBps / 100, '%');

Fee rates may change over time:

  • Changes require admin transaction
  • Changes apply to future transactions only
  • Historical fees remain as recorded
ScenarioTotal Fees
Deposit → Wait → WithdrawDeposit + Withdraw
Deposit → Withdraw+SwapDeposit + Withdraw + Swap + Jupiter
Deposit → RevertDeposit fee (no withdrawal)

Deposit 100 USDC, withdraw to SOL:

Initial: 100.00 USDC
- Deposit: -0.50 USDC (0.5%)
In pool: 99.50 USDC
- Withdraw: -0.995 USDC (1%)
After fee: 98.505 USDC
→ Jupiter: ~X.XX SOL (market rate - Jupiter fees)
- Swap fee: -0.5%
Final: ~X.XX SOL

In addition to protocol fees, transactions require SOL for:

TransactionTypical Cost
Deposit~0.005 SOL
Withdraw (via relayer)Paid by relayer
Revert~0.005 SOL
Create Affiliate~0.01 SOL