Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article explains ERC20Permit, along with the background knowledge required to understand it. If you have found the topic difficult in the past, the following explanations start from the fundamentals.
The article is fairly long because it covers the topic in detail, so set aside enough time to read through it.
The historical code examples and diagrams are preserved, including Japanese comments and labels. The examples reflect the tooling and contract implementations used when the article was originally written.
ERC20

Before learning about ERC20Permit, you need to understand ERC20.
If you are not yet familiar with ERC20, refer to the following articles.
/articles/aeefe2d89dd5332c9f43
Implementing ERC20 deposits and withdrawals from scratch
What is a transaction?

The next prerequisite is understanding transactions. You may already have an intuitive idea of what a transaction is.
The bitbank glossary explains transactions as follows (translated from Japanese).
In cryptocurrency, a transaction is essentially a transfer or trade. It includes information such as the hash of the transaction received from the previous owner and the destination address, and is digitally signed with the owner's private key.
In short, a transaction represents a specific operation or transfer.
A transaction contains data such as a signature created with the sender's private key, the destination address, a reference to the previous transaction hash, and information about the operation.
That is a Bitcoin example. In Ethereum, the data contained in a transaction is different.
An Ethereum transaction includes information such as the gas price, destination address, amount of ETH to send, and a signature from the address issuing the transaction.
Some readers may be encountering this difference between Bitcoin and Ethereum transaction structures for the first time.
UTXO
Bitcoin uses a mechanism called the UTXO (Unspent Transaction Output) model to manage coin balances and transaction history.
A UTXO is an unspent transaction output, recorded on the blockchain as a discrete amount of bitcoin controlled by a particular owner. The output must be consumed as a whole when spent.
Bitcoin balances are therefore not stored directly in an account. Instead, a balance is calculated by collecting the UTXOs associated with the owner from transaction data.
More specifically, transaction data consists of inputs and outputs. The total input amount is allocated among the outputs and any transaction fee. The original example below assumes that the fee is zero.
An unspent transaction output (UTXO) can become an input when its next owner spends it.
Transaction data in Bitcoin blocks repeatedly follows this pattern.
Consider an example.
Suppose Alice owns a total of 30BTC.
As explained above, the funds available for use as inputs are split into multiple outputs rather than being represented by one 30BTC account balance.
Suppose Alice pays Bob 10BTC.
Instead of sending only 10BTC from an account balance, she spends an entire 25BTC output, allocates 10BTC to Bob, and sends the remaining 15BTC back to herself as change, ignoring fees in this example.
In Bitcoin, the funds represented by an input are consumed in full and then allocated to new outputs belonging to the sender or another recipient.
The following diagram illustrates this process.

The inputs are on the left and the outputs on the right.
In this example, the total amounts on both sides are equal.
The same pattern repeats throughout Bitcoin blocks.
This article will not cover the UTXO model in greater depth. Refer to the following resource for more information.
Account state
Ethereum uses the account state model rather than the UTXO model.
Before discussing account state, consider the two account types in Ethereum as described in this historical introduction: externally owned accounts (EOAs) and contract accounts.
EOA
An externally owned account is associated with a wallet and controlled by a private key.
It can originate transactions.
Contract account
A contract account has no private key. It contains executable smart contract code and is controlled by that code.
It can receive ETH but cannot originate a transaction independently.
Returning to account state, Ethereum has a concept of state that changes as transactions are executed.
The state associated with an account is its account state.
Account state has the following four fields.
Data
- nonce: The number of transactions sent by an account. For a contract account, it tracks contract creation activity.
- Balance: The amount of funds held by the address.
- Storage Root: The root hash of the account's storage trie, a Merkle-based structure.
- Code Hash: For an EOA, traditionally the hash of empty code; for a contract account, the hash of its executable code.
For more information about Merkle trees, refer to the following article.
Bitcoin stores the data needed to calculate balances rather than explicit account balances. Ethereum maintains account balances alongside the other state data. The original article describes this as involving more state data than the UTXO approach.
My interpretation is that Ethereum uses this model because applications can be built with smart contracts, and it is useful to access the balance at a particular point in transaction execution.
With UTXOs, an output becomes the input to a subsequent transaction, preventing the same output from being spent more than once. Without replay protection, a balance-based system such as Ethereum could execute the same authorized operation repeatedly.
Ethereum therefore uses a nonce, a value identifying the transaction's position in the account's transaction sequence, to prevent a transaction from being executed multiple times.
For example, once a transaction with nonce 100 has been included, another transaction with the same nonce cannot subsequently be executed. A transaction with nonce 101 can be processed as a separate transaction even if it performs the same operation.
As explained above, Bitcoin consumes the entire input and sends any remaining amount back to the sender as change. Its data structure prevents repeated spending of the same input.
Ethereum manages data through state. If sufficient funds are available, the same operation can be performed more than once when separately authorized, so the nonce prevents replay of the same transaction.
That covers the transaction background. It is a substantial topic in its own right.
What is a meta-transaction?

