> ## 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.

# Developer Overview

> Build integrations around LFG.RICH V5.

This section is for developers building dashboards, trading tools, bots, alerts, analytics, and wallet integrations for LFG.RICH.

<CardGroup cols={2}>
  <Card title="Public API" icon="server" href="/en/developers/api">
    Read token lists, details, trades, candles, portfolio data, and public protocol configuration.
  </Card>

  <Card title="Contract reference" icon="braces" href="/en/developers/contracts">
    Use V5 addresses and readable ABI string arrays for Factory, Hook, Router, Token, Referral, and Treasury.
  </Card>

  <Card title="Protocol examples" icon="terminal" href="/en/developers/protocol-examples">
    Follow V5 examples for Ethers, Viem, Web3.js, and Python Web3.py.
  </Card>

  <Card title="API examples" icon="code" href="/en/developers/examples">
    Copy practical fetch examples for existing public REST endpoints.
  </Card>
</CardGroup>

## V5 is the current integration target

Use V5 contracts for new integrations. V3 exists only for legacy tokens and should be treated as deprecated.

## Core integration flow

For token interactions, do not hardcode an old factory, hook, or PoolKey. Instead:

<Steps>
  <Step title="Read the token's factory and hook when available">
    V5 integrations should not assume old contract routes for every token.
  </Step>

  <Step title="Resolve the PoolKey from the correct Factory">
    Use `getPoolKey(token)` when available instead of guessing pool fields.
  </Step>

  <Step title="Use the PoolKey with the Swap Router">
    Buy and sell execution goes through the official Swap Router.
  </Step>

  <Step title="Use poolId with the Hook">
    Estimates, borrowing, repayment, and price reads use the token's Hook and `poolId`.
  </Step>
</Steps>

## Price precision

V5 price-like values are scaled by `1e22`:

* `getEffectivePrice(poolId)`
* `floorPrice`
* `allTimeHighPrice`
* `newPrice` emitted by V5 buy/sell events

To show BNB per token:

```ts theme={null}
const priceBnb = Number(priceScaled) / 1e22;
```

Do not treat V5 price values as `1e18` prices, or your integration will show values 10,000x too high.

## Contracts

| Contract   | Address                                      |
| ---------- | -------------------------------------------- |
| Factory    | `0x429a7ef0129649a97bb3f1e961dd56d9bd4ac01f` |
| Hook       | `0xc18e6e1926113cdcf53f3ec1a89d3eb84cc6a888` |
| SwapRouter | `0x4018abd5d24ee48c642e7e518a8aef03b59ec150` |
| OTOInvite  | `0x162e11887f6788ac9625a980e68044bee7f9d746` |
| Treasury   | `0xdb5b8aa5cecf7a6fe1812fb2ccc37723076b19d9` |
