> For the complete documentation index, see [llms.txt](https://docs.hoodfun.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hoodfun.xyz/integrations.md).

# Integrations

This is a high-level guide for integrating with the hood.fun meme launcher — UIs, bots, aggregators, and other contracts.

* Contracts: this repository, `src/meme/`
* Entry point for trading: `MemeZap` (`src/meme/MemeZap.sol`)
* Launch + registry: `MemeFactory` (`src/meme/MemeFactory.sol`)
* Per-token state: `BondingCurve` (`src/meme/BondingCurve.sol`)

{% hint style="info" %}
Addresses aren't published here — this launcher isn't deployed to mainnet yet.
{% endhint %}

## Overview

Every token's bonding curve holds a leveraged token (LT) as its reserve asset. Trades settle in USDC or the chain's native token — integrators never need to hold or interact with the LT directly if they route through `MemeZap`.

## Trade functions

`MemeZap` is the recommended integration surface — it handles the bonding-curve-vs-graduated-pool routing for you, so the same call works whether a token is still on the curve or already trading on its Uniswap V2 pool.

**Buy**

```solidity
function buyWithUSDC(address curve, uint256 usdcIn, uint256 minMemeOut) external returns (uint256 memeOut);
function buyWithETH(address curve, uint256 minMemeOut) external payable returns (uint256 memeOut);
```

Approve USDC to `MemeZap` first for `buyWithUSDC`; `buyWithETH` just needs `msg.value`. `curve` is the token's `BondingCurve` address (from `MemeFactory.memeToCurve(token)`), not the token address itself.

**Sell**

```solidity
function sellForUSDC(address curve, uint256 memeIn, uint256 minUsdcOut) external returns (uint256 usdcOut);
function sellForETH(address curve, uint256 memeIn, uint256 minEthOut) external returns (uint256 nativeOut);
```

Approve the token to `MemeZap` first.

`MemeZap` also handles dust refunds automatically for every call above.

## Trading directly against the curve

Integrators who don't need ETH support or graduation-aware routing can call the curve's own `buy`/`sell` directly (USDC only).

## Lifecycle

Every token has exactly two states, moving forward only:

```
Bonding → Graduated
```

Read it off the curve directly:

```solidity
bondingCurve.graduated();  // false = still bonding, true = graduated
bondingCurve.pair();       // zero address until graduated, then the V2 pool
```

Unlike some launchers, there's no separate "graduating" frozen window — `graduate()` is a single transaction. The moment it succeeds, `graduated` flips to `true` and the curve's `buy`/`sell` start reverting; trading moves to the V2 pool immediately, in the same block.

## Minimum amounts

There's no contract-enforced dollar floor — `buy`/`sell` only reject a literal zero amount. Integrators should still apply their own sane UI minimum, since very small trades can round to a zero-output revert.

## Fees

A trade fee (1% by default, per-launch configurable up to 10%) is taken on every buy and sell, in LT terms, and forwarded to the protocol's `FeeVault`. There's currently no creator-fee split. See [Fees](/fees.md) for the full breakdown, including LT-level and post-graduation pool fees.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hoodfun.xyz/integrations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