The next concept is the meta-transaction.
In simple terms, a meta-transaction allows a user to carry out an operation without personally paying the gas fee.
Avoiding the need to pay gas may sound beneficial for everyone, but gas fees do not disappear altogether.
More precisely, a third party pays the gas on the user's behalf, as shown below.

Why would another party agree to pay the fee?
In a blockchain game, for example, requiring users to pay gas can degrade the user experience.
The game operator can pay the gas instead, allowing users to enjoy the game without managing transaction fees.
Consider how this works in a blockchain game.
Steps
- Build a frontend and provide it to users.
- The user signs a message with their own private key. Signing a message does not consume gas, and the signed message and signature data are sent to the operator.
- The operator checks the message's signature and
nonce. If there is no problem, the operator signs a transaction with its own private key and sends it to the contract for execution. - Once the operator confirms that the transaction succeeded, it notifies the user.
The following diagram illustrates these steps.

This allows the user to perform an operation without revealing their private key or personally paying gas.
In a sense, the smart contract performs signature verification similar to the verification carried out for an ordinary transaction by the Ethereum execution layer.
The user signs using the private key associated with their address through ECDSA. The receiving contract uses the signature to recover the signer and verify which user authorized the operation before executing it.
That is the basic mechanism of a meta-transaction.
What is ERC20Permit?

With that background, we can now turn to ERC20Permit, an extension of ERC20.
Normally, before an address can call transferFrom (which transfers ERC20 tokens from one address to another on behalf of the owner), the token owner must call approve in a transaction to authorize that address to spend their tokens.
This procedure is inconvenient for the user.
Two transactions are involved in the typical approval-and-action workflow, so the user may be asked to sign twice and must hold sufficient ETH to pay the required gas.
ERC20Permit addresses this problem.
A typical ERC20Permit workflow is as follows.
Steps
- Ask the user to sign a message offchain using their wallet's private key. An address that pays gas submits the signature data and signed message information to the contract in a transaction.
- The contract uses the signature data and signed message information to recover the signing address and verify that it corresponds to the token owner who authorized the allowance.
- After verification, the contract updates the allowance, equivalent to the effect of
approve, authorizing the specified address to spend the specified amount of tokens belonging to the signer. - The authorized address executes
transferFromto actually send the ERC20 tokens to another address.
The advantage is that a user whose operation is sponsored by a third party does not need to hold ETH or pay the gas personally.
The allowance update and transferFrom operation can also be combined into one transaction, reducing the number of onchain transactions to one when an integrating contract performs both steps.
For the signature mechanism, an understanding of EIP712 is useful. I will cover that topic in a separate article.
Why use the seemingly indirect approach of approve followed by transferFrom instead of executing transfer to send ERC20 tokens directly?
ERC20Permit was proposed to make it easier to use DEXs and other contracts. A signature-based direct transfer mechanism would require developers to change the existing DEX workflow, whereas signed allowances integrate with existing approval-based operations.
EIP-2612: Why doesn't it use_transferinstead of approvals
EIP2612

