# Pons v2 execution

Pons actions use the current documented v2 factory on Robinhood Chain **4663**. Wallet keys remain with the agent. API preparations return simulated unsigned serialized EVM transactions; `tx inspect`, `wallet sign` and `tx submit` handle local execution.

This covers active native-ETH and approved ERC-20 paired curves, factory launches, exact curve approvals and the current fee escrow. It does not route graduated tokens through Uniswap v4, operate legacy factories, sweep uncredited trading fees or release locked buyback vesting. The [official v2 reference](https://docs.ponsfamily.com/v2) publishes the deployed addresses, ABIs and curve arithmetic.

| Action | Input and result |
| --- | --- |
| `discovery` | Optional `fromBlock` or returned `cursor`, `blockRange` 1–2000, `confirmations` 1–100. Up to 200 factory events, otherwise reduce the range. |
| `quote` | `wallet`, `token`, `side` (`buy`/`sell`), raw `amount`, `slippageBps` 1–500. Exact integer output, minimum, tax and refund estimates. |
| `build_buy` / `build_sell` | Wallet, token, raw amount, slippage, explicit `minOutputAmount`, `maxTradeFeeBps`, optional `maxSnipeTaxBps` (default zero), and `maxFeeWei`. |
| `prepare_approval` | Wallet, token, side, exact raw amount, `mode` (`set` or `reset`) and network fee ceiling. Spender is derived from the factory, never supplied by the caller. |
| `claimable` | Wallet and optional `asset` address; zero address means ETH. Returns one credited escrow ledger balance. |
| `build_claim` | Wallet, asset, positive `minClaimAmount` and network fee ceiling. Claims the complete ledger balance to that wallet. |
| `prepare_launch` | Existing launch metadata, configuration, pair asset, creator terms and salt; now also requires `maxFeeWei`. Returns fully estimated serialized bytes after simulation. |

## Quotes and minimums

Buy amounts are raw quote-asset units. Sell amounts are raw launch-token units. Never assume every quote asset has 18 decimals. The quote response identifies both assets; the zero address represents native ETH.

The builder fetches a new quote. `minOutputAmount` must be at least that fresh quote's `otherAmountThreshold` and no greater than its `outAmount`. Approve a minimum only when it satisfies the agent's own spending policy. A moving market can require another quote rather than relaxing a limit.

Curve fee and creator tax are applied in the documented integer order. Buys also use the token recipient's current opening tax; this API always makes the wallet the recipient. `maxTradeFeeBps` covers curve fee plus creator tax, while `maxSnipeTaxBps` controls opening tax. These individual tax ceilings are checked during preparation. The contract encodes input and minimum output, not separate tax ceilings.

**A Pons buy can partially fill near graduation.** The on-chain minimum protects the output rate, not an absolute token quantity. The builder rejects an already-clamped quote or pending simulation below the requested absolute minimum, but later reserve changes can still produce a proportional fill and refund. Inspect actual `CurveBuy` and refund events after confirmation. Sells enforce exact token input and minimum quote output. Ready-to-graduate, graduated, swept and rescued curves are rejected.

```sh
block-cli call pons quote --params \
  '{"wallet":"<EVM_ADDRESS>","token":"<PONS_TOKEN>","side":"buy","amount":"1000000000000","slippageBps":100}'

# Fill these reviewed limits from the fresh quote and the agent's spending policy.
block-cli call pons build_buy --params \
  '{"wallet":"<EVM_ADDRESS>","token":"<PONS_TOKEN>","amount":"1000000000000","slippageBps":100,"minOutputAmount":"<APPROVED_MINIMUM>","maxTradeFeeBps":300,"maxSnipeTaxBps":0,"maxFeeWei":"1000000000000000"}' \
  > pons-buy.json
```

Use `build_sell` for a sale, with the raw launch-token input. The example limits are illustrative, not automatically approved budgets.

## Separate token approvals

Native ETH buys need no approval. A sale or custom-pair buy must already have sufficient input-token allowance to the factory-resolved curve. If it does not, prepare an exact allowance separately:

```sh
block-cli call pons prepare_approval --params \
  '{"wallet":"<EVM_ADDRESS>","token":"<PONS_TOKEN>","side":"sell","amount":"<EXACT_TOKEN_INPUT>","mode":"set","maxFeeWei":"1000000000000000"}' \
  > pons-approval.json
```

An existing nonzero allowance that differs from the new amount requires a separately reviewed `mode:"reset"` transaction first. Confirm the reset, prepare and confirm the new allowance, then prepare the trade again. No transaction batch, assumed future allowance, automatic retry or automatic signing is hidden in this flow. Approvals can outlive the intended trade; the agent can explicitly reset them.

## Inspect, sign and submit locally

```sh
block-cli tx inspect --chain robinhood --file pons-buy.json --out pons-review.json

block-cli wallet sign --file agent-wallet.json --review pons-review.json \
  --approve <REVIEW_APPROVAL_DIGEST> --max-fee 1000000000000000 \
  --out pons-signed.json

block-cli tx submit --file pons-signed.json
```

The generic EVM reviewer preserves exact chain, sender and transaction bytes, then rechecks nonce, balance, code, gas and simulation. It explicitly reports `protocolSemanticsVerified:false`: review full Pons calldata and prepared limits before approving. The hosted API never signs, reserves a nonce or broadcasts.

Each preparation uses a 20% gas buffer and EIP-1559 fees with zero priority tip and a per-gas ceiling twice the observed gas price, enforcing `gasLimit × maxFeePerGas <= maxFeeWei`. The ceiling tolerates changing base fees without automatically increasing validator tips. Its nonce and fee quote can still become stale. Pending reads are not atomic and simulation does not guarantee execution. These calls contain no automatic on-chain expiry.

## Claims and discovery

Claims read only credited balances at the current v2 escrow. Uncollected curve/pool fees and locked buyback tokens are excluded. The contract claims the complete wallet ledger balance; `minClaimAmount` is a preparation-time check and is not enforced by a calldata minimum.

Discovery returns canonical factory events within a bounded block range. Preserve `nextCursor`; the next call checks the preceding boundary block hash and rejects a reorg instead of silently skipping it. Rewind and rescan after `CURSOR_REORG`. The default recent window is not an all-time token index, and confirmations are not a finality guarantee.

## Verification

Focused tests cover integer arithmetic, phase/asset identity, quote bounds, fees, exact approvals, canonical event pagination, reorgs, malformed RPC data and local inspect/sign compatibility. Live read-only evidence is saved separately in `pons-live-v0.12.0.json`. Public deployer addresses are used only as `from` values in unsigned RPC simulations. No private keys for those addresses are held; no live signature or funded broadcast is performed.
