For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ“ˆTrading

Buy and sell tokens on the LiquidLaunch bonding curve. All functions are on the LiquidLaunch contract (0xDEC3540f5BA6f2aa3764583A9c29501FeB020030).

Buying tokens

function buyTokens(address token) external payable

Send HYPE as msg.value. The contract calculates tokens based on the bonding curve, deducts the 1% fee, and transfers tokens to your wallet.

Selling tokens

function sellTokens(address token, uint256 tokenAmount) external

Specify how many tokens to sell. You receive HYPE minus the 1% fee. No approval required.

Estimating trades

Always estimate before trading to understand price impact:

function estimateBuy(address token, uint256 hypeAmount) public view returns (uint256)
function estimateSell(address token, uint256 tokenAmount) public view returns (uint256)

Both estimates include the 1% fee deduction.

Checking reserves

function getLiquidity(address token) public view returns (uint256 hypeReserve, uint256 tokenReserve)

Returns current virtual reserves. Useful for understanding price impact before large trades.

Full contract reference

All functions, events, data structures, and error codes are documented in the Contract Reference.

Last updated