What is an EIP?
EIP stands for Ethereum Improvement Proposals, a process for specifying proposed new features and processes for Ethereum.
For a detailed explanation, refer to the following website.
In simple terms:
EIP stands for Ethereum Improvement Proposals. These are proposals discussed to improve Ethereum. Because Ethereum is not managed by a single party, people around the world can contribute to its development by submitting EIPs.
A number such as 20 is a proposal identifier.
EIP2612
EIP2612 is the proposal on which ERC20Permit is based. The original subsection contains the transposed number EIP2162.
It adds the following three functions to ERC20.
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external
function nonces(address owner) external view returns (uint)
function DOMAIN_SEPARATOR() external view returns (bytes32)Let's examine them individually.
permit
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) externalThe owner argument contains the address of the ERC20 token owner who signed the message offchain.
spender is the address that receives permission to spend the ERC20 tokens.
value specifies the amount of ERC20 tokens that the spender is authorized to transfer, and deadline specifies when the signed authorization expires.
v, r, and s contain information required to recover the signer of the message.
This function carries out the approval mechanism described in the preceding section.
Conditions
- The current timestamp is less than or equal to
deadline. ownercannot be the zero address.- The nonce included in the signed message matches the current nonce for
ownerbefore it is incremented. v,r, andsconstitute a valid secp256k1 signature by the owner of the message.
For more information about secp256k1 signatures, refer to the following article.
nonces
function nonces(address owner) external view returns (uint)Returns the nonce associated with the address supplied as owner from the collection of per-address nonce values.
Using a distinct nonce for each authorization prevents the same signed authorization from being executed multiple times.
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view returns (bytes32)Returns the hash of the domain metadata defined by EIP712.
The metadata has a structure such as the following.
{
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Permit": [{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
},
{
"name": "value",
"type": "uint256"
},
{
"name": "nonce",
"type": "uint256"
},
{
"name": "deadline",
"type": "uint256"
}
],
"primaryType": "Permit",
"domain": {
"name": erc20name,
"version": version,
"chainId": chainid,
"verifyingContract": tokenAddress
},
"message": {
"owner": owner,
"spender": spender,
"value": value,
"nonce": nonce,
"deadline": deadline
}
}}This information is required for signature verification.
Examining the ERC20Permit code

