pango

Solana / two instructions

Sign it with a promise.

Pango puts one instruction before your transaction and one after. The last one checks what you must own when it ends. If the promise breaks, Solana refuses the whole transaction, as if you had never sent it. No scanner, no guess: the outcome is part of what you sign.

Begin + Endno admin, no feefunds stay in your walletchecked on the real runtime
0traps refused
Throw a trap at it

Side by side

The same transaction, twice.

Left: a plain transaction. Right: the same one with a promise. Both run the rules of the real program.

The gap

What it says. What it does.

A wallet shows you what a transaction says it will do. The chain only cares what it did. Everything you lose in a single click lives in that gap.

0.05SOL, said the site

The claim that costs ten times more

"Pay 0.05, receive 2,000." It takes 3 and sends nothing.

1

The buy that pays someone else

The SOL leaves. The tokens go to a stranger. The screen said "success".

0balance moved

The signature that changes the owner

"Verify your wallet" changes who controls your token account. No balance moves, so a preview shows nothing.

The idea

Check the end, not the promise on screen.

Begin takes a snapshot of the accounts you care about. The app's instructions run. End reads the same accounts again and compares them with what you said you would accept.

  1. You create your guard account once.
  2. Your wallet signs [Begin, app instructions, End] as one transaction.
  3. One check fails, the whole transaction is undone.

How it works

your transaction 1 Begin 2 swap() 3 End the promisechecked by Endthe last instruction KEPTthe state is saved BROKENall of it undone

The lab

Try to get past it.

Pick a trap, make the site behave badly or honestly, edit the promise, turn the guard off. Every verdict comes from the same rules as the program, checked against the real one.

Even when you forget

Four rules you do not have to write.

What you did not name cannot go down

SOL and every token account on your watch list must end at least where they started, unless a check says otherwise. A forgotten account cannot be swept in silence.

Delegates need a cap

A new delegate on a token account is refused unless a check says how much it can spend. "Approve 100" can pass. "Approve everything" does not.

No new owner, ever

Changing the owner or the close authority of a watched token account is refused. No check can allow it. This is the trap that moves no balance.

Nothing slips in after

End must be the last instruction and must find its own Begin in the same transaction. No admin, no fee, no upgrade once the authority is revoked.

Proof, not promises

Run on the real runtime.

Nothing is deployed on mainnet. The program runs on a local network with the real Solana runtime and the real SPL Token program: honest transactions, then the traps, each as a real transaction. Then random transactions are run and the JavaScript engine must agree with the program on every verdict.

14
on-chain scenarios
1,360
random transactions, JS vs program
8
kinds of trap refused

How it is checked

$ node --test tests-chain/guard.test.mjs real Solana runtime (local network), real SPL Token program program AWLr...RG1Q 31,624 bytes NOMINAL swap with a declared floor, tokens received ok claim paid as announced ok receiving, revoking, moving between your own accounts ok TRAPS, refused by the runtime SOL drain, nothing declared WatchFailed promise too small CheckFailed tokens sent to a stranger WatchFailed SetAuthority: new owner of your token account AuthorityChanged Approve left open DelegateNotDeclared close authority set CloseAuthority System Assign on your wallet ProgramChanged token account closed AccountClosed instruction appended after End NotLast every refused transaction leaves every account untouched

Versus the usual ways

Why not a warning screen?

Warning screens and simulationsSlippage settingPango
Methodpredicts, then hopesone number on one swapchecks the final state
Tokens sent to another walletoften missednot coveredrefused
Hidden delegateshown, easy to skipnot coveredrefused unless capped
Owner of your token account changedinvisible: no balance movesnot coveredrefused
Can a site still fool it?yes, it is a predictionyesnot past your numbers
Where your funds arein your walletin your walletin your wallet

One minute

See it first.

The idea, the traps, and Solana saying no.

Read this part

What it is not.

Not audited, not deployed by us yet. The program is written, tested on the real runtime and compared with a JavaScript engine on random transactions. Start small.

Only as strong as your promise. Pango enforces the numbers you write and guards the accounts you put on the list (ten at most). It does not guess what a good number is.

Not a hiding place. It does not hide your transaction or reorder anyone. It caps the damage.

All limits and risks