
We made two UX improvements to make the Wormhole Token Bridge more user-friendly!
First: WETH and bad relayers!
The Wormhole Token Bridge has two functions for redeeming tokens on the destination chain: completeTransferAndUnwrap and completeTransfer.
The former is for native currencies and the latter is for the other ERC20 tokens.
The problem is that the user’s intent is not encoded in the token transfer payload, allowing the relayer to arbitrarily choose which function to call.
And since completeTransferAndUnwrap has a slightly higher gas cost compared to completeTransfer, relayers always call the completeTransfer function, even for native currencies like ETH and BNB to increase their profit margin at the expense of user experience.
As a result, users receive the wrapped version of native currencies (e.g., WETH, WBNB).
For users who have gas at the destination chain, this is a small headache since they have to perform another transaction to unwrap those tokens.
But this is a big problem for users who need gas on the destination chain!
This issue disrupts a key use case of the bridge: onboarding new users to blockchain networks.
Second: Challenge of tracking transactions
Since the completeTransfer function does not emit any events, tracking ‘complete transfer’ transactions on EVM chains is difficult. We encountered this issue while developing Mayan Explorer and shared it with the Wormhole team here.
Work is in progress to add an event to resolve this issue within Wormhole’s codebase, but we didn’t have to wait for it!
Solution (for both issues)
Fortunately, Wormhole’s Payload 3 allows developers to encode additional data in VAAs, enabling custom actions on the destination chain.
The Mayan team leveraged Payload 3 to encode the redeem payload, allowing users to specify whether they want native currency on the destination chain.
We also added a ‘Redeem’ event that signifies a successful call of the redeem function, simplifying cross-chain transaction tracking.