Visa, a leading global payments company, has implemented experimental smart contracts on Ethereum’s Goerli testnet to trial gasless transactions via account abstraction. The two sets of smart contracts, known as Paymaster, aim to simplify user engagement with the Ethereum network by handling complicated tasks and managing transaction costs for other accounts.
Visa’s Paymaster for Effortless Transactions
Account abstraction is a proposal to enhance flexibility in the management and behavior of Ethereum accounts by separating the control of an account from its associated private key, allowing it to be controlled by a smart contract. This mechanism is enabled by ERC-4337, a new Ethereum standard launched in March.
Visa intends to use the ERC-4337 standard to build an intermediary currency conversion service. The first version of the Paymaster contract aims to find out whether users can pay transaction fees with alternative tokens such as dollar-pegged stablecoins or central bank digital currencies (CBDCs).
The contract allows users to send any ERC-20 token and convert them into ether (ETH) based on the current exchange rate to pay for gas fees on their behalf, thus eliminating the need to acquire ETH exclusively for transaction fees.
“This sample contract contains the governing logic for both the Paymaster and its custom ERC-20 token. To this contract, we introduced an allowlist and a function to update the token-to-ETH conversion rate. This allowed us to better simulate real-life conditions where the exchange rate between ETH and a token is dynamic,” Visa said in a report.
Enabling Gasless Transactions
Visa believes that the Paymaster concept can contribute to increased adoption by enabling users to fund the gas cost only at the time of the transaction, without having any pre-funding requirements, which improves their cash-flow management.
The second Paymaster contract aims to remove the need for users to cover gas fees by themselves, similar to web2 peer-to-peer (P2P) transactions, by availing a solution provided by account abstraction that enables third parties such as fintech wallet providers to manage the costs.
In this scenario, third-party entities can act as Paymasters and fully sponsor transaction fees for users. The experiments are based on the starter code provided by the Ethereum Foundation and the ERC-4337 core team.
We tested two core user operations: 1) paying with ERC-20 tokens using ERC-4337 Paymaster; 2) Sponsoring transaction fees for users (aka gasless txs) with ERC-4337 Paymaster
— Catherine Gu (@catgu_) May 17, 2023