Why aggregator routes destroy objects

Buying through 1inch, CowSwap, ParaSwap, Uniswap v3, Universal Router, or the official Uniswap widget will permanently destroy your objects. Always use peg.fun's swap interface.

This is the most important page in the docs. If you skip everything else, read this.

The short version

If you buy or sell PEG through 1inch, CowSwap, ParaSwap, Matcha, Uniswap v3, the Uniswap widget, or any other aggregator, you receive the ERC-20 balance but zero objects. The art is forfeited at the contract level. There is no off-chain remedy. There is no refund.

Always use the native swap UI on the token's detail page at peg.fun/t/<address>.

Why it happens

peg.fun's object-mint logic fires on the boundary between the Uniswap v4 PoolManager and the PEG token contract. The mint requires two conditions in the same transaction:

  1. The recipient receives PEG directly from the PoolManager (via the v4 hook).
  2. The recipient was "armed" by a prior armForExternalSwap call binding their address to the swap.

peg.fun's native swap UI calls armForExternalSwap before routing through the v4 PoolManager, the binding is set and the mint fires.

Aggregators do not. When you swap through 1inch, the PEG arrives at the aggregator's address first, then gets transferred to your wallet via a second ERC-20 transfer. The token contract sees from == aggregator_contract, not from == PoolManager, so the mint guard does not fire.

You walk away with ERC-20 balance and no objects. Worse, the PEG you hold is then permanently unmintable, even if you transfer it to another wallet later, the mint signal is single-shot per swap and the moment has passed.

Enforced at the contract level

The object-mint guard lives inside PegToken.sol. It checks the from address of every incoming transfer and only fires the mint when from == pool. This check cannot be bypassed, patched, or worked around, the contract is renounced after graduation. No party, including peg.fun itself, can mint objects retroactively for a buyer who routed through an aggregator.

What to do instead

Use peg.fun's native swap interface, the Buy / Sell form embedded on every token detail page. The form calls DirectSwap, peg.fun's own router, which is the only routing path that satisfies the contract guard.

DirectSwap is:

  • A peg.fun-deployed router contract.
  • Permissionless, anyone can call it.
  • Calls armForExternalSwap then routes through Uniswap v4's PoolManager.
  • Verifies the mint fired in the same transaction.

There is no setup, no allowlist, no special wallet required. If you swap from peg.fun/t/<address>, you are using DirectSwap by default.

Why peg.fun ships its own router

Aggregators are outside peg.fun's control. The mint binding is enforced at the contract level, no aggregator protocol supports the required armForExternalSwap pre-call.

DirectSwap is the only routing path that satisfies the contract guard. It is not a limitation or technical debt; it is a deliberate design boundary that ensures every buy through peg.fun's UI produces the correct object mint.

Can I get a refund?

No. The contract has no refund mechanism for object-less purchases.

If you bought through an aggregator and want to recover your ETH, you can sell the orphan PEG back through peg.fun's swap interface. The sell route also goes through DirectSwap; you'll receive ETH for the PEG balance, but no object burns because no object was minted in the first place.

Identifying an aggregator route

If you are looking at PEG on any of these surfaces:

  • Uniswap's app (app.uniswap.org)
  • 1inch, CowSwap, ParaSwap, Matcha
  • A wallet's built-in swap (some wallets route through aggregators by default)
  • A "DEX aggregator" or "best price finder"

…you are about to lose objects. Cancel and use the swap form on peg.fun/t/<address> instead.

Why this is intentional

The trade-off is routing certainty over routing convenience, peg.fun deliberately controls the buy path so that every object mint, every fee accumulation, and every balance-weight calculation is consistent and predictable. The alternative, supporting aggregator routes, would require either off-chain mint backfilling (which breaks the "everything on-chain" promise) or a contract upgrade path (which breaks the renounced posture).

DirectSwap is the answer. Always swap there.