Pactum
Deal rules

What the code does, on paper.

The states a deal moves through, how it is signed, the approval window, what a deal costs, and every attack we planned for, with what stops it.

Pactum is an over-the-counter desk for pump.fun coins. A holder sells a block of tokens straight to a buyer, away from the chart. Every deal settles in one Solana transaction that both sides sign: the tokens go one way and the SOL goes the other, in the same transaction. If any part fails, none of it happens. The desk never holds anyone's tokens, SOL or keys, and there is no desk fee.

These rules are what the code does. Where the code and this page disagree, the code is wrong and gets fixed.

Words

  • Maker: the wallet that posts an offer. A maker can post a sell block (they sell) or a buy request (they buy).
  • Taker: the wallet that fills an offer.
  • Seller and buyer: who sends the tokens and who sends the SOL. The seller can be the maker or the taker, and so can the buyer.
  • Chart price: the price of the coin on its pump.fun bonding curve, or on its PumpSwap pool once it has left the curve, read from the chain.

The states

StateWhat it meansWhat moves
listedThe maker signed the terms as a message. The desk shows the offer.Nothing
requestedA taker signed the transaction the desk built for this offer. The approval window is running.Nothing yet
approvedThe maker signed the same transaction. The desk sent it to the network.Everything, in one transaction
settledThe transaction is confirmed on chain.Done
cancelledThe maker withdrew the offer.Nothing
expiredThe offer passed the end time the maker signed.Nothing

A request that is not approved in time does not end the offer. The request is marked expired, and the offer goes back to listed so another taker can try. A maker can also decline a request, and a taker can withdraw one; the offer goes back to listed in both cases.

Signing

  1. Listing. The maker signs a plain text message with the terms: sell or buy, the mint, the exact amount in raw units, the total price in lamports, the maximum chart move, who may fill it (anyone, or one named wallet), the end time and a random nonce. Signing a message cannot move anything. The desk checks the signature, the amount against the maker's balance, and stores the offer. Anyone can check the signature again in their own browser: the deal page does it.
  2. Request. When a taker wants to fill an offer, the desk builds the settlement transaction, simulates it against the chain, and hands it to the taker. The taker's browser checks it instruction by instruction against the signed terms before the wallet opens. The taker signs. The desk checks that signature and that the transaction is byte for byte the one it built.
  3. Approval. The maker sees the request with the live chart price and signs the same transaction with one click. The desk checks both signatures, checks that not a single byte changed, re-checks the balances and the chart move limit, simulates once more with both signatures, and sends it.
  4. Settlement. The desk follows the transaction until it is confirmed and marks the deal settled, also after a restart. It then reads the transaction back from the chain, checks it, and writes it to the public tape.

The buyer always pays the network fee. A seller does not need any SOL to sell.

The transaction

Every deal is one version 0 transaction with no address lookup tables, two signers (the buyer, who pays the network fee, and the seller) and exactly these instructions, in this order:

  1. Compute budget: set the compute unit limit.
  2. Compute budget: set the priority fee price.
  3. Only when the buyer has no token account for this coin yet: create the buyer's associated token account (the idempotent form), paid by the buyer.
  4. The token transfer: transferChecked from the seller's associated token account to the buyer's, signed by the seller, through the token program that owns the mint (the classic token program or Token-2022). transferChecked makes the token program itself confirm the mint and the decimals.
  5. SOL from the buyer to the seller: the full price.
  6. A memo, pactum:v1:<offer>:<request>, so the deal can be found again on chain.

Anything else in the transaction, any other transfer, any other account, any extra signer, any lookup table, or any amount that is off by one unit, and the browser refuses to open the wallet and the desk refuses to take the signature.

The approval window, and why there is no durable nonce

The desk builds every transaction with a fresh recent blockhash. The network itself refuses that transaction once about 150 blocks have passed, which is roughly one minute. That minute is the approval window: the taker signs first, and the maker has until the blockhash expires to approve.

