I have noticed that when removing liquidity from a few DEX platforms, I will need to sign a message before I can go on with sending the actual transaction to remove my liquidity. They will usually prompt my Metamask to sign a message first before I can proceed to click the "Remove" button which prompts my Metamask again a second time to send the actual transaction.

However, I don't understand what is the point of signing a message before the transaction to remove liquidity. The questions on my mind are:

  1. Since the signing doesn't require any gas fees, I presume it doesn't send anything to the blockchain. Then what's the purpose?
  2. What am I really signing in that message and what does the platform want to verify through this step?
  3. What is the purpose of signing a message before performing a transaction which would also require me to sign the transaction anyway through my wallet?
  4. Why couldn't the platforms just directly prompt me to send the remove liquidity transaction to their contract and perform the operation without signing a message?
  • Often signed messages are used as an authentication mechanism, so that the interface knows that you actually have access to the address that is provided. To provide more details you would have to share an example DEX where you see this behaviour.
    – Richard
    Dec 27, 2021 at 11:19
  • @Richard The most recent DEX I was using that I notice this is VVS but I remember they aren't the only one doing that. Since sending the actual transaction would require me to sign the transaction anyway, what is the purpose of authenticating me? Wouldn't the transaction be enough to be certain that I'm the one sending it?
    – xenon
    Dec 27, 2021 at 11:22
  • @xenon Without the contract's code we can only speculate. Some contracts for example needs two transactions approve+transferFrom. In that context an extra signature might allow a single transaction, see EIP-2612 for an example.
    – Ismael
    Dec 30, 2021 at 4:53
  • You need to provide an actual example.I could speculate several possible reason, but without knowing the exac DEX(s) you have in mind, it's impossible to answer.
    – Kyle Baker
    Mar 13, 2022 at 0:15

1 Answer 1


Uniswap uses a Permit2 approach that allows users to sign an offchain msg, signalling their intent to allow the protocol to spend the tokens

As long as users have given the Permit2 contract allowance prior, all subsequent interactions do not require another onchain approval

Read more here https://github.com/dragonfly-xyz/useful-solidity-patterns/tree/main/patterns/permit2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.