Skip to the article
Blocktide

Crypto markets, chains and policy

Self-Custody Wallets: What You Sign Before a DeFi Swap

A self custody wallet signs DeFi trades with your private key; funds stay at your address, while token approvals and network gas shape each swap.

By The Blocktide Editors5 min read

Self-Custody Wallets: What You Sign Before a DeFi Swap

Exchange account users moving to DeFi keep control of their funds with a self-custody wallet: the wallet signs transactions with a private key on their device, and the blockchain moves funds only when it accepts a valid signature.

That changes the custody arrangement. On an exchange, the company controls the wallets that hold customer funds and processes trades on its own system. With self-custody, tokens remain at your on-chain address; an app can request permission to interact with them, but the wallet must authorize each transaction or eligible message.

SyncSwap is a decentralized exchange used to trade tokens and access liquidity pools on supported networks. Understanding syncswap pools can help you see where a token swap draws its liquidity; SyncSwap itself still needs your wallet to authorize the actions that move your tokens.

What does a self-custody wallet control?

A self-custody wallet controls the private key that can authorize transactions from your address. MetaMask can derive that key from a 12-word BIP-39 recovery phrase. The phrase is a backup for regenerating the key, so anyone who gets it can control the funds associated with it.

The wallet does not store your tokens like cash in a physical purse. Token balances are recorded on the blockchain against your address. Your wallet holds or accesses the key used to sign a transaction, and the network checks that signature before carrying out the requested action.

When you connect MetaMask to SyncSwap, the connection shares your address with the app. That lets the app show relevant balances and prepare an action. Connecting alone does not transfer tokens or give the app permission to spend them.

What happens between clicking swap and receiving tokens?

A swap starts when you choose the tokens and amount, then click the swap button. The app builds a transaction describing the trade. Your wallet displays the request so you can review it, then uses your private key locally to sign if you approve. An RPC endpoint broadcasts the signed transaction to the network, where the blockchain checks it and processes the trade.

Take a first swap of USDC for ETH on SyncSwap using zkSync Era. First, the app asks the wallet for an ERC-20 approve transaction. That approval lets the exchange contract move up to the permitted amount of USDC from your address. The approval is a separate on-chain action, so you review and sign it, and the network processes it before the contract can use the USDC.

Next, you sign the swap transaction. The contract uses the approved USDC for the trade, and the resulting ETH is sent to your address. On zkSync Era, you pay gas in the network’s native token, ETH. The wallet shows the transaction and its gas estimate before broadcasting, so you need ETH available for that cost as well as the swap.

Some tokens and apps support a gasless signature such as an EIP-2612 permit. Instead of submitting a separate on-chain approval transaction, you sign a message that grants token spending permission; the app can include that authorization when it submits a later transaction. “Gasless” means that permit itself does not require an on-chain transaction, not that the eventual swap necessarily has no gas cost. Read message prompts as carefully as transaction prompts: a message can authorize spending even when no gas is shown. Reject prompts you did not start or do not understand.

What are the trade-offs after a swap?

Self-custody gives you direct control through your key, but it also puts the recovery phrase and transaction decisions in your hands. A mistaken or unwanted signed transaction can be processed by the blockchain; a support desk cannot reverse it. If you lose the recovery phrase and lose access to the wallet, a support desk cannot restore the phrase for you.

An approval can remain in place after a trade, allowing the approved contract to move tokens up to its allowance. To reduce that permission, use a wallet or a trusted on-chain allowance tool to revoke or lower the token approval. Revoking is itself an on-chain transaction, so review and sign it and have the network’s gas token available.

A hardware wallet is also self-custody when it keeps the private key on the device and signs transactions there. It changes where signing happens, but you still need to protect the recovery phrase and check what you authorize on the device.

Related

What happens if I lose my recovery phrase?

The phrase can regenerate the private key, so losing it may mean losing access if you have no working wallet or other backup. Anyone who obtains the phrase can control the funds. Keep it private and stored somewhere you can recover it without exposing it online.

How do I revoke a token approval?

Find the token allowance for the relevant address and contract in your wallet or a trusted allowance tool, then submit a revoke or lower-allowance transaction. The change takes effect when the network processes it, and it costs gas.

Is a hardware wallet self-custody?

Yes, when you control the recovery phrase and the device keeps and uses the private key to sign. The device helps protect the key; it does not decide whether a transaction is safe.

  • Back up your recovery phrase privately and securely.
  • Connect your wallet and confirm the address before trading.
  • Read each approval, message and swap prompt before signing.
  • Keep ETH on zkSync Era for gas, then review and revoke allowances you no longer need.