Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lfg.rich/llms.txt

Use this file to discover all available pages before exploring further.

Official LFG.RICH tokens trade through a bonding-curve style flow instead of a traditional creator-managed liquidity pool. The bonding curve determines the relationship between BNB entering or leaving the system and the amount of tokens bought or sold.

Buys

When a user buys an official LFG.RICH token:
1

BNB enters the trade

The user sends BNB into the buy transaction.
2

The hook estimates output

The hook calculates how many tokens the user receives after applying the token’s trading fee.
3

Fees are split

The fixed platform fee and the floor boost portion are separated automatically.
4

Token state updates

Price, reserves, floor-related values, volume, and trade history are updated after the transaction confirms.

Sells

When a user sells an official LFG.RICH token:
1

Tokens enter the sell transaction

The user sells token amount through the LFG.RICH swap router.
2

The hook estimates BNB output

The hook calculates the BNB amount based on the bonding curve and protocol state.
3

Floor protection applies

The protocol is designed so sells do not price the token below its floor.
4

User receives BNB

The user receives the sell output after applicable fees.

Estimates

The hook exposes estimate functions that integrations can use before sending transactions:
function estimateBuy(bytes32 poolId, uint256 ethIn)
  view
  returns (uint256 tokensOut, uint256 platformFee, uint256 floorBoostFee);

function estimateSell(bytes32 poolId, uint256 tokenAmount)
  view
  returns (uint256 ethOut, uint256 platformFee, uint256 floorBoostFee);
Use these estimates together with slippage checks before sending real transactions.