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

# Platform fees & referrals

## Platform fees & referrals

Every launch through Zardoz — **Instant and external pads** — pays a **0.002 ETH** platform fee via the on-chain **LaunchFeeRouter**.

***

### LaunchFeeRouter

| Item           | Value                                                                                                                                    |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet        | [`0xB36Bd2A864cB5AD202c2b66Ba20C4e2da9484151`](https://robinhoodchain.blockscout.com/address/0xB36Bd2A864cB5AD202c2b66Ba20C4e2da9484151) |
| Default fee    | **0.002 ETH** (`launchFee()` view)                                                                                                       |
| Ref share      | **50%** of fee → **0.001 ETH** to valid referrer                                                                                         |
| Platform share | **50%** → **0.001 ETH**                                                                                                                  |

Fee is **only kept if the wrapped launch succeeds**. Reverted launches refund the fee portion.

Env: `NEXT_PUBLIC_LAUNCH_FEE_ROUTER`

***

### How wrapping works

```solidity
function execute(
    address target,
    bytes data,
    uint256 launchValue,
    address referrer
) payable returns (bytes memory);
```

| Param         | Meaning                                  |
| ------------- | ---------------------------------------- |
| `target`      | Factory or portal contract               |
| `data`        | Encoded create/deploy calldata           |
| `launchValue` | ETH forwarded to pad (initial buy, etc.) |
| `referrer`    | Ref wallet or `address(0)`               |

`msg.value` must cover `launchValue + launchFee()`.

#### Klik fee-only path

```typescript
// lib/launch-fee.ts — wrapPayFeeOnlyCall()
// Separate tx before direct deployCoin preserves msg.sender for vanity
```

***

### Referral links

Any Zardoz URL with `?ref=0xReferrer`:

```
https://zardoz.fun/launch?ref=0xAbc…
https://zardoz.fun/?ref=0xAbc…
```

Ref address stored in session / launch tx `referrer` field.

#### Ref API

```
GET  /api/refs?wallet=0x…     — ref stats for wallet
POST /api/refs              — bind ref code (session)
```

***

### Claiming ref earnings

```typescript
const owed = await publicClient.readContract({
  address: "0xB36Bd2A864cB5AD202c2b66Ba20C4e2da9484151",
  abi: launchFeeRouterAbi,
  functionName: "claimable",
  args: [referrerAddress],
});

await walletClient.writeContract({
  address: LAUNCH_FEE_ROUTER,
  abi: launchFeeRouterAbi,
  functionName: "claim",
});
```

***

### LaunchPaid event

```solidity
event LaunchPaid(
    address indexed launcher,
    address indexed referrer,
    address indexed target,
    address deployed,
    uint256 fee,
    uint256 platformShare,
    uint256 refShare
);
```

Index for analytics dashboards and ref accounting.

***

### Fee record (server)

After launch, client may POST fee attribution:

```
POST /api/launches/fee-record
```

Requires session — records launch tx hash + ref for product analytics (not required for on-chain ref payout).

***

### Allowlisted targets

Router rejects unknown targets. Allowlist maintained via `scripts/allowlist-fee-router.ts`:

* Zardoz Instant factory
* Klik factory
* NOXA, Flap, Bankr, trench, Bags factories/portals

Next: Launching · External pads


---

# 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://zardoz.gitbook.io/zardoz-docs-1/platform-fees-and-referrals.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.
