Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

give me the formula to calculate the maximum amount of tokens that can immediately be…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Googlegemma-3n-e4b-it’s answer.
  1. User

    give me the formula to calculate the maximum amount of tokens that can immediately be bough back using the same funds obtained by selling x amount of tokens to a pump fun pool

  2. Claude Assistant

    For a pump.fun style bonding curve, the maximum buyback amount depends on the specific curve formula being used. Here's the general approach:

    For a linear bonding curve (most common in pump.fun):

    If the price function is: Price(supply) = m × supply + b

    Where:

    • m = slope coefficient
    • b = initial price
    • S = current supply before selling

    Step 1: Calculate SOL received from selling x tokens

    SOL_received = x × (m × (S - x/2) + b)
    

    Step 2: Find maximum buyback amount y Solve this equation for y:

    SOL_received = y × (m × (S - x + y/2) + b)
    

    This gives you a quadratic equation:

    m × y²/2 + y × (m × (S - x) + b) - x × (m × (S - x/2) + b) = 0
    

    Simplified approximation for small x relative to S:

    y ≈ x × (1 - (m × x)/(m × S + b))
    

    Key insights:

    • Due to slippage, y will always be less than x
    • The larger x is relative to total supply, the greater the loss
    • The steeper the bonding curve (higher m), the more significant the slippage

    Important notes:

    • This assumes no trading fees
    • Actual pump.fun implementations may have additional parameters
    • You'd need the specific curve parameters (m, b, current supply) for precise calculations

    The exact formula depends on pump.fun's specific bonding curve implementation, which may vary from this standard linear model.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.