We chose this over a durable nonce on purpose:

  • No free option. A transaction signed against a durable nonce stays valid until someone advances the nonce. Whoever holds the last signature could wait and only send it if the price moved their way. With a fresh blockhash the chain ends that option within about a minute, whoever holds the bytes.
  • No key on the desk. A durable nonce needs a nonce account and an authority that signs to advance it. If the desk held that authority, the desk would have to keep a private key on a server, and every deal would need the desk's signature. Pactum keeps no key at all.
  • Nothing to clean up. A cancelled durable nonce deal is only safe after an on-chain nonce advance. A cancelled fresh-blockhash deal is safe the moment the blockhash expires, and the chain enforces that, not the desk.
  • A leaked signed transaction is short-lived. If the desk's database ever leaked, every stored partly signed transaction would already be dead.

The cost is that the maker has to be there within the minute. The deal page shows whether the other side is online right now, makers can turn on push alerts for requests on their own offers, and a taker can request again as many times as they like.

The desk also locks the offer while a request is alive, and keeps it locked after a decline or a withdrawal until that request's blockhash has expired, so two transactions for the same offer can never be valid at the same time.

What a deal costs

  • No desk fee. The transaction has no transfer to the desk, and the browser and the desk refuse any transaction that has one.
  • The seller receives the full price, to the lamport, and pays nothing.
  • The buyer pays exactly the price shown, plus the network fee, plus the rent for a new token account when they need one. That rent is the network's, not ours, and the buyer gets it back if they ever close the account.
  • The desk takes nothing from the tokens.
  • The smallest deal is 0.05 SOL, which also keeps an empty seller wallet above the network's rent minimum.

Holders of $PACTUM

Holding at least the holder amount of $PACTUM gives two things, and neither changes the price of a deal:

  • A first look at big offers: an offer of 10 SOL or more is shown only to holders for its first 10 minutes. Others can neither see it on the board nor build a transaction for it in that time.
  • Web push alerts for the coins they follow: new offers, and big deals.
  • Until $PACTUM is live, none of this is switched on and every offer is public from the start.

Attacks, and what stops them

Fake lookalike tokens with the same name

Anyone can make a coin called the same thing as another. Pactum never identifies a coin by its name.

  • Every deal page, coin page and offer form shows the full mint address, and every offer on the board shows the start and end of it, each with a fingerprint drawn from the mint's bytes, so two coins with the same name never look alike.
  • Offers are posted by pasting the mint, never by choosing a name from a list.
  • The desk reads the mint from the chain and shows whether it has a real pump.fun bonding curve at the address the pump.fun program derives for it.
  • When another coin on the desk uses the same name or ticker, every page for both coins says so in plain words.
  • The transaction check in the browser compares the mint in the transaction with the mint in the maker's signed terms, byte for byte.

The price moving between request and approval

  • The maker signs a maximum chart move with the offer, between 1% and 50%.
  • At approval the desk reads the chart price again, live. If the chart has moved against the maker by more than that since the offer was listed, the desk will not take the approval. The maker can cancel and list again at a new price.
  • If the chart price could be read when the offer was listed but cannot be read at approval, the desk does not guess: it asks to try again.
  • The taker sees the live chart price, the discount or premium and the chart impact right before signing, and the taker's signature dies with the blockhash about a minute later.

Replay or a double fill

  • Every offer carries a random nonce in its signed terms, and the desk stores each nonce once. The same signed listing cannot be posted twice.
  • The desk moves an offer from listed to requested in one database step that only one request can win.
  • While a request is alive, no other transaction is built for that offer, and after a decline the offer stays locked until the old blockhash is expired on chain.
  • A transaction can only land once: its signature is its identity on chain.
  • After settlement the offer is closed for good.

A seller who no longer has the tokens

  • The desk checks the seller's token balance at listing, again when it builds the transaction, and again at approval.
  • It simulates the transaction before the taker signs and again before it sends.
  • If the tokens are gone anyway, the transfer fails on chain and so does the whole transaction: the buyer's SOL never moves.

