FNS 域名:一个永久属于你的 .far 名字 FNS: a permanent .far name that resolves only to its owner
FNS 是一张 ERC-721,把一串字符映射到一个地址。它永久有效、不能续费、注册费全额销毁,只影响别人怎么称呼你,不影响地址里的资产和数据。本文按注册、解析、转移和主名的顺序,说明这套名字系统的能力与边界。 FNS is an ERC-721 that maps a name to an address. It never expires, cannot be renewed, and burns its registration fee in full. It changes how others refer to you — not what your address holds. This essay follows registration, resolution, transfer, and primary names to mark the boundary.
On this page
名字系统最容易引起的误解,是把它当成资产容器。FNS 只做一件事:当有人输入一个名字时,返回它当前持有者的地址。名字本身不是钱包,不保管余额,也不授予任何权限。
01它是什么,不是什么
FNS(Falari Name Service)是一个部署在 Falari EVM 上的 ERC-721 合约 FalariNames,合约名称是 Falari Name Service,符号 FNS,当前地址为 0xc25a305baee79399eeedd4f162f136c3298b3fe8。每个名字是一枚 NFT,tokenId = keccak256(小写规范化后的名字)。
它只做显示别名:name → owner。域名不托管资产,不授予签名权,也不影响地址里的数据或 Agent Key。转走域名只改变名字指向谁,不会带走余额。名字永久有效:没有到期日、没有续费、不退款;唯一能让名字重新可注册的方式是持有者销毁 NFT。
合约不可升级,owner 可以暂停注册、调整价格和保留字,但不能改写已有名字的归属。历史上有 v1–v3 三个旧合约,它们已被 v4 取代,旧域名没有迁移;在浏览器里看到的当前集合只有 v4 这一份。
02注册:一次付费,永久持有
注册是一笔 payable 调用 register(name),msg.value 必须精确等于 priceOf(name)。价格按字符数分档,合约里的默认曲线是 1 字符 1,000 FAR、2 字符 500、3 字符 200、4 字符 50、5 字符及以上 10。当前 owner 已把每一档设为默认值的 2 倍:2,000 / 1,000 / 400 / 100 / 20 FAR。实际价格以 priceOf 的实时返回为准。
| 字符数 | 当前价格 | 合约默认 |
|---|---|---|
| 1 | 2,000 FAR | 1,000 FAR |
| 2 | 1,000 FAR | 500 FAR |
| 3 | 400 FAR | 200 FAR |
| 4 | 100 FAR | 50 FAR |
| ≥ 5 | 20 FAR | 10 FAR |
注册费在同一笔交易里全额转给黑洞地址 0x000000000000000000000000000000000000dEaD。合约不保留这笔钱,也没有退款路径。字符集是小写或大写 ASCII 字母、数字、连字符和 CJK 统一表意文字(U+4E00–U+9FFF),长度 1–63 个字符,连字符不能出现在首尾。
唯一性不区分大小写:FNS、Fns 和 fns 被视为同一个名字;但显示保留注册时的写法。查重和解析都用 ASCII 小写后的哈希,CJK 字节保持不变。注册前合约还会检查名字是否已被占用、是否在保留字列表里。
03解析:只指向当前持有人
resolve(name) 返回名字当前持有者的地址;名字不存在、被停用或已销毁时返回零地址。注册成功后名字默认处于 active 状态,因此「注册即解析」,不需要额外开启。
转移 NFT 会清空解析。新持有人拿到的是一个存在但未启用的名字,必须显式调用 setActive(tokenId, true) 才会重新指向自己。这个设计避免了「名字悄悄跟着 NFT 走」:买家在转移后可以先核对状态,再决定是否启用。
持有人也可以主动调用 setActive(tokenId, false) 停用解析,而不转移 NFT。停用只影响名字解析,不影响 NFT 的归属和交易。销毁则更进一步:NFT 被烧掉,名字从集合中释放,任何人都可以按当时的报价重新注册。
FNS.far 因此被铸到合约自身。
04主名:一个地址只显示一个名字
一个地址可以持有任意多个域名,但只能指定一个作为反向显示的主名。setPrimary(tokenId) 要求调用者既是持有人,名字又处于 active 状态;clearPrimary() 取消主名。停用当前主名时,合约会同时清空主名记录,避免留下一个无法解析的反向引用。
reverseOf(address) 返回该地址的主名。它在合约内部做了三重检查:名字存在、NFT 的当前持有人就是该地址、名字处于 active。任何一项不满足都返回空字符串。这是必要的防御,但客户端仍应做正向校验:把返回的名字再 resolve 一次,确认解析结果等于原地址,再显示。浏览器就是这么做的。
主名是展示便利,不是身份证明。它不能替代地址,也不能让签名越过地址本身。任何要求你「按名字转账」的界面,都应该把解析后的 0x 地址明确展示出来。
05保留字与协议名
合约在部署时预留了 23 个词:rpc、www、docs、gateway、admin、api、explorer、falari、far、root、mail、support、official、test、dev、node、validator、miner、storage、agent、contract、wallet、fns。保留字检查同样不区分大小写。
owner 可以用 setReserved(name, bool) 增删保留字,不需要重新部署合约;普通用户不能注册保留字。owner 还可以用 assign(name, to, primary) 直接分配名字,不收费,也可以分配保留字,主要用于协议名和迁移。
协议名 FNS 就是这样分配的:NFT 被铸造到合约自身地址,显示为 FNS.far,解析到合约。因为持有人是合约,没有任何外部账户能转走它。这个例子说明保留字的目的不是囤积,而是给协议基础设施留出不会被抢注的名字。
06价格、暂停与不可升级
价格曲线写在合约里,但 owner 可以按字符档位覆盖:setPrice(chars, priceWei) 立即生效,clearPrice(chars) 恢复默认;chars 取 1–4 表示具体字符数,5 表示「5 个及以上」,价格设为 0 就是免费档。注册交易始终按 priceOf 校验,因此改价不需要迁移合约。
owner 可以 pause() 暂停注册,但转账和销毁不受影响,已有名字继续解析。合约不可升级意味着地址和规则是稳定的;也意味着如果规则有缺陷,只能通过暂停注册来止损,不能热替换逻辑。
注册费全部销毁,协议不从中获得收入。这一点决定了 FNS 的定位:它不是一门靠续费维持的生意,而是一层一次付费、长期存在的命名基础设施。
07边界与风险
最实际的风险不是合约漏洞,而是误转。名字只解析到当前持有人;如果域名易主,之后所有按名字发起的转账都会指向新持有人。发送方应始终展示解析后的 0x 地址,并对「解析地址近期发生变化」给出提示。名字的历史变更全部上链,浏览器按 tokenId 索引了这些事件。
反向显示有冒名风险,因此任何展示主名的客户端都应做正向校验。合约的 reverseOf 已经检查了持有人和 active 状态,但这不能替代调用方的校验:只有 resolve(reverseOf(addr)) == addr 成立,名字才可以安全地显示在地址旁边。
域名不是资产容器,也不是权限凭证。它不会让持有人获得地址里的资金、数据或 Agent Key;反过来,转走域名也不会影响这些。把它当作「一个好记的收款地址标签」,而不是「一个可以装东西的账户」,是使用它的正确方式。
最后两个边界:注册不可退款,拼错的名字也永久有效;合约没有改名功能,唯一的补救是销毁后重新注册(如果届时仍可注册)。名字一旦被销毁,任何人都可以按当前价格重新拿走它。
08合约接口速查
priceOf(string) → uint256 // exact msg.value
register(string) payable // mint + active, fee burned
resolve(string) → address // 0 if unknown / inactive
reverseOf(address) → string // "" unless owner + active
setActive(uint256, bool) // owner only
setPrimary(uint256) // owner + active only
clearPrimary()
burn(uint256) // releases the name
isReserved(string) → bool
primaryTokenOf(address) → uint256
浏览器入口是 https://names.falari.xyz。页面会实时查询 priceOf、显示可用性、连接钱包发起注册;注册完成后可以在「我的域名」里设为主名或停用解析。全局搜索支持直接输入 alice 或 alice.far,未注册时会跳到注册页。
FNS 只回答「这个名字现在指向谁」。它不保管资产,不授予权限,也不保证名字不会易主。发送前核对 0x 地址,是使用任何名字系统都必须保留的一步。
把 FNS 压缩成一句话:一次付费,永久持有一枚 ERC-721;名字只解析到它的当前持有人;转移会清空解析,销毁会释放名字,而注册费从头到尾都不属于任何人的收入。
The easiest mistake with a name system is to treat it as an asset container. FNS does one thing: when someone types a name, it returns the address of the current owner. The name is not a wallet, it does not hold a balance, and it grants no permissions.
01What it is, and what it is not
FNS (Falari Name Service) is an ERC-721 contract named FalariNames on Falari EVM, with collection name Falari Name Service and symbol FNS. The current contract is 0xc25a305baee79399eeedd4f162f136c3298b3fe8. Each name is an NFT with tokenId = keccak256(lowercased canonical name).
It is a display alias only: name → owner. A name does not custody assets, grant signing authority, or affect the data or Agent Keys behind an address. Transferring the name changes who it points to; it does not move the balance. Names are permanent: no expiry, no renewal, no refund. The only way a name becomes available again is for its holder to burn the NFT.
The contract is not upgradeable. The owner can pause registration, change prices, and edit the reserved list, but cannot rewrite ownership of an existing name. Three earlier contracts (v1–v3) were superseded by v4, and their names were not migrated; the collection shown in the explorer is the v4 one.
02Registration: pay once, hold permanently
Registration is a payable call to register(name) where msg.value must exactly equal priceOf(name). Pricing is tiered by character count. The contract's default curve is 1,000 FAR for one character, 500 for two, 200 for three, 50 for four, and 10 for five or more. The current owner has set every tier to twice the default: 2,000 / 1,000 / 400 / 100 / 20 FAR. The live priceOf result is authoritative.
| Characters | Current price | Contract default |
|---|---|---|
| 1 | 2,000 FAR | 1,000 FAR |
| 2 | 1,000 FAR | 500 FAR |
| 3 | 400 FAR | 200 FAR |
| 4 | 100 FAR | 50 FAR |
| ≥ 5 | 20 FAR | 10 FAR |
The full payment is forwarded in the same transaction to the black-hole address 0x000000000000000000000000000000000000dEaD. The contract keeps none of it, and there is no refund path. The character set is ASCII letters (either case), digits, hyphen, and CJK unified ideographs (U+4E00–U+9FFF). Names are 1–63 characters, and a hyphen cannot lead or trail.
Uniqueness is case-insensitive: FNS, Fns, and fns are the same name. Display keeps the casing used at registration. Lookup and deduplication use the ASCII-lowercased hash; CJK bytes are left untouched. The contract also checks whether the name is already taken or reserved before minting.
03Resolution: only the current holder
resolve(name) returns the address of the name's current holder, or the zero address when the name does not exist, has been deactivated, or has been burned. A newly registered name starts active, so registration resolves immediately with no extra step.
Transferring the NFT clears resolution. The new holder receives an existing but inactive name and must explicitly call setActive(tokenId, true) to point it at themselves again. This prevents a name from silently following the NFT; a buyer can inspect the state after transfer and decide whether to activate it.
A holder can also call setActive(tokenId, false) to stop resolution without transferring the NFT. Deactivation affects resolution only, not ownership or tradability. Burning goes further: the NFT is destroyed, the name leaves the collection, and anyone can register it again at the current price.
FNS.far is minted to the contract itself for that reason.
04Primary name: one displayed name per address
An address may hold any number of names but can designate only one as its reverse-display primary. setPrimary(tokenId) requires the caller to be both the holder and the name to be active; clearPrimary() removes it. Deactivating the current primary also clears the primary record, so the contract never leaves a reverse reference that cannot resolve.
reverseOf(address) returns the primary name for an address. Internally it checks three things: the name exists, the NFT's current holder is that address, and the name is active. If any check fails it returns an empty string. That is necessary defense, but clients should still verify forward: resolve the returned name again and confirm it equals the original address before displaying it. The explorer does exactly this.
A primary name is a display convenience, not proof of identity. It does not replace an address and cannot authorise a signature on the address's behalf. Any interface that asks you to send “to a name” should show the resolved 0x address explicitly.
05Reserved words and the protocol name
The contract reserves 23 words at deployment: rpc, www, docs, gateway, admin, api, explorer, falari, far, root, mail, support, official, test, dev, node, validator, miner, storage, agent, contract, wallet, and fns. The reserved check is case-insensitive too.
The owner can add or remove reserved words with setReserved(name, bool) without redeploying, and ordinary users cannot register them. The owner can also use assign(name, to, primary) to allocate a name directly, free of charge, including a reserved word. This exists for protocol names and migrations.
The protocol name FNS is allocated this way: the NFT is minted to the contract itself, displays as FNS.far, and resolves to the contract. Because the holder is the contract, no external account can move it. Reserved words are not about hoarding; they keep infrastructure names from being squatted.
06Prices, pause, and no upgrade path
The price curve lives in the contract, but the owner can override any tier: setPrice(chars, priceWei) takes effect immediately and clearPrice(chars) restores the default. chars 1–4 means an exact length; 5 means “five or more”; a price of zero creates a free tier. Registration always checks priceOf, so changing prices needs no migration.
The owner can pause() registration, while transfers and burns remain available and existing names keep resolving. Non-upgradeability makes the address and rules stable; it also means a flawed rule can only be contained by pausing registration, not hot-swapped.
The entire registration fee is burned; the protocol earns no revenue from it. That defines what FNS is: not a business sustained by renewals, but a naming layer paid once and built to stay.
07Boundaries and risks
The practical risk is not a contract exploit but a misdirected transfer. A name resolves only to its current holder; if the name changes hands, every later transfer addressed by name goes to the new holder. Senders should always display the resolved 0x address and warn when the resolved address changed recently. The full history is on chain, and the explorer indexes it by tokenId.
Reverse display carries an impersonation risk, so every client that shows a primary name should verify forward. reverseOf already checks the holder and active state, but that does not replace the caller's check: only when resolve(reverseOf(addr)) == addr is it safe to show the name next to the address.
A name is not an asset container or a permission token. It does not give its holder access to funds, data, or Agent Keys, and transferring it does not affect any of them. Treat it as a memorable label for a receiving address, not as an account that holds things.
Two final boundaries: registration is non-refundable, so a typo is permanent; and there is no rename. The only remedy is to burn and register again, if the name is still available. Once burned, anyone can take the name at the current price.
08Contract surface
priceOf(string) → uint256 // exact msg.value
register(string) payable // mint + active, fee burned
resolve(string) → address // 0 if unknown / inactive
reverseOf(address) → string // "" unless owner + active
setActive(uint256, bool) // owner only
setPrimary(uint256) // owner + active only
clearPrimary()
burn(uint256) // releases the name
isReserved(string) → bool
primaryTokenOf(address) → uint256
The explorer entry point is https://names.falari.xyz. The page queries priceOf live, shows availability, connects a wallet, and submits the registration; once minted, the name can be set as primary or deactivated under “My names”. Global search accepts alice or alice.far, and sends unregistered names to the registration page.
FNS answers one question: who does this name point to now? It does not custody assets, grant permissions, or promise that a name will never change hands. Checking the 0x address before sending is the step every name system still requires.
FNS in one sentence: pay once, hold an ERC-721 permanently; the name resolves only to its current holder; transfer clears resolution, burn releases the name, and the registration fee never becomes anyone's revenue.
Sources
- evm/contracts/names/src/FalariNames.sol — registration, resolution, primary names, reserved words, pricing
- evm/contracts/names/deployments/falari-devnet-1.json — v4 address and effective price overrides
- docs/development/23-falari-names.md — rules, API, explorer integration
- names.falari.xyz — live price lookup and registration flow