Now that we have reviewed ERC20Permit's behavior, let's examine its actual implementation.
The following OpenZeppelin code is the basis of this historical walkthrough. The reproduced code below is the version used in the original article; the linked development branch may have changed.
Imports
pragma solidity ^0.8.0;
import "./IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/cryptography/EIP712.sol";
import "../../../utils/Counters.sol";These statements specify the Solidity version and import other contracts.
IERC20Permit.sol
Defines the ERC20Permit interface.
An interface resembles a contract but does not contain executable function implementations.
An interface declares function names, arguments, and other signatures rather than their implementation bodies.
A contract that inherits an interface must implement the functions unless the required implementation is inherited or the contract remains abstract.
Why use an interface at all?
An interface makes it easy to identify the functions an implementation must provide.
Because it declares the required functions, developers and users interacting with a contract can inspect the functionality that the contract exposes.
Interfaces are widely used in major projects, so understanding them will be useful later.
The official documentation is available below.
ERC20.sol
Defines the ERC20 contract.
It provides functionality for operations such as issuing and transferring ERC20 tokens.
ECDSA.sol
Imported to use the recover function, which recovers the address that signed a message.
EIP712.sol
The user signs the message using the EIP712 data structure and supplies the signature for verification.
Counters.sol
Imported to use a counter that supports safe incrementing and decrementing.
Variable definitions
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
using Counters for Counters.Counter;
mapping(address => Counters.Counter) private _nonces;
bytes32 private constant _PERMIT_TYPEHASH =
keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;The contract named ERC20Permit is declared with the abstract keyword.
An abstract contract can be inherited by another contract and may declare functions without implementation bodies that a concrete derived contract must implement.
In this case, the author did not find any unimplemented functions within ERC20Permit itself and was unsure of the exact reason for marking it abstract.
_nonces
Stores the nonce for each address.
_PERMIT_TYPEHASH
A hash of the typed data definition required for recovering the signing address.
_PERMIT_TYPEHASH_DEPRECATED_SLOT
The _PERMIT_TYPEHASH variable is declared constant and therefore cannot be changed.
The original explanation suggests that this field was defined to allow the hash to change. The deprecated slot in the reproduced implementation is instead retained for storage layout compatibility; it does not make the constant mutable.
constructor
constructor(string memory name) EIP712(name, "1") {}Executes the constructor of the EIP712 contract.
name is the token name, and the version is specified as 1.
permit
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public virtual override {
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");
bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));
bytes32 hash = _hashTypedDataV4(structHash);
address signer = ECDSA.recover(hash, v, r, s);
require(signer == owner, "ERC20Permit: invalid signature");
_approve(owner, spender, value);
}Verifies that the address supplied as owner matches the signer and grants the spender permission to spend value of the ERC20 tokens owned by owner.
At line 10, it checks whether the current timestamp is no later than deadline.
At line 12, it encodes and hashes the struct data according to EIP712 to recover the signer.
At line 14, it returns the fully encoded typed-data hash.
At line 16, it passes the hash and the signature values v, r, and s to recover the signing address. More precisely, r and s are ECDSA signature outputs and v is the recovery identifier.
At line 17, it checks whether the recovered address matches the expected signer. If they match, line 19 calls _approve to authorize the spender to spend value of the ERC20 tokens held by owner through the allowance mechanism, ordinarily used with transferFrom.
nonces
function nonces(address owner) public view virtual override returns (uint256) {
return _nonces[owner].current();
}Retrieves the nonce of the address supplied as owner from _nonces.
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view override returns (bytes32) {
return _domainSeparatorV4();
}Returns the hash of the domain metadata defined by EIP712.
_useNonce
function _useNonce(address owner) internal virtual returns (uint256 current) {
Counters.Counter storage nonce = _nonces[owner];
current = nonce.current();
nonce.increment();
}Returns the current nonce for the address supplied as owner from _nonces and increments it.
Implementing ERC20Permit

