# How to buy clanked as an agent

clanked is a creators-only token on Base (chain 8453). Its Uniswap v4 pool has a hook that checks, on every swap, that the swapping wallet actually launched a token on Clanker. There is no sign-up and no API key — the contracts are the interface. This is the exact recipe fren (the agent that built Clanked) uses.

## Prerequisites

1. **A proof token.** Your wallet must be the `originalAdmin` of some Clanker token, or its registry-attested launch submitter. That token's address is your proof token — you present it with every swap. If your wallet has never launched on Clanker, it cannot trade clanked. Launch first at https://clanker.world — one launch makes the wallet eligible forever.
2. **Funds.** ~0.001+ ETH on Base for the swap amount plus gas.

## Contracts (Base mainnet, chain 8453)

| Thing | Address |
|---|---|
| clanked token (plain ERC20, 1B supply) | `0xd26e81aC113063E066B98609865a5a3191084458` |
| ClankedRouterV4 — the only swap path | `0xEE800E5fFC47fe37B9dd89015D93C2319c23468f` |
| ClankedHookV4 — gate + fee skim | `0x74399D95FEB4e83499B4df84598c0909E190A8cc` |
| CreatorPolicy — eligibility reads | `0x07D3cA7a04c083A95cc10004F45359466d6DeC20` |
| SeedVaultV4 | `0xFDB4DBbA36c6C862fA58643034bbF076cC6C3bd9` |
| WETH | `0x4200000000000000000000000000000000000006` |
| $CLANKER | `0x1bc0c42215582d5A085795f4baDbaC3ff36d1Bcb` |
| Clanker factory | `0xE85A59c628F7d27878ACeB4bf3b35733630083a9` |
| ClankerBuyback — $CLANKER bucket sweep target | `0x21622E117E5530028B1Eb2E2F1d576aE264F6633` |
| Uniswap v4 PoolManager | `0x498581fF718922c3f8e6A244956aF099B2652b2b` |
| Treasury | `0xf19F11Dee16a341671E6Ed3e209b704C1Bbc3E57` |

**PoolKey** (needed for every swap):

```
currency0   = 0x4200000000000000000000000000000000000006   (WETH)
currency1   = 0xd26e81aC113063E066B98609865a5a3191084458   (clanked)
fee         = 8388608                                       (0x800000, dynamic — hook sets 3%)
tickSpacing = 200
hooks       = 0x74399D95FEB4e83499B4df84598c0909E190A8cc
```

Pool ID: `0x60f4f3a94068d559303fc18f805954d6e2e3fc49ed39ac9385f1480f20ea15ad`

## Call sequence

**0. Self-check eligibility**

```
CreatorPolicy.isEligible(proofToken, yourAddress) -> bool
```

Note the argument order: **proof token first, trader second**. It must return `true`. It checks the live Clanker factory record — the token must be a real Clanker deployment and you must be its `originalAdmin` or its registry-attested launch submitter. If it returns `false` for every token you have, stop: this wallet cannot trade until it launches on Clanker.

**1. Wrap (buys only, if your WETH balance is short)**

```
WETH.deposit()   // payable — send the shortfall as value
```

**2. Approve the input token to the router**

```
WETH.approve(0xEE800E5fFC47fe37B9dd89015D93C2319c23468f, amountIn)      // to buy
clanked.approve(0xEE800E5fFC47fe37B9dd89015D93C2319c23468f, amountIn)   // to sell
```

**3. Swap**

```
ClankedRouterV4.swap(poolKey, zeroForOne, amountIn, proofToken) -> (int256, int256)
```

- `zeroForOne = true` — buy: WETH in, clanked out.
- `zeroForOne = false` — sell: clanked in, WETH out.
- Exact-input only. The router pulls the input straight from your wallet to the PoolManager and takes the output straight back to your wallet — it never custodies funds and holds no balances.
- The returned deltas are the pool's: the negative leg is what you paid, the positive leg is what you received.

## Notes

- The pool charges a **3% fee** per swap. Of the protocol skim (20% of the fee), 50% is collected by the treasury, 25% is set aside to buy $CLANKER, and 25% is retained to go back into the pool as liquidity.
- Liquidity is thin and sits in a narrow band — keep amounts small, expect price impact.
- Uniswap's app and aggregators cannot trade this pool: they can't present a proof token, so the hook reverts their swaps. The router above (or the page at clanked.world) is the only way in. That's the design.
- Holding and transferring clanked is unrestricted — the gate is only on pool swaps.
- If a swap reverts with `NotEligible`, your proof token doesn't prove a launch by your wallet. Re-check step 0.

## Copy-paste prompt

Hand this to an agent verbatim:

```
You are an agent with an EVM wallet on Base (chain 8453) that has launched a token on Clanker. Buy clanked — the creators-only token — for me, following this exact recipe.

Contracts:
- clanked token: 0xd26e81aC113063E066B98609865a5a3191084458
- Router (the only swap path): 0xEE800E5fFC47fe37B9dd89015D93C2319c23468f
- CreatorPolicy (eligibility): 0x07D3cA7a04c083A95cc10004F45359466d6DeC20
- WETH: 0x4200000000000000000000000000000000000006
- PoolKey: currency0 = 0x4200000000000000000000000000000000000006 (WETH), currency1 = 0xd26e81aC113063E066B98609865a5a3191084458 (clanked), fee = 8388608, tickSpacing = 200, hooks = 0x74399D95FEB4e83499B4df84598c0909E190A8cc

Steps:
1. Pick your proof token: the address of a Clanker token your wallet launched (you are its originalAdmin, or its registry-attested launch submitter). Verify eligibility first: call CreatorPolicy.isEligible(proofToken, yourAddress) — note the argument order, proof token first. It must return true. If it returns false for every token you have, stop: this wallet cannot trade clanked until it launches a token on Clanker (https://clanker.world).
2. Make sure you hold enough WETH for the amount I asked for. If not, wrap ETH: call WETH.deposit() with the shortfall as the transaction value.
3. Approve the router to spend your WETH: WETH.approve(0xEE800E5fFC47fe37B9dd89015D93C2319c23468f, amountIn).
4. Buy: call router.swap(poolKey, true, amountIn, proofToken). zeroForOne = true means WETH in, clanked out, delivered straight to your wallet.
To sell instead: approve the clanked token to the router for amountIn, then call router.swap(poolKey, false, amountIn, proofToken) — clanked in, WETH out.

Notes: exact-input swaps only. The pool charges a 3% fee. Liquidity is thin — keep amounts small. Report the transaction hash back to me.
```
