{"id":"ERC-7818","name":"Expirable ERC-20","status":"Draft","chain":"both","category":{"id":"defi","name":"DeFi Patterns","description":"Vaults, bonds, and financial primitives"},"journeyStages":[{"id":"asset-display","name":"Asset Discovery & Display","description":"Seeing tokens, NFTs, and balances"},{"id":"management","name":"Asset Management","description":"Managing assets over time"}],"uxImpact":"Users hold tokens that expire after a validity period — for rewards, prepaid credits, or time-limited assets. Design implications: prominently show expiration date/countdown per token epoch, display both current-epoch and total usable balance, add 'expiring soon' warnings, enable epoch-specific transfers, gray out or hide expired balances. Design decisions: how aggressively to warn about upcoming expiration, whether to auto-hide expired epochs or show them struck-through, FIFO vs user-selected epoch for spending, notification timing for expiring tokens.","hasDetailedContent":true,"content":{"id":"ERC-7818","summary":"ERC-7818 adds expiration to ERC-20 tokens. Tokens have a validity period and become unusable after expiration. Perfect for loyalty points that expire, time-limited rewards, promotional tokens, or any fungible asset that shouldn't last forever. Users see clear \"expires in X days\" messaging.","applicability":{"whenToUse":["Your product addresses: loyalty points that should expire never do on-chain.","Your product addresses: promotional tokens remain valid forever.","The flow should deliver: on-chain expiration, tokens automatically become unusable.","You are designing a expiration warning display experience with visible states and recovery paths."],"whenToAvoid":["Show expiration prominently from day one.","Send reminders at 7 days, 3 days, 1 day before.","FIFO: always use soonest-expiring first.","No token balances, swaps, lending, or yield flows appear in the product."]},"designerTakeaways":["You can design UI that delivers on-chain expiration.","You can design UI that delivers promotion expires, tokens have clear end date.","You can design UI that delivers \"Use before Jan 31\" creates healthy urgency."],"problemsSolved":[{"problem":"Loyalty points that should expire never do on-chain","oldWay":"Off-chain expiration tracking, inconsistent enforcement","newWay":"On-chain expiration, tokens automatically become unusable","impact":"critical"},{"problem":"Promotional tokens remain valid forever","oldWay":"One-time rewards circulate indefinitely, diluting value","newWay":"Promotion expires, tokens have clear end date","impact":"high"},{"problem":"No urgency to use rewards","oldWay":"Users hoard rewards, never engage","newWay":"\"Use before Jan 31\" creates healthy urgency","impact":"high"},{"problem":"Complex backend for expiring balances","oldWay":"Track expiration per-user off-chain, sync issues","newWay":"Built into token contract, consistent behavior","impact":"medium"}],"uxPatterns":[{"name":"Expiration Warning Display","description":"Show tokens with approaching expiration","mockup":"concept/proxy-pattern","userFlow":["User views reward balance","Tokens sorted by expiration (soonest first)","Visual countdown for each batch","Warning highlights urgent expirations","Quick action to use expiring tokens"]},{"name":"Batch Expiration View","description":"Show multiple token batches with different expirations","mockup":"concept/proxy-pattern","userFlow":["Query all token batches for user","Group by expiration date","Color-code by urgency","Suggest using oldest first","Auto-select expiring tokens for transactions"]},{"name":"Spending with Auto-Select","description":"Automatically use soonest-expiring tokens first","mockup":"concept/tx-status","userFlow":["User initiates purchase","System auto-selects expiring tokens first","Show which batches will be used","Display remaining balance by batch","Confirm transaction"]},{"name":"Expiration Notification","description":"Alert users before tokens expire","mockup":"concept/proxy-pattern","userFlow":["System checks for expiring tokens","Send notification before expiration","Show clear deadline","Provide direct link to use tokens","Allow snooze for reminder"]}],"uiComponents":[{"name":"ExpirationBadge","description":"Small indicator showing expiration status","states":["valid","expiring-soon","expired"],"props":["expirationDate","urgencyThreshold"]},{"name":"TokenBatchList","description":"List tokens grouped by expiration date","states":["loading","loaded","empty"],"props":["batches[]","sortBy","onSelectBatch"]},{"name":"ExpirationCountdown","description":"Visual countdown timer to expiration","states":["days","hours","minutes","expired"],"props":["expirationDate","format"]},{"name":"AutoSelectPreview","description":"Show which batches will be auto-selected for spend","states":["calculating","selected","modified"],"props":["amount","batches[]","selectedBatches[]"]}],"antiPatterns":[{"pattern":"Hiding expiration until it's too late","why":"Users feel tricked when tokens suddenly expire","instead":"Show expiration prominently from day one","severity":"critical"},{"pattern":"No notification before expiration","why":"Users may not check balances, lose tokens unknowingly","instead":"Send reminders at 7 days, 3 days, 1 day before","severity":"high"},{"pattern":"Using newest tokens first","why":"Old tokens expire unused while new ones get spent","instead":"FIFO: always use soonest-expiring first","severity":"high"},{"pattern":"Showing only total balance without breakdown","why":"Users don't know some of their balance expires soon","instead":"Show balance breakdown by expiration date","severity":"medium"}],"onMonad":[{"aspect":"Expiration Check","ethereum":"Each expiration check costs gas","monad":"Cheap reads for frequent expiration checks","designImplication":"Can show real-time expiration status"},{"aspect":"Batch Updates","ethereum":"Updating multiple batches expensive","monad":"Cheap batch operations","designImplication":"Can process many expiration batches efficiently"},{"aspect":"Transaction Speed","ethereum":"Using expiring tokens takes 15+ seconds","monad":"Sub-second use of expiring tokens","designImplication":"Last-minute redemption actually works"},{"aspect":"Time Precision","ethereum":"Block time ~12 seconds, timing approximate","monad":"Faster blocks, more precise expiration","designImplication":"Can show \"expires in X minutes\" more accurately"}],"keyTakeaways":["Always show expiration prominently - no surprises","Use FIFO: spend soonest-expiring tokens first","Send notifications before tokens expire","Show breakdown by expiration date, not just total","On Monad: fast transactions enable last-minute redemption"],"technicalNotes":"ERC-7818 extends ERC-20 with expiration timestamps per token batch. The contract tracks multiple batches with different expirations for each holder. balanceOf returns only non-expired tokens. The standard defines methods to query expiration dates and batch details. Expired tokens can optionally be burned or recycled."},"sources":[{"label":"Official specification","url":"https://eips.ethereum.org/EIPS/eip-7818","type":"official-spec"},{"label":"Discussion","url":"https://ethereum-magicians.org/search?q=ERC-7818","type":"discussion"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/ERC-7818","markdown":"https://www.eipsfordesigners.com/standards/ERC-7818/content.md","agent":"https://www.eipsfordesigners.com/standards/ERC-7818/agent.md","api":"https://www.eipsfordesigners.com/api/standards/ERC-7818","official":"https://eips.ethereum.org/EIPS/eip-7818","discussion":"https://ethereum-magicians.org/search?q=ERC-7818"},"freshness":{"lastReviewed":"2026-04-05","lastUpdated":"2026-04-05"}}