Skip to main content

Onchain / offchain signatures toggle

Choose the way you sign

Updated over 2 weeks ago

The signatures toggle feature

By default, the Morpho app will propose you the most adjusted flow with regard to your wallet account type.

  • Smart wallets: toggle is off, app uses an onchain signature flow (classic approval + classic transaction only).

  • Externally owned account (EOA) wallets: toggle is on, app uses the offchain signature flow when available (permit2,...).

But, if necessary, EOA users can select the signature of their preference by clicking on the address button at the top right of the Morpho app.
(Smart wallet users can not use the toggle and will have onchain signature flow only).

The Basics: Offchain vs Onchain Signatures

When interacting with DeFi protocols like Morpho, users need to approve tokens before they can be used in lending or borrowing operations. There are two main approaches to handle these approvals:

Offchain Signatures (e.g., Permit2)

  • You sign a message off the blockchain (free, no gas cost)

  • Morpho uses Permit2, which allows gasless toke napproval

  • The typical flow: transaction 1 = permit2() and transaction 2 = supply()/borrow()

  • Only one gas payment

Onchain Signatures (classic flow)

  • Transaction 1: approve() - you pay gas to approve the token

  • Transaction 2: supply()/borrow() or other action - you pay gas again for the actual operation

  • More expensive

The key advantage of offchain signatures is gas cost saving thanks to gasless permit.

Why the Difference Between EOA and Smart Wallets?

The ability to use offchain signatures depends entirely on the type of wallet being used:

EOA (Externally Owned Accounts) - MetaMask, Rabby, Rainbow, etc.

  • Possess a private key that can sign messages offchain

  • Compatible with EIP-712 (typed structured data signing)

  • Can use Permit2 and other offchain signature schemes

  • βœ… Can use the optimized flow for lending/borrowing on Morpho

Smart Wallets (Safe, Argent, Coinbase Smart Wallet, etc.)

  • Are smart contracts, not accounts with a private key

  • Cannot sign messages offchain directly

  • To "sign", they must execute an onchain transaction (EIP-1271)

  • ❌ Cannot use Permit2 in a practical way

  • Must use the classic flow: approve() + supply()/borrow()

This fundamental difference in wallet architecture explains why Morpho App needs to detect the wallet type and adapt its flow accordingly. Smart wallets would need to execute an onchain transaction just to create the "signature", which defeats the purpose of the offchain signature optimization.


If any issue or additional question, get in touch opening the chatbox at the bottom right of the help page πŸ‘‰

Did this answer your question?