Skip to main content
Trades on the bonding curve go through the InkyPump V2 hook at 0x4cC8F6d5B7cE150CCC0A9B7664532B1283b96AC4. There are four write functions: buy, buyWithReferral, sell, and sellWithReferral. The referral variants emit an extra Referral event. After a token bonds, trades route through the Uniswap Universal Router instead. See Post-Bond Pool for that path.

buy

function buy(
    uint256 launchId,
    uint256 minTokensOut,
    InkyPumpTypes.CaptchaAuth calldata captcha
) external payable returns (uint256 tokensOut);
ParamMeaning
launchIdThe launch ID returned by createLaunch
minTokensOutSlippage floor. Reverts if fewer tokens would be sent
captchaCaptcha signature, required only during the anti-snipe window
msg.value is the ETH you spend. Must be at least MIN_BUY_ETH (0.00001 ether). Returns tokensOut, the number of tokens credited to msg.sender.

buyWithReferral

function buyWithReferral(
    uint256 launchId,
    uint256 minTokensOut,
    InkyPumpTypes.CaptchaAuth calldata captcha,
    string calldata referralCode
) external payable returns (uint256 tokensOut);
Same as buy, plus emits Referral(launchId, msg.sender, referralCode) if referralCode is non empty. No fee impact.

sell

function sell(
    uint256 launchId,
    uint128 tokenAmount,
    uint256 minEthOut,
    InkyPumpTypes.CaptchaAuth calldata captcha
) external returns (uint256 payout);
ParamMeaning
launchIdThe launch ID
tokenAmountTokens to sell. Must be at least MIN_SELL_TOKENS (1 ether = 1 token)
minEthOutSlippage floor on the ETH payout
captchaCaptcha signature, required only during the anti-snipe window
The contract pulls tokenAmount from msg.sender (you need to approve the hook first, or the token’s transferFrom allowance has to cover the trade). Returns the net ETH payout.

sellWithReferral

function sellWithReferral(
    uint256 launchId,
    uint128 tokenAmount,
    uint256 minEthOut,
    InkyPumpTypes.CaptchaAuth calldata captcha,
    string calldata referralCode
) external returns (uint256 payout);
Same as sell, plus emits Referral. No fee impact.

Captcha auth

The anti-snipe captcha is an off chain ECDSA signature from the InkyPump signer.
struct CaptchaAuth {
    uint256 deadline;   // expiration timestamp for this signature
    bytes signature;    // ECDSA signature from the authorized captcha signer
}
If the anti-snipe window has ended for the launch (block.timestamp > launchTimestamp + antiSnipeDuration), the captcha is not checked. You can pass empty fields. If the window is still active, you must provide a valid signature. Otherwise the call reverts with CaptchaRequired(). The InkyPump UI fetches the signature automatically from its backend. For direct integrations that need to trade during the anti-snipe window, contact InkyPump for backend signing access.

Fees

The hook splits the input (on buy) or the gross payout (on sell) before processing:
protocolFee  = amount * PROTOCOL_FEE_BPS / BPS_DENOMINATOR;  // 1 percent
variableFee  = amount * VARIABLE_FEE_BPS / BPS_DENOMINATOR;  // 1 percent
creatorFee   = variableFee * creatorFeeSplitBps / BPS_DENOMINATOR;
buybackFee   = variableFee - creatorFee;
netAmount    = amount - protocolFee - variableFee;
creatorFee accrues to the launch creator. buybackFee accrues to a buyback module that periodically buys and burns the token.

Events emitted

Every successful trade emits:
event Trade(
    uint256 indexed launchId,
    address indexed trader,
    TradeType tradeType,    // BUY or SELL
    PriceData priceData,
    TradeData tradeData,
    uint256 refund
);

event FeeAccrued(address indexed recipient, uint256 amount);
The *WithReferral variants additionally emit:
event Referral(
    uint256 indexed launchId,
    address indexed trader,
    string referralCode
);

Common errors

RevertCause
CaptchaRequiredIn the anti-snipe window without a valid signature
InvalidCaptchaSignature does not verify against the configured signer or deadline has passed
SlippageExceededOutput below minTokensOut (buy) or minEthOut (sell)
BelowMinBuymsg.value is below MIN_BUY_ETH
BelowMinSelltokenAmount is below MIN_SELL_TOKENS
LaunchFinalizedThe token has bonded. Use the V4 pool instead
LaunchNotStartedlaunchTimestamp is in the future (scheduled launch)