Transaction Simulation

How Morsel simulates transactions before you sign them and what the simulation screen shows.

Before you sign any transaction, Morsel runs a simulation on the blockchain to preview exactly what will happen if you approve. This protects you from unexpected outcomes and helps catch malicious transactions.

What the Simulation Shows

The simulation screen appears in the transaction approval popup. It shows:

  • Token changes — which tokens will leave and arrive in your wallet, with amounts
  • SOL / COOK balance change after the transaction
  • Network fee estimate
  • Which programs (smart contracts) will be called
  • Any unusual or high-risk instructions (flagged in red)

When Simulation Fails

If the simulation fails before you send, Morsel shows a warning. Common reasons:

  • Insufficient balance — you do not have enough tokens or gas to complete the transaction
  • Slippage exceeded — a swap's price moved past your tolerance before simulation
  • Invalid account state — the program being called is not in the expected state
If simulation fails, Morsel will warn you but still allow you to proceed. Only proceed if you understand why the simulation failed and are confident it will succeed on-chain.

Simulation Warnings

Morsel flags certain patterns as high-risk even when simulation succeeds:

WarningMeaning
All tokens drainingThe transaction moves all tokens out of your wallet — typical of a wallet drainer
Unknown programA smart contract not in the verified program list is being called
Set delegate / revokeA token account authority is being changed — unusual for normal transfers
Close accountA token account is being closed and rent reclaimed

How Simulation Works

Simulation sends the unsigned transaction to the RPC node for a dry run. The node executes it without writing to the blockchain and returns the resulting state changes. This happens before you sign, so it costs nothing.

Simulation adds a small delay (usually <200ms) to the transaction approval flow. This is intentional — it is the safest thing Morsel can do before asking for your signature.