Skip to main content
This page gives developers the public contract information needed to integrate with LFG.RICH. Users do not need access to the site source code. The readable ABI arrays below can be copied directly into Ethers, Viem parseAbi, Web3.js, or Web3.py integrations.

Factory

Creates official LFG.RICH tokens and registers them with the Hook.

Uniswap V4 Hook

Handles pricing, floors, reserves, fees, collateral, borrowing, and hook callbacks.

Swap Router

Provides simple buy and sell functions for users and integrations.

Token

ERC20-compatible token contract created by the Factory.

Pool Manager

Uniswap V4 Pool Manager used by the Hook and Router flow.

Referral and Treasury

Handles invite bindings, referral reward routing, and platform-side accounting.
Use the V5 signatures shown on this page. Older examples that call createToken(name, symbol, totalFeeBps), estimateBuy(poolId, ethIn), or estimateSell(poolId, tokenAmount) are outdated.

BNB Smart Chain V5 addresses

Network constants

Important V5 interaction rules

Every token created on LFG.RICH has its own poolId and its own Uniswap V4 PoolKey. For reliable integrations:
1

Load the token

Start from the public API or from Factory-created token data.
2

Resolve the poolId

Use token.pool_id, token.poolId, or hook.tokenToPoolId(tokenAddress).
3

Resolve or build the PoolKey

Prefer factory.getPoolKey(tokenAddress) when available.
4

Quote through the Hook

Use poolId and the wallet address for V5 buy/sell estimates.
5

Execute swaps through the Swap Router

Buy and sell calls use the token-specific PoolKey.
6

Execute lending through the Hook

Borrow, borrow more, repay, and price reads use poolId.
The API token object normally includes pool_id. You can use that value, but external tools should still know how to resolve the same value from hook.tokenToPoolId(tokenAddress) or factory.getTokenInfo(tokenAddress).poolId.

Factory ABI

The Factory creates official LFG.RICH tokens, stores token metadata, stores creator ownership, and exposes PoolKey data for each token.

Factory notes

createToken(name, symbol, devBuyEth) creates the token and optionally performs an initial creator buy. The transaction value must cover creationFee + devBuyEth. Token description, logo, website, X/Twitter, Telegram, QQ group, and other metadata are saved through the public application API after the token is created.

Uniswap V4 Hook ABI

The Hook contains the LFG.RICH protocol logic for token state, price estimates, fees, floor price support, borrowing, borrow more, repayment, and events.

Hook notes

estimateBuy and estimateSell include the user address because referral state can change the fee split. If the wallet is not connected, use the zero address only for display-only estimates. Real trading tools should estimate again after the wallet is connected. tokenStates(poolId) in V5 returns floorPrice, realETH, virtualETH, totalBorrowedETH, collateralSupply, allTimeHighPrice, k, and autoFloorPctBps. Older fields such as floorBoostPool or totalReserveAccumulated are not part of the V5 Hook state.

Swap Router ABI

The Swap Router is the user-facing contract for buys and sells.

Token ABI

Every token created by the Factory is an ERC-20 token controlled by the Hook for protocol mint and burn operations.

Referral ABI

The Referral contract stores invitation relationships used by the V5 fee system.

Treasury ABI

The Treasury receives protocol funds that can be flushed to the configured recipient.
For integrations that do not want to hardcode addresses and ABIs, fetch the public config endpoint:
Use /jsonconfig/contracts only if your tooling needs canonical JSON ABI objects instead of human-readable ABI strings.