Token standards
ICRC-2: approve and transfer-from on the Internet Computer
ICRC-2 lets you allow someone else — usually a smart contract such as a DEX pool — to move a limited amount of your tokens. It is the reason a swap on ICP can be one click instead of two transfers, and it is also the permission you should understand before you approve anything. Here is how it works and how to stay safe.
Token data checked on-chain on November 17, 2026 · Sources at the end of the page
ICRC-2 in 30 seconds
- What it is: an extension of ICRC-1, accepted by the NNS in proposal 122613. A ledger that supports it must implement all of ICRC-1 and list ICRC-2 in
icrc1_supported_standards. - What it adds: three methods —
icrc2_approve,icrc2_transfer_fromandicrc2_allowance. - Why it exists: the specification names two needs: recurring payments (approve a larger amount once, let a service charge smaller installments) and amounts you cannot know in advance, such as automated trading.
- Where you meet it: every time a DEX or another app asks you to “approve” before an action. ckETH, for example, uses an ICRC-2 approval to withdraw ETH back to Ethereum.
The approve → transfer-from flow
The specification describes it with Alice and Bob:
- Alice approves. She calls
icrc2_approveand entitles Bob to transfer up to X tokens from her account A. - Bob pulls. Bob calls
icrc2_transfer_fromto move tokens from account A to any account, as if A were his own. He can do this as many times as he wants, as long as the total stays within X.
Approvals are not transitive: if Alice approves Bob, and Bob approves Eva, Eva cannot take Alice’s tokens through Bob’s approval. In practice “Bob” is almost always a canister — a DEX pool, a vault or a payment service — and Alice is you.
1. Alice calls icrc2_approve with spender = { owner = C; subaccount = null }
and amount = 100 + the transfer fee.
2. Alice calls C's deposit method. C calls icrc2_transfer_from
with from = Alice's account, to = C's account, amount = 100.
3. C sees from the result whether the transfer succeeded, and only then
records the deposit — it knows the tokens are in its account.icrc2_approve in detail
icrc2_approve : (ApproveArgs) -> (variant { Ok : nat; Err : ApproveError });
type ApproveArgs = record {
from_subaccount : opt blob;
spender : Account;
amount : nat;
expected_allowance : opt nat;
expires_at : opt nat64;
fee : opt nat;
memo : opt blob;
created_at_time : opt nat64;
};- amount becomes the spender’s allowance. Every approve call replaces the previous allowance and expiry for that spender — it does not add to it.
- You only need the fee. The account must hold enough to pay the approval fee; it does not need to hold the full amount.
- expires_at (optional) ends the approval at a given time. It must lie in the future when you call.
- expected_allowance (optional) makes the change conditional: the ledger applies it only if the current allowance equals this value, and returns
AllowanceChangedotherwise. - The ledger should reject an approval where the spender’s owner is the same as the account owner, and may cap an allowance that is larger than the total supply.
- Errors:
BadFee,InsufficientFunds(not enough for the fee),AllowanceChanged,Expired,TooOld,CreatedInFuture,Duplicate,TemporarilyUnavailable,GenericError.
icrc2_transfer_from in detail
icrc2_transfer_from : (TransferFromArgs) -> (variant { Ok : nat; Err : TransferFromError });
type TransferFromArgs = record {
spender_subaccount : opt blob;
from : Account;
to : Account;
amount : nat;
fee : opt nat;
memo : opt blob;
created_at_time : opt nat64;
};- The caller is the spender. The allowance must cover amount + fee, otherwise the ledger returns
InsufficientAllowance. - The
fromaccount must hold amount + fee, otherwiseInsufficientFunds. The fee is taken from thefromaccount. - After a successful call the allowance goes down by amount + fee, the
fromaccount is debited and thetoaccount is credited. - Like ICRC-1 transfers, it supports
memoandcreated_at_timefor deduplication.
Checking an allowance
icrc2_allowance is a query that returns how much a spender may still take from an account, and when that ends. With no active approval it returns{ allowance = 0; expires_at = null }.
icrc2_allowance : (AllowanceArgs) -> (Allowance) query;
type AllowanceArgs = record { account : Account; spender : Account; };
type Allowance = record { allowance : nat; expires_at : opt nat64; };To ask about one spender you have to know who it is. Listing all your open approvals needs ICRC-103, a draft extension that 66 of the 142 listed tokens already implement.
How to revoke an approval
- Call
icrc2_approvefor the same spender withamount = 0. The spender can no longer move your tokens. - To be sure nothing was taken in the meantime, set
expected_allowanceto the amount you believe is still approved. If the spender used part of it first, you getAllowanceChangedand know exactly what happened.
Both cases are worked examples in the specification. Approving 0 costs the normal approval fee.
Approving safely
An approval is a standing permission
- Approve what the action needs. The ledger takes the allowance as amount + fee, so “the amount plus one fee” is enough for a single deposit. Very large “unlimited” approvals are a convenience, not a requirement.
- Check the spender. The spender is an account — usually a canister ID. On ICPSwap it is the pool canister of the pair you trade; every pool page on ICP Tokens shows it.
- Use expiry where you can.
expires_atturns a forgotten approval into one that ends by itself. - Revoke what you no longer use with an approve of 0.
- Read what you sign. Wallets that support ICRC-21 show a human-readable consent message for the call.
ICRC-2 on ICPSwap
ICPSwap documents two ways to put tokens into a pool. For tokens with ICRC-2 (and also for ICP, DIP20 and EXT) the trade workflow is:
- Approve the pool canister to spend your tokens.
- depositFrom: the pool transfers the tokens from you and credits your balance inside the pool.
- swap, then withdraw the output token.
Or, with depositFromAndSwap, approve once and do deposit and swap in a single call: the output tokens go straight to your account, and if the price moves beyond your slippage limit the input is refunded automatically. Tokens with only ICRC-1 need a transfer to a pool subaccount and a deposit instead — see ICRC-1 on ICPSwap.
dfx canister --network=ic call ryjl3-tyaaa-aaaaa-aaaba-cai icrc2_approve '(record {
from_subaccount = null;
spender = record { owner = principal "xmiu5-jqaaa-aaaag-qbz7q-cai"; subaccount = null };
amount = 100000000:nat;
expires_at = null;
expected_allowance = null;
fee = opt 10000;
memo = null;
created_at_time = null;
})'xmiu5-jqaaa-aaaag-qbz7q-cai is the ICPSwap pool canister for ICP/ckBTC — the same pool you can follow live on its pool page. 100,000,000 is 1 ICP (8 decimals) and 10,000 is the ICP fee. The ICPSwap docs write the spender as a bare principal; the ICRC-2 specification defines it as an account (record { owner; subaccount }), as above. In practice your wallet or the ICPSwap app builds this call for you.
ICRC-2 vs ERC-20 approve
The specification says it plainly: the approve and transfer-from pattern became popular through Ethereum’s ERC-20. ICRC-2 keeps the idea and fixes some sharp edges:
| ICRC-2 | ERC-20 | |
|---|---|---|
| Set an allowance | icrc2_approve | approve |
| Spend it | icrc2_transfer_from | transferFrom |
| Read it | icrc2_allowance (also returns expiry) | allowance |
| Expiry | Optional expires_at | None |
| Change safely | expected_allowance: applies only if the current value matches | The spec advises interfaces to set the allowance to 0 first |
| Fee | Approval fee and transfer fee paid in the token | Gas paid in ETH |
| Subaccounts | Approve from, and spend to, any subaccount | Single address |
The ERC-20 text recommends setting an allowance to 0 before setting it to another value, to avoid a known race where a spender uses the old and the new allowance. ICRC-2’s expected_allowance lets the change succeed only if the allowance is still what you expect.
Tokens that support ICRC-2
129 of the 142 tokens listed on ICP Tokens return ICRC-2 from icrc1_supported_standards (checked on-chain on November 17, 2026, ordered by fully diluted market cap). Each links to its token page with the live price, chart, pools and swaps.
Show all 129 tokens ↓Show fewer ↑
WELL
VCHF
cICP
ICE
ALICE
TCYCLES
MOTOKO
SNEED
RUGGY
DCD
DVINITY
OHSHII
GHOST
ICFC
TACO
YUKU
KONG
tITP
PIERRES
OT
MAPTF
NUA
CHAI
STK
SOON
FUNNAI
CLOWN
DOLR
NAK
JBBJ
CTZ
SONIC
IAMAI
ELNA
ckLINK
NFIDW
RICH.OT
DAMONIC
DEAD
ALEX
BURN
Querio
ANAL
SPOT
AVCD
icUSD
TRAX
PHASMA
TENDY
PUFFIN
HOMELESS
EST
DOMINATOR
GOLD
QUOKKA
sGLDT
ND64
AWB
McDOMS
ICP2
BTON
DOGFAI
POPEYE
CONF
DAO
MOTOKOINS
Boob
CRUMB
ICB
OPENAPP
ENGINE
Cheese
MODOGO
PIKO
BASED
BITTYICP
SEED
MOCATO
USC
bone
PizzaBTC
AB
ICP3
WEN
dik
LASERBEN
TORCH
ckPEPE
BDOG
BRO
WAR
MGSN
Bch
GFC
IC
AAA
SCOTT
CCAT
ICG
Vortix
WORM
FOREST
RAVEN
VILAGE
DARK
Listed tokens without ICRC-2 (9)
These ledgers implement ICRC-1 but do not announce ICRC-2. Apps cannot pull an approved amount from them; on ICPSwap they use the transfer + deposit flow.
FAQ
What is ICRC-2?
Why does a DEX ask me to approve before a swap?
How do I revoke an ICRC-2 approval?
Do I need the full amount in my account to approve it?
Who pays the fee in icrc2_transfer_from?
Can an approval expire?
Does every ICP token support ICRC-2?
Sources
Everything on this page is checked against these primary sources. Token data was read on-chain on November 17, 2026.
- ICRC-2 specification — dfinity/ICRC-1
- NNS proposal 122613 (ICRC-2 accepted) — ICP Dashboard
- ICPSwap docs: executing a trade (ICRC-1 and ICRC-2 workflows)
- ICPSwap docs: depositFromAndSwap
- DFINITY docs: ckETH withdrawal with an ICRC-2 approval
- ICRC-103 allowance listing (draft) — dfinity/ICRC
- EIP-20: Token Standard (ERC-20)
Keep exploring
- Token standards on ICP →ICRC-1, -2, -3 and the extensions, chain-key and SNS tokens
- ICRC-1 →The base standard: accounts, transfers, fees
- ICRC-3 →The verifiable block log
- All ICP token prices →Live prices, volume and liquidity of every listed token
- ICPSwap pools →Every active pool, sorted by 24h volume
- ICP wallets →Which wallets hold ICRC tokens
- Free chart widget →A live price chart of any token for your website