A buyer without SOL

  • The desk checks the buyer's SOL against the price, the rent for a new token account and the network fee when it builds the transaction and again at approval, and refuses with the exact shortfall.
  • The simulation catches anything the balance check misses.
  • On chain, a buyer who cannot pay makes the whole transaction fail: the seller's tokens never move.

Transaction tampering

  • The desk builds the transaction, but the browser does not trust it. Before the wallet opens, the page decodes the transaction and checks every instruction against the terms the maker signed and the wallet that is connected: the program, every account, every amount, the order, the signers, the fee payer, the memo, that the seller's transfer is the only SOL that moves, and that there are no lookup tables. The priority fee is capped at 0.0002 SOL.
  • If anything is off, the page shows what and the wallet never opens.
  • The desk runs the same check again on every signature it receives, and refuses any transaction that differs by a single byte from the one it built.

Wash deals to fake volume

There is no desk fee, so a wash deal costs its wallets only the network fee. Fake volume is cheap, and nothing on the desk treats it as more than it is.

  • A wallet cannot fill its own offer.
  • When two wallets trade the same coin back and forth within seven days, both deals are marked as a round trip on the tape and in both trader records, and they are left out of every volume number.
  • Trader records show how many different wallets someone has dealt with next to their volume, and a record built with one or two wallets looks like it.
  • The desk does not catch everything: a ring of three or more wallets is not marked as a round trip. Volume is the sum of deals that really settled, not proof of demand.
  • Volume gives no perk. Nothing on the desk gets cheaper or moves up the board because of it.

Fake deals on the tape

  • The tape only holds deals the desk sent itself. When a settlement it sent is confirmed, the desk reads the transaction back from the chain and checks the Pactum memo, the exact instructions, the amounts and both wallets against the deal it built. Anything that differs is not written.
  • The desk does not scan the chain for deals. Anyone can put a Pactum memo on a transaction of their own, and it will never reach the tape.
  • Every line on the tape links to its transaction, so anyone can check it on an explorer.

A malicious desk

Assume the desk itself turns bad. What could it do?

  • It cannot move anything: it holds no keys, and every deal needs both wallets' signatures.
  • It cannot change the terms: the maker's signed message is shown with its signature, and the browser checks that signature itself.
  • It cannot slip anything into the transaction: the browser checks every instruction before the wallet opens, and the wallet shows exactly what is signed and simulates what will change in the wallet.
  • It cannot start taking a fee quietly: a transfer to the desk or to anyone else is an extra instruction, and the browser refuses it.
  • The check in the page is code the desk serves, so the wallet's own preview is the last word. Read what it says will change before you sign.
  • The worst it can do is refuse to serve, show stale prices, leave a deal off the tape, or build a transaction that the browser then rejects.

Coins that can hurt a buyer

Token-2022 lets a coin carry extensions. Pactum accepts the ones pump.fun coins use (metadata, metadata pointer, groups) and refuses mints with a transfer fee, a transfer hook, a permanent delegate, frozen-by-default accounts, non-transferable tokens, confidential transfers or any extension it does not know. A coin with a freeze authority is shown with a warning.

Front-running

There is nothing to front-run. The deal never touches a pool or the curve, and the price is fixed in the signed terms.

Spam

Posting an offer costs nothing but a signature, so the limits do the work:

  • The smallest offer is 0.05 SOL, and one wallet can have at most 20 open offers.
  • The maker must really hold what they offer when they post: the tokens for a sell block, the SOL for a buy request. The balance is read from the chain.
  • Every offer has a signed end time, of at most 7 days, and it is gone from the board after that.
  • Offers can be posted and requested only so many times a minute from one address.
  • The board can be filtered by coin, size and discount, and each maker's record is shown on their offers, so a wallet with no deals behind it is easy to see.
  • An offer nobody can fill costs a taker nothing: the balances are checked and the deal is simulated before any wallet opens.

What Pactum does not do

  • It does not hold funds, run an escrow or keep keys.
  • It does not set prices. Makers set their own.
  • It does not tell anyone what to buy or sell. Nothing on the site is advice.
  • It cannot undo a settled deal. Once the transaction is confirmed, it is final.

Use Pactum at your own risk.