> For the complete documentation index, see [llms.txt](https://hello-fun-1.gitbook.io/hello.fun-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hello-fun-1.gitbook.io/hello.fun-docs/security/graduation-protections.md).

# Graduation Protections

Graduation is the transition that moves a Hello.Fun launch from its bonding curve into a Uniswap v4 market.

Because this process moves launch reserves and establishes permanent liquidity, Hello.Fun includes specific protections around how graduation is executed and completed.

### The Graduation Process

Graduation takes place after a launch reaches its configured graduation conditions.

The transition has two primary stages:

1. Sweep the launch reserves
2. Seed the Uniswap v4 pool

```mermaid
flowchart LR
    A["Graduation Ready"] --> B["Sweep Reserves"]
    B --> C["Seed Pool"]
    C --> D["Uniswap v4 Market"]
    D --> E["Permanent Liquidity"]
```

Separating these stages allows the protocol to track the progress of the graduation process onchain.

### Automatic Graduation

When a launch reaches the required state, the completing buy can attempt to trigger graduation automatically.

```mermaid
flowchart LR
    A["Bonding Curve"] --> B["Graduation Conditions Reached"]
    B --> C["Automatic Graduation Attempt"]
    C --> D["Uniswap v4 Market"]
```

This connects the end of the bonding curve directly with the transition into the graduated market.

### Permissionless Completion

Graduation does not depend exclusively on Hello.Fun completing the process.

If automatic graduation does not complete successfully, the protocol allows another user to trigger graduation completion.

```mermaid
flowchart TD
    A["Graduation Ready"] --> B["Automatic Attempt"]
    B --> C{"Completed?"}
    C -->|"Yes"| D["Graduated Market"]
    C -->|"No"| E["Permissionless Completion"]
    E --> D
```

This reduces dependence on a single operator for completing a launch that is already ready to graduate.

### Controlled Pool Creation

Hello.Fun uses its graduation infrastructure to create the Uniswap v4 pool.

The LaunchFeeHook uses its Before Initialize permission to restrict initialization of Hello.Fun launch pools to the expected pool creation path.

```mermaid
flowchart LR
    A["GraduationManager"] --> B["UniswapV4Adapter"]
    B --> C["Authorized Pool Initialization"]
    C --> D["Uniswap v4 Pool"]
```

This helps ensure that the graduated pool is initialized through the intended Hello.Fun process.

### Continuity From Curve to Pool

Graduation uses the state produced by the bonding curve to establish the graduated market.

The selected pairing asset remains the same.

```mermaid
flowchart LR
    A["Bonding Curve Market"] --> B["Final Curve State"]
    B --> C["Graduation"]
    C --> D["Uniswap v4 Market"]
```

The transition therefore moves the launch into its next market stage rather than replacing it with an unrelated pair.

### Full Range Liquidity

The graduation process creates a full range Uniswap v4 liquidity position.

```mermaid
flowchart LR
    A["Graduated Assets"] --> B["Uniswap v4 Pool"]
    B --> C["Full Range Position"]
    C --> D["LiquidityLockerV4"]
```

The resulting position is transferred to the permanent liquidity locker.

### Permanent Liquidity After Graduation

Once the graduated liquidity position is transferred to LiquidityLockerV4, the locker does not provide functions to:

1. Withdraw the position
2. Unlock the position
3. Transfer the position
4. Decrease the locked liquidity
5. Remove the liquidity principal

The creator does not receive the liquidity position.

The Hello.Fun administrator does not receive a general withdrawal path for it.

### Residual Supply Protection

Graduation may leave token supply that cannot enter the pool without changing the intended opening market state.

That supply is moved into the ResidualVault.

```mermaid
flowchart TD
    A["Token Supply at Graduation"] --> B["Pool Supply"]
    A --> C["Residual Supply"]
    B --> D["Uniswap v4 Liquidity"]
    C --> E["ResidualVault"]
```

The ResidualVault does not provide a withdrawal function.

Residual tokens are therefore not redirected to the creator or administrator after graduation.

### Handling a Pool Seeding Failure

The graduation architecture includes a recovery path for a specific failure scenario.

This applies when:

1. The launch reserves have already been swept
2. Pool seeding has failed
3. The failure has been recorded onchain
4. The required delay has elapsed

```mermaid
flowchart TD
    A["Reserves Swept"] --> B["Pool Seeding Attempt"]
    B --> C{"Successful?"}
    C -->|"Yes"| D["Uniswap v4 Market"]
    C -->|"No"| E["Failure Recorded"]
    E --> F["Required Delay"]
    F --> G["Recovery Available"]
```

The recovery path is not a general administrative withdrawal function.

### Recovery Funds Go to the Creator

If the restricted recovery path is used after the required conditions are satisfied, the recovered funds are sent to the creator.

They are not sent to the Factory Admin.

```mermaid
flowchart LR
    A["Eligible Recovery"] --> B["Recovery Execution"]
    B --> C["Creator"]
```

This recovery path applies to the specific swept graduation failure state.

It does not provide access to successfully graduated and permanently locked liquidity.

### Recovery Does Not Unlock Graduated Liquidity

The graduation recovery mechanism and the liquidity locker are separate.

```mermaid
flowchart TD
    A["Graduation"] --> B{"Pool Seeded?"}
    B -->|"Yes"| C["LiquidityLockerV4"]
    C --> D["Permanent Liquidity"]

    B -->|"Failed After Sweep"| E["Restricted Recovery Path"]
    E --> F["Creator"]
```

Once liquidity has been successfully established and transferred into LiquidityLockerV4, the recovery path does not provide a way to withdraw it.

### Graduation State Is Onchain

Graduation progress is determined by smart contract state.

The backend does not mark a token as graduated simply by changing an offchain database record.

```mermaid
flowchart LR
    A["Onchain Graduation State"] --> B["Blockchain Events"]
    B --> C["Hello.Fun Indexer"]
    C --> D["Interface"]
```

Hello.Fun indexes the resulting state so that it can be displayed through the platform.

### Graduation Protection Summary

| Protection                                         | Status |
| -------------------------------------------------- | ------ |
| Graduation state tracked onchain                   | Yes    |
| Automatic graduation attempt                       | Yes    |
| Permissionless completion                          | Yes    |
| Controlled pool initialization                     | Yes    |
| Same pair continues after graduation               | Yes    |
| Full range liquidity position                      | Yes    |
| Permanent liquidity locking                        | Yes    |
| Residual supply vault                              | Yes    |
| Residual vault withdrawal function                 | No     |
| Restricted failed graduation recovery              | Yes    |
| Recovery delay                                     | Yes    |
| Recovery funds sent to creator                     | Yes    |
| Recovery can unlock successful graduated liquidity | No     |

### Protecting the Transition

Graduation is the bridge between the Hello.Fun bonding curve and the open Uniswap v4 market.

```mermaid
flowchart LR
    A["Bonding Curve"] --> B["Graduation"]
    B --> C["Protected Transition"]
    C --> D["Uniswap v4"]
    D --> E["Permanent Liquidity"]
```

The process is designed so that graduation can be completed without depending on a single operator, while successfully graduated liquidity moves into permanent contract based custody.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hello-fun-1.gitbook.io/hello.fun-docs/security/graduation-protections.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