Let's implement ERC20Permit.
The following OpenZeppelin Contracts Wizard makes it easy to generate an ERC20Permit implementation.
Select the ERC20 tab and enable Permit in the FEATURES menu.
For this implementation, I used the following repository as a reference.
Environment setup
Start with the minimum project setup.
Follow the environment setup section of the following article.
Implementing ERC20 deposits and withdrawals from scratch
Once the setup is complete, replace the contents of hardhat.config.js with the following.
require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
};Creating the contracts
With the project scaffold in place, we can create the contracts.
CardeneToken.sol
First, create a contract that issues ERC20 tokens.
As the name suggests, ERC20Permit works with ERC20 tokens.
We therefore need to prepare an ERC20 token and can do so with a small contract.
The historical article shows the following command for creating the file. The command uses mkdir, which creates a directory rather than a file; use a file creation command such as touch contracts/CardeneToken.sol if creating the source file yourself.
$ mkdir contracts/CardeneToken.solAfter creating CardeneToken.sol, paste in the following code.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract CardeneToken is ERC20 {
// トークン名は"Cardene Token"、トークンシンボルは"CARD"。
constructor() ERC20("Cardene Token", "CARD") {}
/// @notice CARDトークンを発行する関数。
/// @ param _to 発行したトークンを送るアドレス。
/// @ param _amount 発行するトークン数。
function mint(address _to, uint _amount) external {
_mint(_to, _amount);
}
}This completes the code for issuing ERC20 tokens.
This file is provided as a reference and is not used in the demonstration below.
The implementation is shorter than you might expect.
IERC20Permit.sol
Create the ERC20Permit interface.
The original command is reproduced below; as with the preceding example, use a file rather than a directory at the specified path.
$ mkdir contracts/IERC20Permit.solAfter creating the file, paste in the following.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface IERC20Permit {
/// @notice ERC20トークンの総量を返す関数。
function totalSupply() external view returns (uint);
/// @notice accountに渡されたアドレスが所有しているERC20トークンの量を返す関数。
/// @param account 特定のアドレス。
/// @return アドレスが所有しているERC20トークンの量。
function balanceOf(address account) external view returns (uint);
/// @notice recipientに渡されたアドレスに、amount分のERC20トークンを送る関数。
/// @param recipient ERC20トークンの送り先アドレス。
/// @param amount 送りたいERC20トークンの量。
/// @return 送金が成功したか失敗したかのbool値。
function transfer(address recipient, uint amount) external returns (bool);
/// @notice spenderに渡されたアドレスが、ownerが所有するERC20トークンをどれくらい送る許可を与えられているか返す関数。
/// @param owner ERC20トークンの所有者アドレス。
/// @param spender ownerが所有するERC20トークンをどれくらいの量送る許可を与えられているか確認したいアドレス。
/// @return ERC20トークンを送れる許可を与えられている量。
function allowance(address owner, address spender) external view returns (uint);
/// @notice spenderで指定されたアドレスに、amout分のERC20トークンの送る許可を与える関数。
/// @param spender ERC20トークンを送る許可を与えたいアドレス。
/// @param amount 許可を与えるERC20トークンの量。
/// @return 実行が成功したかのbool値。
function approve(address spender, uint amount) external returns (bool);
/// @notice spenderに渡されたアドレスから、recipientに渡されたアドレスへamount分のERC20トークンを送る関数。
/// @param sender ERC20トークンの所有者アドレス。
/// @param recipient senderのERC20トークンを送る許可を与えられているアドレス。
/// @param amount 送りたいERC20トークンの量。
/// @return 実行が成功したかのbool値。
function transferFrom(
address sender,
address recipient,
uint amount
) external returns (bool);
/// @notice 第3者アドレスがERC20トークンを送る関数。
/// @param owner ERC20トークンの所有者アドレス。
/// @param spender ERC20トークンを代わりに送るアドレス。(ガス代を代わりに負担)
/// @param value 送りたいERC20トークンの量。
/// @param deadline 送れる期限。
/// @param v リカバリーID。
/// @param r ECDSA署名の出力。
/// @param s ECDSA署名の出力。
function permit(
address owner,
address spender,
uint value,
uint deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
// イベント
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}The comments explain the functions and their arguments. The original Japanese comments are retained.
This file is provided as a reference and is not used in the demonstration.
Bank.sol
We can now create the ERC20Permit example.
The original file creation command is shown below, with the same caveat about mkdir.
$ mkdir contracts/Bank.solAfter creating Bank.sol, paste in the following code.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
contract Bank is ERC20, Ownable, ERC20Permit {
// ERC20とERC20Permitのconstructorを呼び出しています。
constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}
/// @notice ERC20トークンを発行する関数。
/// @param to ERC20トークンを送りたいアドレス。
/// @param amount 発行するERC20トークンの量。
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
/// @notice msg.senderからコントラクトにamount分のERC20トークンを送る関数。
/// @param amount 送りたいERC20トークンの量。
function deposit(uint amount) external {
transferFrom(msg.sender, address(this), amount);
}
/// @notice permit関数を実行し、第3者がガス代を負担して、特定のアドレスにERC20トークンを送る関数。
/// @param amount 送りたいERC20トークンの量。
/// @param deadline 実行できる期限。
/// @param v リカバリーID。
/// @param r ECDSA署名の出力。
/// @param s ECDSA署名の出力。
function depositWithPermit(address _owner, address _spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
permit(_owner, _spender, amount, deadline, v, r, s);
require(allowance(_owner, _spender) > 0, "There are no tokens allowed for transfer.");
transferFrom(_owner, _spender, amount);
}
}This completes the contract portion.
Creating the test
Now create the test.
The original file creation command is shown below; create a file at this path rather than a directory.
$ mkdir test/bank-test.jsAfter creating bank-test.js, paste in the following code.
const { expect } = require("chai")
const { ethers } = require("hardhat")
// 署名を作成。
async function getPermitSignature(owner, contract, spender, value, deadline) {
const [nonce, name, version, chainId] = await Promise.all([
contract.nonces(owner.address),
contract.name(),
"1",
owner.getChainId(),
])
return ethers.utils.splitSignature(
await owner._signTypedData(
{
name,
version,
chainId,
verifyingContract: contract.address,
},
{
Permit: [
{
name: "owner",
type: "address",
},
{
name: "spender",
type: "address",
},
{
name: "value",
type: "uint256",
},
{
name: "nonce",
type: "uint256",
},
{
name: "deadline",
type: "uint256",
},
],
},
{
owner: owner.address,
spender,
value,
nonce,
deadline,
}
)
)
}
describe("ERC20Permit", function () {
it("ERC20 permit", async function () {
// アドレスを用意
// owner: ERC20トークンの所有者。
// contractOwner: Bankコントラクトをデプロイするアドレス。
// Admin: ERC20トークンを受け取り、ガス代を支払うアドレス。
[owner, contractOwner, admin] = await ethers.getSigners();
// Bankコントラクトをデプロイ。
const Bank = await ethers.getContractFactory("Bank", contractOwner)
const bank = await Bank.deploy("Cardene Token", "CARD")
await bank.deployed()
// 1000のERC20トークンを発行。
const amount = 1000
await bank.connect(contractOwner).mint(owner.address, amount)
// ERC20Permitの処理が有効な期間を指定。
// 今回は指定できる最大値を指定。
const deadline = ethers.constants.MaxUint256
// ownerアドレスによる署名を作成。
const { v, r, s } = await getPermitSignature(
owner,
bank,
admin.address,
amount,
deadline
)
// ERC20Permitを実行して、ownerアドレスからadminアドレスにERC20トークンを送る。
await bank.connect(admin).depositWithPermit(owner.address, admin.address, amount, deadline, v, r, s)
// adminアドレスにERC20トークンが送れているか確認。
expect(await bank.connect(admin).balanceOf(admin.address)).to.equal(amount)
})
})The details of the operations are explained in the original code comments.
The overall process is as follows.
Steps
- Issue
1000ERC20 tokens. - Create a signature using the
owneraddress. - The
adminaddress pays the gas, executes the ERC20Permit workflow, and transfers ERC20 tokens fromownertoadmin. - Finally, verify that the ERC20 tokens have actually been transferred to
admin.
Running ERC20Permit

Run the test using the code created in the preceding section.
Execute the following commands.
$ npx hardhat compile
$ npx hardhat testThe original article shows the following output as an example of a successful test run. It is reproduced here as historical output, not as a new test result.
ERC20Permit
✔ ERC20 permit (1507ms)
1 passing (2s)The code is available in the following repository.
Conclusion

This article covered ERC20Permit, starting with the prerequisite concepts and then working through the extension itself.
The second half examined the implementation code and a practical example. I hope it helps you understand how the mechanism works.
If you have questions, feel free to reach out on Twitter.
References
Understanding Ethereum ERC20 meta-transactions
EIP2612 adoption by Yearn Finance and OpenZeppelin
Blockchain fundamentals: recording transfers on a blockchain
Lesson 2: Ethereum accounts and transaction structure
Understanding Ethereum's mechanisms at the transaction level







