apiton blog
How .ton domains expire, and how to find expired ones
A .ton domain is not rented from a registrar. It is an NFT that lives in a smart contract on
the TON blockchain, and its "registration period" is a timestamp stored inside that contract.
This article explains the exact rule, what happens on expiry, and why finding expired domains is
harder than it sounds.
A domain is an NFT in the root DNS collection
Every .ton name is an item of one NFT collection, the TON DNS root:
raw: 0:b774d95eb20543f186c06b371ab88ad704f7e256130caf96189368a7d0cb6ccf
bounceable: EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz
The collection follows the NFT standard (TEP-62)
and the DNS standard (TEP-81).
One detail matters a lot for everything below: the index of a domain item is not a running
counter (0, 1, 2, …) but a hash of the name. Given a name you can compute the item address
directly (get_nft_address_by_index with the hashed name), but you cannot walk the collection
from item 0 to item N and list every domain.
The one-year rule
Each domain item stores last_fill_up_time — the moment the owner last "filled up" the
domain. The domain is valid for one year after that. In apiton the expiry is computed as:
expires_at = last_fill_up_time + 31 622 400 seconds (366 days)
You can read the timestamp yourself with the get-method get_last_fill_up_time on the domain's
NFT item. Two practical notes:
- Actions of the owner that rewrite the item — for example changing a DNS record, which is what
"renew" buttons in wallets and DNS managers do — set
last_fill_up_timeto "now" and start a fresh year. get_last_fill_up_time == 0does not mean "expired decades ago". It means the item was never initialised. Always checkt > 0before you comparet + 31622400with the current time.
On apiton.org every domain page shows the expiry date and the days left; the hub Domains expiring soon lists names whose year ends within the next 30 days.
What happens after expiry
Nothing happens automatically at the exact second a domain lapses — there is no on-chain "expired"
event. The contract (nft-item.fc in ton-blockchain/dns-contract)
simply starts accepting a special message once more than a year has passed:
- Anyone may send
dns_balance_release(op0x4ed14b65) to the expired item, attaching at least the contract's minimum price for that name (get_min_price, which depends on the name's length). - That sender becomes the first bidder, the previous owner loses the domain, and a new auction starts with a duration of one week.
- Each next bid must be at least 5 % higher than the current one. A bid in the last hour moves the end so that at least one hour remains.
- When the auction ends, the highest bidder becomes the owner, and
last_fill_up_timestarts a new year.
Until someone sends that first message, an expired domain just sits there with its old owner recorded. That is why "expired" really means "claimable", not "gone".
Why the op-code trick does not find expired domains
A popular idea is to scan the chain for dns_balance_release messages and treat their destinations
as expired domains. We tested this against live data: of the 50 most recent destinations, none
was expired — all 50 were active, because the message itself starts the release auction that
re-assigns the domain. The op-code tells you which domains were just re-claimed, not which are
available now.
How to actually find expired domains
There is no network-wide "list of expired domains" you can ask a liteserver for. Workable options:
- Check a specific name. Hash the name, get the item address from the root collection, read
get_last_fill_up_time. If the item does not exist, the name has never been registered; ift > 0andt + 31622400 < now, it is expired. Feed a wordlist to this check and you get free names without enumerating the chain. - Use an index of known domains. apiton keeps a catalog of domains it has seen (from an indexer, from liteserver reads and from every lookup made through the API) and re-checks their expiry. The Expired .ton domains hub lists the ones whose year has run out; short and numeric names have their own hubs. The catalog only covers domains it has observed, so it is a good starting list, not a complete registry.
- Ask the bot. Send any
name.tonto @apitonBot — it reads the item live and shows the owner, the expiry date and any sale or auction.
Before you bid, re-check the domain live: catalog data is cached, and someone else may already have started the release auction.
Summary
- A
.tondomain is valid for 366 days afterlast_fill_up_time; the owner renews by updating the item. - After expiry, anyone can start a one-week release auction with
dns_balance_releaseand a minimum bid. - Domains are hash-indexed, so you check names, you do not enumerate them.
- Browse expired and expiring domains on apiton.org, and check any name live in @apitonBot.