<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[DEXignation - Medium]]></title>
        <description><![CDATA[DEXignation explores decentralized identity, human-readable wallet naming, and the future of Web3-native digital presence. - Medium]]></description>
        <link>https://medium.com/dexignation?source=rss----133383133ed1---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DEXignation - Medium</title>
            <link>https://medium.com/dexignation?source=rss----133383133ed1---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:54:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/dexignation" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Two Ways to Price a Name: Auctions Come to DEXignation]]></title>
            <link>https://medium.com/dexignation/two-ways-to-price-a-name-auctions-come-to-dexignation-56221c2eccd9?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/56221c2eccd9</guid>
            <category><![CDATA[auction]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 11:05:45 GMT</pubDate>
            <atom:updated>2026-06-19T11:05:43.829Z</atom:updated>
            <content:encoded><![CDATA[<p>A fixed price answers one question — *will you pay this?* It does not answer the more interesting one: *what is this name actually worth?* For a generic name that is fine; the seller picks a number and waits. But for a name people genuinely compete for, a fixed price either leaves money on the table or scares everyone off. So we added auctions to DEXignation — two kinds, because there are two very different situations a seller can be in.</p><p>This post is about why both exist and how each one works.</p><p>## The problem a fixed price can’t solve</p><p>Imagine two names. One is ordinary; a handful of people might want it, and any of them would happily pay a set price. The other is the kind several people will fight over. If you put the contested name up at a fixed price, you are guessing — set it too low and the first buyer captures all the upside, set it too high and it sits unsold while you wonder if you misjudged. The market knows what the name is worth far better than the seller does. An auction is simply the mechanism that lets the market say so.</p><p>That is the English auction: bidders push the price up until only one remains, and the name goes to whoever valued it most. It is the right tool when there is competition to harness.</p><p>But competition is exactly what a young marketplace lacks. Early on there may be only a few interested buyers for any given name, and an ascending auction with one bidder is just a slow fixed price. For that situation — and especially for releasing a batch of premium names before a crowd has formed — the descending Dutch auction is the better fit. So we built both.</p><p>## The English auction: let bidders compete, safely</p><p>The mechanics most people picture when they hear “auction” are the ascending kind, and the version that has become standard across NFT marketplaces carries four safeguards we adopted directly.</p><p>The first is **escrow**. When you bid, your stablecoin moves into the contract and is held there. This sounds like a small detail but it removes an entire failure mode: the winner can never turn out to be unable to pay, because they already have. The second is **pull refunds**. When someone outbids you, your funds are not pushed back to you automatically — they are credited to a ledger, and you withdraw them yourself. Auto-sending refunds seems friendlier, but it hands a hostile bidder a weapon: a contract that refuses to receive funds could make every refund fail and freeze the whole auction. Letting each bidder pull their own refund closes that door.</p><p>The third safeguard is **anti-snipe**. Without it, the winning move is to bid in the final second, denying everyone else a chance to respond — which punishes honest bidders and suppresses the price. So a bid inside the closing window pushes the deadline outward. The auction ends only when bidding actually stops, not when the clock happens to run out mid-contest. The fourth is a **minimum increment**: each new bid must beat the current top by a set margin, so the auction moves in meaningful steps rather than a war of one-unit raises.</p><p>Settlement deserves a note, because it is where a subtle bug lived until our tests caught it. After the auction closes, anyone can call settle — not just the winner — so the auction can never get stuck waiting on a particular person. Settlement pays the seller and transfers the name in one atomic step. But what if, by the time settlement runs, the seller has moved the name elsewhere? The tempting answer is to reject the settlement. That turns out to be wrong: rejecting it would also undo the bookkeeping that credits the winner’s refund, trapping their escrowed money. The correct behavior is to end the auction gracefully, credit the winner so they can withdraw, and simply skip the transfer. Writing the test first is what surfaced this; it is exactly the kind of thing that quietly loses user funds in production.</p><p>## The Dutch auction: a price that comes down to meet you</p><p>The Dutch auction runs the other direction. The price starts high and descends in steps — holding for a set interval, then dropping by a fixed amount, again and again, down to a floor. The first person willing to buy at the current step gets the name immediately. There is no bidding and no escrow; it is, in effect, a fixed price that keeps lowering itself until someone says yes. That is why it works with almost no users: it never needs two buyers to function, only one.</p><p>We made one firm decision here: every step price must be a clean whole number. A name that ticks from 1,000,000 down to 950,000 to 900,000 is legible; one that lands on 947,361.5 is not. So the per-step drop can be given two ways — as a percentage of the start price, or as a flat amount — but in the percentage case the contract refuses to create the auction unless the math divides evenly into a whole number. There are no fractional prices anywhere, by construction. When the price reaches the floor it stays there, and the name remains buyable at that floor indefinitely.</p><p>This makes the Dutch auction the natural tool for an initial release. A batch of reserved premium names can each start high and descend on its own schedule; buyers who value a name highly buy early, and the rest find their level as the price comes down. No crowd required.</p><p>## One name, one state</p><p>A name can be listed at a fixed price, or on an English auction, or on a Dutch auction — but never more than one at a time. This is not an arbitrary rule; it follows from the fact that a name is a single token. If it were listed and auctioned simultaneously, a fixed-price buyer could snatch it mid-auction, leaving bidders with escrowed funds and no name. The contracts enforce the rule by checking one another, and the name’s on-chain card reflects whichever state it is in: a quiet mint “LISTED” label, or an amber “AUCTION” one, never both. A seller can always cancel one path and move to another — the exclusion is about any single moment, not about locking the seller into a choice.</p><p>## Where this leaves us</p><p>A name’s value is not a number the seller decrees; it is something the market discovers. Fixed price, English auction, and Dutch auction are three different conversations a seller can have with that market — *pay this, or don’t*; *show me what you’ll pay*; *I’ll keep lowering until you do*. Each fits a different name and a different moment. Together they turn a `.dex` name from a static listing into something with a real price-discovery mechanism behind it — which, for anyone deciding whether a name is worth owning, is most of the point.</p><p>— -</p><p>*DEXignation issues `.dex` names as on-chain NFTs with fully on-chain artwork. This post describes the English and Dutch auction contracts that sit alongside the fixed-price marketplace for secondary sales.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56221c2eccd9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/two-ways-to-price-a-name-auctions-come-to-dexignation-56221c2eccd9">Two Ways to Price a Name: Auctions Come to DEXignation</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Selling a Name Without Handing Over the Keys: DEXignation’s On-Chain Marketplace]]></title>
            <link>https://medium.com/dexignation/selling-a-name-without-handing-over-the-keys-dexignations-on-chain-marketplace-8ee02aa228b1?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ee02aa228b1</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[dex]]></category>
            <category><![CDATA[nft-marketplace]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Fri, 19 Jun 2026 11:05:37 GMT</pubDate>
            <atom:updated>2026-06-19T11:05:36.431Z</atom:updated>
            <content:encoded><![CDATA[<p>When you list a domain name for sale on most platforms, you hand custody to an escrow or grant a marketplace sweeping permission over your entire wallet. We wanted something different for `.dex` names: a way to put a name up for sale where the name never leaves your wallet until someone actually pays for it, and where the marketplace can never touch anything except the one name you chose to sell.</p><p>This post walks through how the DEXignation marketplace works and the decisions behind it.</p><p>## The shape of the problem</p><p>A `.dex` name is an ERC-721 NFT issued by our registrar. Selling one should feel obvious: set a price, and when a buyer pays it, the name is theirs. But the obvious version hides three traps.</p><p>The first is custody. If listing a name means transferring it into a marketplace contract, the seller has to trust that contract to hold their asset and give it back on cancel. That is a lot of trust for the simple act of advertising a price.</p><p>The second is approval scope. The common shortcut is to grant `setApprovalForAll`, letting the marketplace move *any* of your NFTs. It is convenient and it is exactly how a compromised marketplace drains wallets.</p><p>The third is settlement. If payment and transfer are two separate steps, there is always a window where one happened and the other did not — the buyer paid but the name did not move, or vice versa.</p><p>## Our answer: approval, not custody</p><p>The marketplace is a separate contract from the registrar, and it never holds names. To list, a seller does two things: approve the marketplace for that single token, then call `list` with a price denominated in a stablecoin. The name stays in the seller’s wallet the entire time it is listed. The approval is the only thing the seller grants, and it is scoped to exactly one token — not the whole collection.</p><p>When a buyer comes along, they approve the stablecoin and call `buy`. Inside that one transaction, the contract pulls the buyer’s USDC, pays the seller, transfers the name to the buyer, and closes the listing. If any part fails, all of it reverts. There is no window. A buyer cannot pay without receiving the name, and a seller cannot lose the name without being paid.</p><p>Because the price is set directly in a stablecoin’s units, there is no currency conversion and therefore no price oracle. That removes an entire category of failure — the stale or manipulated price feed — that has caused real losses elsewhere.</p><p>## Why the marketplace is its own contract</p><p>It would have been simpler, in one sense, to bolt the selling logic onto the name contract itself. We deliberately did not. Trading logic — fees, pricing rules, the mechanics of a purchase — evolves. The names themselves are the asset and should be stable. Keeping them in separate contracts means we can improve or replace the marketplace without ever redeploying the contract that holds everyone’s names. If a bug surfaces in trading, the names are untouched. This is the same separation that established naming and trading systems converged on, and for the same reason.</p><p>## Subnames come along for the ride</p><p>A `.dex` name can have subnames — think `pay.roy.dex` under `roy.dex`. A subtle question follows: when someone sells `roy.dex`, what happens to everything beneath it?</p><p>In our design, subnames are records owned hierarchically by the parent, not independent tokens. So when the parent name transfers to a buyer, control of the whole subtree moves with it automatically. Buying `roy.dex` means buying everything under `roy.dex`. The buyer receives a complete tree, which is exactly what makes a whole-name sale safe — nobody is left holding a fragment that someone else can later pull out from under them.</p><p>We support whole-name trades and only whole-name trades, precisely to avoid the one unsafe configuration: selling a subname away from its parent, where a later sale of the parent could strip the subname’s new owner. By keeping the marketplace to whole names, that risk simply does not exist.</p><p>## A quieter way to show “for sale”</p><p>Each `.dex` name renders as a hexagonal card, drawn entirely on-chain, with a color that reflects how long the name is secured for. We wanted listed names to signal their status without shouting it. So while a name is listed, its card shows a small, restrained `LISTED` label in mint green near the bottom — no banner, no price stamped across the art, nothing covering the name.</p><p>What makes this work cleanly is that the card asks the marketplace, at the moment it is rendered, whether the name is currently listed. The seller does not perform any extra step to make the mark appear or disappear; listing and cancelling are the only actions, and the card reflects reality on its own. The lookup is defensive: if the marketplace were ever paused or replaced, the card still renders — just without the mark — so a name’s artwork can never be broken by the trading layer.</p><p>## What we verified</p><p>The behavior described here is not aspirational; it is covered by an integration test suite that exercises the full path: register a name, list it, confirm the card shows the mark, have a fresh address pay in stablecoin and receive the name, confirm the funds split correctly and the mark clears, and confirm that a subname follows its parent to the buyer. The suite also pins down the guards — a listing whose seller has since moved the name cannot be bought, only the owner can list, only the seller can cancel, the protocol fee is capped, and payment runs through battle-tested safe-transfer logic.</p><p>## Where this fits</p><p>A name is more useful when it can change hands safely. The marketplace is the piece that lets `.dex` names move between people without custody risk, without over-broad permissions, and without the settlement gaps that make secondary trading nerve-wracking. It is intentionally small — listing, price updates, cancellation, and atomic purchase — because a small, auditable surface is the right foundation for something that handles other people’s assets.</p><p>The name stays yours until someone pays for it. Then, in a single step, it is theirs. That is the whole idea.</p><p>— -</p><p>*DEXignation is a naming service issuing `.dex` names as on-chain NFTs with programmable, fully on-chain artwork. This post describes the fixed-price marketplace for secondary sales.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ee02aa228b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/selling-a-name-without-handing-over-the-keys-dexignations-on-chain-marketplace-8ee02aa228b1">Selling a Name Without Handing Over the Keys: DEXignation’s On-Chain Marketplace</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Names That Route Money: A Tour of DEXignation]]></title>
            <link>https://medium.com/dexignation/names-that-route-money-a-tour-of-dexignation-a9093d20220a?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/a9093d20220a</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[dex]]></category>
            <category><![CDATA[domain-names]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 09:15:33 GMT</pubDate>
            <atom:updated>2026-06-18T09:15:31.762Z</atom:updated>
            <content:encoded><![CDATA[<p>Most blockchain addresses look like `0x1DaDBb206a05b2821935c467015C77fD61e02951`.<br>Nobody can read that, nobody can remember it, and one transposed character sends<br>funds into the void. The whole point of a naming service is to put a human layer<br>over that — to let `roy.dex` stand in for the unreadable string underneath.</p><p>DEXignation is a naming service on Polygon, in the same family as ENS but with a<br>few opinions of its own. This is a tour of what it is, how the pieces fit<br>together, and the design choices that shaped it. No prior knowledge of naming<br>services assumed.</p><p>## A name is an NFT, but that’s not the interesting part</p><p>Every `.dex` name is an ERC-721 NFT. You register `roy.dex`, you own a token, and<br>you can transfer or sell it like any other NFT. That part is table stakes.</p><p>The interesting part is what the name *does*. A name is a routing target. It can<br>resolve to:</p><p>- a wallet address (so people can pay `roy.dex` instead of a hex string),<br>- text records (email, a website, social handles),<br>- a content hash (an IPFS site, say),<br>- a localized profile (display name, bio, avatar — with per-language fallback),<br>- and an agent record: identity and payment routing for an AI agent operating<br> under that name.</p><p>That last one is a bet on where things are going. As autonomous agents start<br>holding value and transacting, “who is this agent and where does it get paid”<br>becomes a real question, and a name is a natural place to answer it.</p><p>## How the system is organized</p><p>Under the hood, DEXignation isn’t one contract — it’s a set of them, each with a<br>single clear job. The arrangement matters because it’s what lets the system stay<br>comprehensible and upgradeable.</p><p>At the center is the **registry**. It’s the single source of truth for one<br>question: who owns a given name? Everything else defers to it. When the resolver<br>needs to know whether you’re allowed to edit `roy.dex`, it asks the registry.</p><p>The **registrar** is the ERC-721 contract — it mints names as NFTs, tracks their<br>expiry, and renders the on-chain artwork. It owns the `.dex` top-level domain in<br>the registry, which gives it the authority to create individual names underneath.</p><p>The **resolver** holds the actual records — the addresses, text, profiles, and so<br>on. It’s where resolution data lives, separate from ownership data.</p><p>The **controller** is the front door. It’s what users actually call to register<br>and renew names. It orchestrates pricing, discounts, payment, and the<br>commit-reveal flow (more on that shortly), then delegates the actual minting to<br>the registrar.</p><p>Around these sit smaller specialists: a **price oracle** that converts USD prices<br>into live POL amounts, a **reservations** contract for protecting brand names, and<br>optional modules for subname sales, subscription renewals, and discount<br>eligibility. The division means a change to, say, pricing logic doesn’t touch the<br>contract that holds everyone’s ownership records.</p><p>## Pricing: fixed in dollars, paid in crypto</p><p>Names are priced in USD — a one-year registration is a fixed dollar amount, with<br>longer terms priced accordingly. But you pay in POL (or a stablecoin), so the<br>contract has to convert.</p><p>It does this through a Chainlink price feed, reading the live POL/USD rate at the<br>moment of payment. There’s a guard worth mentioning: if the feed’s data is older<br>than a set window, the contract refuses to quote a price at all. A naming service<br>that blindly trusts a stale or frozen oracle could charge wildly wrong amounts;<br>refusing to operate on stale data is the safer failure mode. (This same guard is<br>what made testnet deployment interesting, since test networks often have neglected<br>feeds — but that’s a story for the engineering write-up.)</p><p>## Registration is a two-step handshake</p><p>You can’t just register a name in one transaction. If you could, anyone watching<br>the mempool could see your pending registration, copy the name into their own<br>transaction with a higher fee, and snatch it out from under you. This is<br>front-running, and naming services are a classic target.</p><p>DEXignation defends against it with commit-reveal. First you submit a *commitment*<br> — a hash that encodes the name, the owner, the duration, and a secret, without<br>revealing the name itself. After a short mandatory wait, you *reveal* by<br>submitting the actual details. The contract re-derives the commitment and checks<br>it matches.</p><p>The elegance is that the commitment binds *all* the parameters. An attacker who<br>sees your reveal can’t swap in a different name, owner, duration, or payment<br>token — any change produces a different commitment that won’t match. The mempool<br>sees nothing useful during the commit phase, and the reveal can’t be tampered<br>with. It’s a small amount of friction (two transactions, a short wait) in<br>exchange for closing a whole class of attacks.</p><p>## The NFT itself tells a story</p><p>Because names are NFTs, they have artwork — and DEXignation generates it entirely<br>on-chain, no external image hosting. The art encodes the name’s status. Longer<br>registrations earn higher tiers, shown as a color progression from charcoal up<br>through to gold. The tier ratchets *up* as you renew and accumulate time, but<br>never ratchets back down — a name that reached gold stays gold. And an expired<br>name renders in red, a visible signal that it’s lapsed.</p><p>It’s a small touch, but it means the token’s appearance is an honest reflection<br>of its history and standing, computed from on-chain state rather than asserted by<br>a metadata server that could change or vanish.</p><p>## Discounts, subnames, and subscriptions</p><p>A few features round out the system:</p><p>- **Discounts** reward participation. Holding a certain token, holding a<br> contributor badge (a soulbound token), or staking can each qualify you for a<br> discount. Crucially they don’t stack — you get the single largest one you<br> qualify for, and every discount is capped, so the math can never run away.<br>- **Subnames** let a name owner sell names beneath their own — `shop.roy.dex` — <br> with revenue split between the protocol and the parent owner, and optional<br> gating so only token or badge holders can buy.<br>- **Subscriptions** allow automatic renewal via stablecoin, so a name you care<br> about doesn’t lapse because you forgot a date. Renewals respect a price cap you<br> set, so a spike in cost won’t drain your wallet unexpectedly.</p><p>None of these are load-bearing for the core idea, but together they make a name<br>feel less like a one-time purchase and more like a living asset.</p><p>## The guarantee that ties it together</p><p>There’s one invariant the whole system is built to protect: a name’s ownership,<br>its control, and its resolution always move together. If you transfer the NFT, the<br>right to edit the name’s records moves with it, and the previous owner’s records<br>stop resolving. A name can’t point at someone who no longer owns it.</p><p>Getting that right turned out to be the hardest and most important engineering<br>work in the project — hard enough that it has its own write-up. The short version:<br>naming services have a quietly catastrophic failure mode where a name keeps<br>pointing at its old owner after a sale, silently routing funds to the wrong<br>person. Closing that gap, and proving it closed across 155 tests and a live<br>deployment, is what separates a naming service you can trust with money from one<br>you can’t.</p><p>## Why it’s built this way</p><p>If there’s a theme to DEXignation’s design, it’s that **a name is a promise about<br>where value goes**, and every choice serves keeping that promise honest: separate<br>contracts so responsibilities stay clear, an oracle that refuses stale data,<br>commit-reveal so names can’t be stolen at registration, on-chain art that can’t<br>lie about status, and above all the guarantee that resolution never outlives<br>ownership.</p><p>A readable name is the easy part. A *trustworthy* one — that’s the work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9093d20220a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/names-that-route-money-a-tour-of-dexignation-a9093d20220a">Names That Route Money: A Tour of DEXignation</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bug That Doesn’t Throw: Making NFT Name Transfers Safe on DEXignation]]></title>
            <link>https://medium.com/dexignation/the-bug-that-doesnt-throw-making-nft-name-transfers-safe-on-dexignation-a75bf99d70e8?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/a75bf99d70e8</guid>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[dex]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Thu, 18 Jun 2026 09:15:24 GMT</pubDate>
            <atom:updated>2026-06-18T09:15:23.246Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a category of smart-contract bug that never reverts, never logs an<br>error, and never trips a test you didn’t think to write. It just quietly sends<br>someone’s money to the wrong person. We found one in our own naming service<br>before launch — and the story of fixing it is really a story about what it means<br>for a name to *belong* to someone on-chain.</p><p>## What a name is supposed to do</p><p>DEXignation issues `.dex` names as ERC-721 NFTs on Polygon. A name like<br>`roy.dex` isn’t decorative — it’s a routing target. You send funds to `roy.dex`,<br>an agent pays `roy.dex`, a profile resolves from `roy.dex`. The entire value of<br>a name is that it points to the address its **current owner** controls.</p><p>So a name has two halves that must always agree: the **NFT** (who owns it) and<br>the **resolution** (where it points). The moment those two drift apart, the name<br>lies.</p><p>## The drift</p><p>Here’s the scenario that should keep any naming-service author up at night. Alice<br>owns `roy.dex`. She sells the NFT to Bob — a normal ERC-721 transfer, the kind<br>every marketplace does. Bob now holds the token. Someone sends funds to<br>`roy.dex`.</p><p>In our v1 contracts, those funds went to **Alice**.</p><p>The NFT moved. The resolution didn’t. `roy.dex` kept pointing at Alice’s address<br>because nothing in the system connected “the token changed hands” to “the name’s<br>records should change too.” No revert. No event. No failing test. Just value<br>flowing to someone who no longer owned the name.</p><p>It’s worth sitting with how ordinary the triggering action is. This isn’t an<br>exotic attack that requires a malicious contract or a carefully crafted<br>transaction. It’s a sale. The single most common thing anyone does with an NFT<br>is the thing that breaks the invariant. A bug that only fires under adversarial<br>conditions is bad; a bug that fires under the *intended* happy path is a<br>different order of problem.</p><p>## Why it drifted</p><p>When we traced it through the code, the gap wasn’t one broken line — it was a<br>missing connection between three contracts that each worked fine on their own.</p><p>The registrar (the ERC-721) had no transfer hook, so a transfer changed<br>`ownerOf` and nothing else. The registry kept its own ownership record — the one<br>that actually gates who can edit a name’s resolution — and it only updated when<br>someone manually called a reclaim function. A plain NFT sale never did. And the<br>resolver, which stored the actual records, had no concept of “these belonged to<br>a previous owner,” so every stale record survived the transfer fully intact.</p><p>Three contracts, three reasonable designs, and a fund-loss bug living in the<br>space between them. That’s the uncomfortable lesson: the dangerous bugs often<br>aren’t *in* a component, they’re in the assumptions about how components relate.<br>Each contract had a clear, defensible contract with the world. What no one owned<br>was the cross-contract guarantee — the promise that ownership, control, and<br>resolution move together as one unit. Guarantees that span components tend to be<br>nobody’s job until they fail.</p><p>## The fix: clear the records, but keep the history</p><p>Two decisions mattered.</p><p>First, *when* to clear a name’s records. The answer is the obvious one — on every<br>genuine transfer of ownership. The interesting part was hooking into the ERC-721<br>transfer lifecycle itself, so that the act of moving the token *is* the act of<br>moving control. No separate call to remember, no way to forget. In OpenZeppelin’s<br>ERC-721, every mint, transfer, and burn funnels through a single internal<br>`_update` function. Override that one method and you have a chokepoint that no<br>transfer path can route around — `transferFrom`, `safeTransferFrom`, and<br>operator-initiated transfers all pass through it. That property mattered later,<br>when we wanted to be sure no marketplace flow could sneak past the hook.</p><p>Second, *how* to clear them. The naive approach is to delete each record. But<br>Solidity mappings can’t be enumerated — to delete every record you’d have to<br>already know every key ever written, across addresses, text entries,<br>contenthashes, profiles, ABIs, and agent records. That’s expensive and, worse,<br>it’s the kind of thing that silently misses a key one day. You’d add a seventh<br>record type a year from now, forget to add it to the deletion routine, and<br>reintroduce the exact bug you thought you’d killed.</p><p>Instead we version the records. Every record lives under a version number, and a<br>transfer just increments it. One cheap operation makes every record kind from<br>the old owner unreachable at once — nothing to enumerate, nothing to miss. Each<br>mapping went from being keyed by `node` to being keyed by `node` and the node’s<br>current version; every read and write threads through the live version. Bump the<br>version and the entire previous namespace falls out of view in a single<br>storage write.</p><p>This also quietly fixes the future-proofing problem. A new record type added<br>later is automatically covered, as long as it follows the same `[node][version]`<br>convention — there’s no separate list to keep in sync. The invalidation isn’t a<br>routine that has to know about every record kind; it’s a property of how records<br>are addressed.</p><p>And there’s a bonus that fit our priorities exactly: the old records don’t get<br>destroyed, they get *superseded*. They remain on chain under the previous<br>version. So the name still has a complete, auditable history of who controlled<br>it and where it pointed at each stage — which, for a service where names route<br>money, is something we actively wanted rather than something to discard. (If<br>this sounds familiar, it’s the same versioning approach ENS’s resolver has used<br>in production for years.)</p><p>We added one more constraint while we were here: only the registrar can trigger<br>an invalidation. The version bump is gated so that no external account — not even<br>the contract owner — can reach in and reset someone else’s records. The only<br>thing allowed to invalidate a name is the act of transferring it. That closes a<br>griefing vector where an attacker might otherwise force-clear a name they don’t<br>own.</p><p>## The subtlety: registration is also a transfer</p><p>The cleanest bugs to fix are the ones whose fix introduces a new bug, and we hit<br>ours immediately. After wiring up the transfer hook, a test that had passed for<br>months started failing: freshly registered names had no address record.</p><p>The cause was a nice piece of irony. Our registration flow delivers the NFT by<br>having the controller mint the token to *itself*, set the initial address<br>record, then transfer the token to the buyer. That final transfer is — correctly<br> — detected by our new hook, which dutifully invalidated the address we’d just<br>set. The safety mechanism was working perfectly; it just couldn’t tell “delivery<br>to a new owner” apart from “resale to a new owner.”</p><p>The fix was to teach it the difference. Transfers originating from a registration<br>controller are deliveries, not resales, so they skip invalidation. Every other<br>user-to-user transfer invalidates. One condition — checking whether the sender is<br>a known controller — and the two cases that look identical to ERC-721 become<br>distinct to us.</p><p>I want to dwell on this for a second, because the failing test is the hero of the<br>story. Nothing about the new feature was wrong. The hook did exactly what it was<br>designed to do. The only reason we didn’t ship a broken registration flow is that<br>a regression test from months earlier asserted something concrete — “a freshly<br>registered name resolves to its owner” — and that assertion turned a subtle<br>interaction into a red line in the terminal. Tests that encode the boring,<br>happy-path invariants earn their keep precisely when you change something<br>unrelated.</p><p>## Proving it</p><p>A fix to a never-throws bug is only as trustworthy as its tests, so we leaned<br>hard on them. The suite grew to 155 passing tests, including a battery that<br>registers a name, populates all six record kinds, transfers it, and asserts that<br>control moved to the new owner, every record reads empty, the old owner can no<br>longer write, the new owner can, resolution resumes once they do, and the version<br>counter advanced while the old records persisted on chain. A separate edge-case<br>set checks the corners: `safeTransferFrom`, approved-operator transfers,<br>sequential transfers that each bump the version, and that nobody but the<br>registrar can trigger an invalidation — not a random account, not even the<br>contract owner.</p><p>The shape of those tests matters as much as the count. For a silent bug, the<br>assertion you care about is the one about *absence* — that something is empty,<br>unreachable, no longer writable. Happy-path tests confirm presence; safety here<br>required confirming that the right things disappear at the right moment, and that<br>the wrong things don’t.</p><p>Then we left the lab. We deployed to Polygon’s Amoy testnet and ran the whole<br>thing on a live network — register, set records, transfer to a second wallet,<br>and read the chain back. Version incremented, control moved, records cleared.<br>The behavior held outside the deterministic comfort of a local test runner.</p><p>## What the testnet taught us that the local tests couldn’t</p><p>The local suite is a controlled world: time advances when you tell it to, the<br>price oracle says whatever you mocked, and gas is free. The live network is none<br>of those things, and that’s the point of going there.</p><p>The Amoy run surfaced a string of issues that simply can’t exist locally. The<br>testnet’s price feed was effectively dead — reads reverted — so we couldn’t even<br>quote a registration price until we deployed a mock feed in its place. The mock<br>itself then ran into our own staleness guard: the oracle refuses prices older<br>than a fixed window, a deliberate defense against a frozen feed, which meant the<br>mock’s timestamp had to be refreshed before each run. Then there was the gap<br>between a mock price and a sane registration cost, which we had to tune so a test<br>wallet could actually afford a name.</p><p>None of these were bugs in the transfer-safety work. They were reminders that<br>“it passes locally” and “it works on a network” are different claims, and the<br>distance between them is exactly where deployment surprises live.</p><p>## A deployment ordering bug, caught on mainnet</p><p>The sharpest lesson came at the very end. Our deployment wires the contracts<br>together in a sequence of post-deploy calls — grant the top-level domain to the<br>registrar, connect the resolver, and so on. One of those calls requires the<br>registrar to *already* own the domain node; otherwise it isn’t authorized to<br>make the connection.</p><p>On Amoy, this worked. On mainnet, it reverted with an authorization error.</p><p>The difference was ordering. The deployment tool doesn’t guarantee execution<br>order within a batch unless you declare the dependency explicitly, and on Amoy<br>the calls happened to land in a workable order by luck. Mainnet’s batching<br>arranged them differently, ran the dependent call first, and failed. The fix was<br>to state the dependency outright — this call runs *after* that one — so the order<br>is guaranteed rather than incidental.</p><p>It’s a humbling kind of bug: the code was identical on both networks, the tests<br>were green, and the only variable was an ordering we’d left implicit. “It worked<br>on the testnet” had quietly meant “it worked in one particular order that we<br>never actually chose.”</p><p>Only after fixing that did we redeploy cleanly, verify the source on PolygonScan,<br>confirm the registrar and resolver were wired to each other on-chain, and<br>register the first name on the new contracts.</p><p>## What we took away</p><p>The bugs that scare me most are the polite ones — the ones that don’t crash,<br>don’t alert, and look like correct behavior right up until someone loses money.<br>Defending against them isn’t really about clever code. It’s about noticing the<br>assumptions sitting in the gaps between your components, and writing the test<br>that turns a silent failure into a loud one.</p><p>A few things I’ll carry forward:</p><p>- **Invariants that span contracts need an owner.** The moment a guarantee<br> depends on two contracts agreeing, write down whose job it is to keep them in<br> sync — and enforce it in code, not convention.<br>- **Prefer mechanisms that can’t forget.** Versioning beats enumerated deletion<br> not because it’s clever but because it has no maintenance burden; new record<br> types are covered for free.<br>- **Let the boring tests guard the exciting changes.** The happy-path assertion<br> is what caught our regression. Don’t delete it because it “obviously passes.”<br>- **The testnet is not a smaller mainnet.** It’s a different environment that<br> agrees with mainnet most of the time, which is the most dangerous amount.</p><p>A name should never outlive its owner. Now, on DEXignation, it doesn’t.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a75bf99d70e8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/the-bug-that-doesnt-throw-making-nft-name-transfers-safe-on-dexignation-a75bf99d70e8">The Bug That Doesn’t Throw: Making NFT Name Transfers Safe on DEXignation</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bug That Doesn’t Throw: Making NFT Name Transfers Safe on DEXignation]]></title>
            <link>https://medium.com/dexignation/the-bug-that-doesnt-throw-making-nft-name-transfers-safe-on-dexignation-d7664e23270f?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/d7664e23270f</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[dex]]></category>
            <category><![CDATA[en]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 11:36:44 GMT</pubDate>
            <atom:updated>2026-06-16T11:36:42.777Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a category of smart-contract bug that never reverts, never logs an<br>error, and never trips a test you didn’t think to write. It just quietly sends<br>someone’s money to the wrong person. We found one in our own naming service<br>before launch — and the story of fixing it is really a story about what it means<br>for a name to *belong* to someone on-chain.</p><p>## What a name is supposed to do</p><p>DEXignation issues `.dex` names as ERC-721 NFTs on Polygon. A name like<br>`roy.dex` isn’t decorative — it’s a routing target. You send funds to `roy.dex`,<br>an agent pays `roy.dex`, a profile resolves from `roy.dex`. The entire value of<br>a name is that it points to the address its **current owner** controls.</p><p>So a name has two halves that must always agree: the **NFT** (who owns it) and<br>the **resolution** (where it points). The moment those two drift apart, the name<br>lies.</p><p>## The drift</p><p>Here’s the scenario that should keep any naming-service author up at night. Alice<br>owns `roy.dex`. She sells the NFT to Bob — a normal ERC-721 transfer, the kind<br>every marketplace does. Bob now holds the token. Someone sends funds to<br>`roy.dex`.</p><p>In our v1 contracts, those funds went to **Alice**.</p><p>The NFT moved. The resolution didn’t. `roy.dex` kept pointing at Alice’s address<br>because nothing in the system connected “the token changed hands” to “the name’s<br>records should change too.” No revert. No event. No failing test. Just value<br>flowing to someone who no longer owned the name.</p><p>## Why it drifted</p><p>When we traced it through the code, the gap wasn’t one broken line — it was a<br>missing connection between three contracts that each worked fine on their own.</p><p>The registrar (the ERC-721) had no transfer hook, so a transfer changed<br>`ownerOf` and nothing else. The registry kept its own ownership record — the one<br>that actually gates who can edit a name’s resolution — and it only updated when<br>someone manually called a reclaim function. A plain NFT sale never did. And the<br>resolver, which stored the actual records, had no concept of “these belonged to<br>a previous owner,” so every stale record survived the transfer fully intact.</p><p>Three contracts, three reasonable designs, and a fund-loss bug living in the<br>space between them. That’s the uncomfortable lesson: the dangerous bugs often<br>aren’t *in* a component, they’re in the assumptions about how components relate.</p><p>## The fix: clear the records, but keep the history</p><p>Two decisions mattered.</p><p>First, *when* to clear a name’s records. The answer is the obvious one — on every<br>genuine transfer of ownership. The interesting part was hooking into the ERC-721<br>transfer lifecycle itself, so that the act of moving the token *is* the act of<br>moving control. No separate call to remember, no way to forget.</p><p>Second, *how* to clear them. The naive approach is to delete each record. But<br>Solidity mappings can’t be enumerated — to delete every record you’d have to<br>already know every key ever written, across addresses, text entries,<br>contenthashes, profiles, ABIs, and agent records. That’s expensive and, worse,<br>it’s the kind of thing that silently misses a key one day.</p><p>Instead we version the records. Every record lives under a version number, and a<br>transfer just increments it. One cheap operation makes every record kind from<br>the old owner unreachable at once — nothing to enumerate, nothing to miss.</p><p>And there’s a bonus that fit our priorities exactly: the old records don’t get<br>destroyed, they get *superseded*. They remain on chain under the previous<br>version. So the name still has a complete, auditable history of who controlled<br>it and where it pointed at each stage — which, for a service where names route<br>money, is something we actively wanted rather than something to discard. (If<br>this sounds familiar, it’s the same versioning approach ENS’s resolver has used<br>in production for years.)</p><p>## The subtlety: registration is also a transfer</p><p>The cleanest bugs to fix are the ones whose fix introduces a new bug, and we hit<br>ours immediately. After wiring up the transfer hook, a test that had passed for<br>months started failing: freshly registered names had no address record.</p><p>The cause was a nice piece of irony. Our registration flow delivers the NFT by<br>having the controller mint the token to *itself*, set the initial address<br>record, then transfer the token to the buyer. That final transfer is — correctly<br> — detected by our new hook, which dutifully invalidated the address we’d just<br>set. The safety mechanism was working perfectly; it just couldn’t tell “delivery<br>to a new owner” apart from “resale to a new owner.”</p><p>The fix was to teach it the difference. Transfers originating from a registration<br>controller are deliveries, not resales, so they skip invalidation. Every other<br>user-to-user transfer invalidates. One condition, and the two cases that look<br>identical to ERC-721 become distinct to us.</p><p>## Proving it</p><p>A fix to a never-throws bug is only as trustworthy as its tests, so we leaned<br>hard on them. The suite grew to 155 passing tests, including a battery that<br>registers a name, populates all six record kinds, transfers it, and asserts that<br>control moved to the new owner, every record reads empty, the old owner can no<br>longer write, the new owner can, resolution resumes once they do, and the version<br>counter advanced while the old records persisted on chain. A separate edge-case<br>set checks the corners: `safeTransferFrom`, approved-operator transfers,<br>sequential transfers, and that nobody but the registrar can trigger an<br>invalidation.</p><p>Then we left the lab. We deployed to Polygon’s Amoy testnet and ran the whole<br>thing on a live network — register, set records, transfer to a second wallet,<br>and read the chain back. Version incremented, control moved, records cleared.<br>The behavior held outside the deterministic comfort of a local test runner.</p><p>Only then did we redeploy to mainnet, verify the source on PolygonScan, and<br>register the first name on the new contracts.</p><p>## What we took away</p><p>The bugs that scare me most are the polite ones — the ones that don’t crash,<br>don’t alert, and look like correct behavior right up until someone loses money.<br>Defending against them isn’t really about clever code. It’s about noticing the<br>assumptions sitting in the gaps between your components, and writing the test<br>that turns a silent failure into a loud one.</p><p>A name should never outlive its owner. Now, on DEXignation, it doesn’t.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7664e23270f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/the-bug-that-doesnt-throw-making-nft-name-transfers-safe-on-dexignation-d7664e23270f">The Bug That Doesn’t Throw: Making NFT Name Transfers Safe on DEXignation</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building DEXignation: A Web3 Naming Service on Polygon, From 37 Failing Tests to Mainnet]]></title>
            <link>https://medium.com/dexignation/building-dexignation-a-web3-naming-service-on-polygon-from-37-failing-tests-to-mainnet-db8c683efbe2?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/db8c683efbe2</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[dex]]></category>
            <category><![CDATA[domain-name-system]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[en]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 11:36:36 GMT</pubDate>
            <atom:updated>2026-06-16T11:36:34.830Z</atom:updated>
            <content:encoded><![CDATA[<p>When we set out to build DEXignation, the goal was simple to state and hard to do: take the proven ENS naming model, bring it to Polygon, and add the features the next generation of Web3 actually needs — agent payments, duration-tier NFTs, subscriptions, subname commerce — without reinventing the standards that already work.</p><p>This is the story of how we got from a test suite with 37 failures to a verified mainnet deployment, and the engineering decisions that shaped the product along the way.</p><p>## The guiding principle: reference, don’t reinvent</p><p>Early on, one principle settled most of our design debates: **point to what exists, build only what doesn’t.** The Web3 naming space already has battle-tested standards — EIP-634 for text records, EIP-1577 for content hashes, ENSIP-9 for multi-coin addresses. Re-implementing those from scratch would be both wasteful and risky.</p><p>So DEXignation completes the full ENS-standard surface rather than competing with it, and reserves original engineering for the genuinely new parts: how a name maps to an AI agent’s payment endpoint, how an NFT card visualizes commitment, how renewals can be automated without a central server.</p><p>## Starting from red</p><p>The first real milestone was unglamorous: a test suite with 37 failures. Three classes of bugs accounted for most of them.</p><p>The first was a coin-type encoding mismatch. Our resolver was registering EVM chains under one identifier scheme when the standard expected a plainer one. The fix was isolating coin-type handling into a small utility and aligning it with SLIP-44.</p><p>The second was resolver incompleteness — length limits on text and content records, and reads that didn’t account for name expiry. We made every resolver read expiry-aware: once a name lapses, its records return empty. This turned out to matter enormously later, because it’s exactly what prevents a wallet from sending funds to a name whose registration has expired.</p><p>The third was a grace-period mismatch between the contract and its tests. We kept the contract’s 70-day grace period as a deliberate product decision and corrected the test expectations.</p><p>From there, the suite climbed: 82 passing, then past 100, eventually to 142.</p><p>## The feature that taught us the most: duration-tier NFT cards</p><p>Every `.dex` name is an NFT, and we wanted the NFT’s artwork to mean something. The idea: color the card by how long the owner has committed to the name. A one-year holder gets a quiet charcoal card; a fifteen-year holder gets gold.</p><p>This sounds simple. It wasn’t — because the *rules* for how the color behaves encode a product philosophy, and we went back and forth on them.</p><p>The breakthrough was framing the color as a “best ever” badge rather than a live countdown. The tier ratchets up when you register or renew for longer, and it never ratchets down as time passes — so a fifteen-year gold card stays gold years later. The only exception is actual expiry, which turns the card red as a clear warning. This reconciles two instincts that felt contradictory at first: “buying long should be rewarded permanently” and “an expired name should be obvious.”</p><p>Two engineering decisions fell out of this:</p><p>**On-chain SVG, no filters.** The card is generated entirely on-chain as vector graphics. We deliberately avoided SVG `&lt;filter&gt;` effects — they render inconsistently across wallets and marketplaces and cost more gas. Gradients and a radial shine carry the premium look while staying deterministic and cheap.</p><p>**A boundary bug worth remembering.** When we mapped purchase duration to tier, we initially used a strict less-than comparison. The result: buying *exactly* one year landed you one tier too high, and the same off-by-one rippled through every tier. The symptom was unmistakable in testing — five of six tier colors were each shifted up by one, while only the top tier happened to look correct. Switching to less-than-or-equal fixed it. On a normal app this would be a quick patch; on an immutable NFT contract, catching it before deployment was the difference between a clean launch and permanently wrong artwork.</p><p>## Bridging to the agent economy, not competing with it</p><p>By 2026, AI agents transacting on their own behalf stopped being speculative. ERC-8004 gave agents an identity layer; x402 gave them an HTTP-native stablecoin payment standard backed by major players.</p><p>We had a choice: build our own agent payment rails, or bridge to the emerging standards. We bridged. A `.dex` name can now carry a record pointing to an agent’s identity and payment endpoint, and resolution is expiry-aware like everything else. The name becomes the human-readable handle in front of agent infrastructure — which is exactly the role a naming service should play.</p><p>## Permissionless auto-renewal</p><p>Letting names auto-renew is an old idea, but doing it without a central server is harder. Our approach: the owner pre-approves a stablecoin and registers renewal terms. After that, *anyone* can trigger the renewal — a keeper, a backend cron, the owner themselves. The contract re-validates the renewal window and re-checks the price against the owner’s cap before pulling funds, so permissionless never means unsafe. It even handles USDT’s non-standard approve so consecutive renewals don’t break.</p><p>## The deployment gauntlet</p><p>Shipping to mainnet surfaced two issues that unit tests can’t catch.</p><p>The first was a compilation profile mismatch. Hardhat 3 uses separate build profiles — and Ignition deploys with the production profile, which didn’t inherit the `viaIR` setting our tests used. The contracts compiled fine for testing but failed to deploy with a “stack too deep” error. The fix was defining the production profile explicitly so deployment compiled identically to testing — guaranteeing the code we tested is the code we shipped.</p><p>The second was a dead oracle feed. On the Amoy testnet, the documented Chainlink POL/USD feed had stopped responding — calling it reverted entirely. This blocked our price conversion from working, even though our code was correct. The diagnosis mattered: was it our bug or the testnet’s infrastructure? We confirmed it was the feed by calling it directly, then deployed our own mock aggregator on the testnet to substitute for the dead feed — swapping only that one external dependency, leaving the real conversion logic, registration, NFT generation, and resolution all under genuine test.</p><p>With the mock feed in place, the full flow finally ran end-to-end on a live network: prices converted across all five durations, a name registered through commit-reveal, the NFT rendered with the correct charcoal tier, text records and multi-coin addresses set and read back. Then mainnet, where the real Chainlink feed was alive and well — prices converted correctly on the first try.</p><p>## What we learned</p><p>A few things stand out.</p><p>Testing earned its keep. Every bug we caught — the coin-type mismatch, the off-by-one tier boundary, the compilation profile, the dead feed — would have been far more expensive after launch, and some would have been unfixable on immutable contracts.</p><p>The “reference, don’t reinvent” principle kept the surface area honest. We didn’t claim to invent text records or agent payment standards; we completed the standards and bridged to them. The genuine originality lives in the smaller, specific mechanisms — the tier-ratchet rule, the name-to-agent bridge, the permissionless-but-safe renewal.</p><p>And the distinction between unit tests and live-network verification is real. The contracts passed 142 unit tests and *still* surfaced two deployment-only issues. Walking the full path on a testnet before mainnet wasn’t ceremony — it was the step that caught what nothing else could.</p><p>DEXignation is now live on Polygon mainnet, source-verified, with the full feature set running. The naming layer is, in a sense, the easy-to-describe part. What it enables next — agent commerce, on-chain identity, a name you actually own — is where it gets interesting.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db8c683efbe2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/building-dexignation-a-web3-naming-service-on-polygon-from-37-failing-tests-to-mainnet-db8c683efbe2">Building DEXignation: A Web3 Naming Service on Polygon, From 37 Failing Tests to Mainnet</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Wrong Bit: How a Single Coin-Type Encoding Broke 37 Tests in Our ENS-Style Name Service]]></title>
            <link>https://medium.com/dexignation/one-wrong-bit-how-a-single-coin-type-encoding-broke-37-tests-in-our-ens-style-name-service-0c7f89ec85f9?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/0c7f89ec85f9</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[en]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[dex]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 05:20:44 GMT</pubDate>
            <atom:updated>2026-06-13T05:20:43.356Z</atom:updated>
            <content:encoded><![CDATA[<p>*A debugging story about ENSIP-11, SLIP-44, and why “it compiles” is the most dangerous kind of green.*</p><p>— -</p><p>When I ran the test suite for our `.dex` name-service contracts, the terminal told a brutal story: **45 passing, 37 failing.** Every one of the 37 died with the same four words.</p><p>```<br>reverted with reason string ‘Unsupported coin type’<br>```</p><p>Thirty-seven failures, one error message. That uniformity is a gift — it means there’s almost certainly a single root cause, not thirty-seven of them. This is the story of chasing that cause down, and the two more subtle bugs hiding behind it.</p><p>— -</p><p>## The clue in the stack trace</p><p>The first thing I noticed: the 45 passing tests never registered a name. They tested commitments, reservations, discount calculations, ERC-165 support — everything *except* the core `register()` path. The instant a test actually registered a `.dex` name, it reverted.</p><p>Every failing trace bottomed out in the same chain:</p><p>```<br>register → _executeRegister → DXResolver.setAddr → revert “Unsupported coin type”<br>```</p><p>So registration itself was sound. The death happened one step deeper, when the registrar tried to write the new name’s initial address record into the resolver. Our registrar does this atomically during registration so a freshly bought name resolves to its owner immediately — a nice UX touch that turned out to be the tripwire.</p><p>— -</p><p>## Two dialects of the same standard</p><p>Here’s the line that mattered, in the registrar:</p><p>```solidity<br>uint256 constant COIN_TYPE_POLYGON = COIN_TYPE_DEFAULT | CHAIN_ID_POLYGON;<br>IDXResolver(resolver).setAddr(subnode, COIN_TYPE_POLYGON, abi.encodePacked(owner));<br>```</p><p>`COIN_TYPE_DEFAULT` is `0x80000000`. So `COIN_TYPE_POLYGON` is not `137` — it’s `0x80000089`, the integer `2147483785`. The registrar was speaking **ENSIP-11**.</p><p>And here’s how the resolver validated it:</p><p>```solidity<br>supportedCoins[137] = “Polygon”; // plain 137<br>// …<br>require(bytes(supportedCoins[coinType]).length &gt; 0, “Unsupported coin type”);<br>```</p><p>The resolver was speaking **SLIP-44**. It looked up `supportedCoins[0x80000089]`, found nothing, and reverted. Both sides believed they were implementing the same multi-chain address standard. They were implementing two different layers of it.</p><p>— -</p><p>## Why this trap is so easy to fall into</p><p>ENS, over its history, used two schemes for identifying chains in address records:</p><p>- **SLIP-44** gives each chain a flat number. Ethereum is 60.<br>- **ENSIP-11** encodes EVM chains as `0x80000000 | chainId`. The high bit means “this is an EVM chain,” and the remaining bits hold the **chain id**.</p><p>The cruel part is Polygon. Its chain id is `137`. In a SLIP-44-flavored table you might also write `137`. They *look* identical, so a developer eyeballing the two files would see “137 here, 137 there” and move on. But the ENSIP-11 value carries the high bit, so it’s really `0x80000089`. And the moment you test Ethereum — chain id `1`, SLIP-44 `60` — the illusion of interchangeability shatters.</p><p>The bug compiled cleanly. It passed half the suite. It only exposed itself on the one path that crossed the boundary between the two contracts. That’s the most expensive kind of bug: the one that looks fine until it’s in front of a real user buying a real name.</p><p>— -</p><p>## The fix that was already half-written</p><p>The satisfying twist: the project *already had* a correct implementation. A small library, `EVMCoinUtils`, encoded the standard properly:</p><p>```solidity<br>uint256 constant COIN_TYPE_DEFAULT = 1 &lt;&lt; 31; // 0x80000000</p><p>function isEVMCoinType(uint256 coinType) internal pure returns (bool) {<br> return coinType == COIN_TYPE_DEFAULT || chainFromCoinType(coinType) &gt; 0;<br>}<br>```</p><p>The registrar imported it. The resolver didn’t. The fix was to make the resolver drink from the same well:</p><p>1. **Register EVM chains under their ENSIP-11 keys**, keep non-EVM chains (Bitcoin, Solana) on SLIP-44, and keep a legacy SLIP-44 `60` entry for Ethereum so old records still resolve.<br>2. **Validate EVM addresses through the shared library** instead of a hand-maintained list of chain numbers:</p><p>```solidity<br>if (EVMCoinUtils.isEVMCoinType(coinType)) {<br> require(addrBytes.length == 20, “EVM address must be 20 bytes”);<br> return;<br>}<br>```</p><p>3. **Import the constant rather than redefine it.** I was tempted to drop a `COIN_TYPE_DEFAULT` into the resolver, but that risks the exact drift we just fixed. One definition, imported everywhere.</p><p>I ran the suite again. **37 → 10.** Progress — and a surprise.</p><p>— -</p><p>## Behind the first bug, a second</p><p>The remaining 10 failures had nothing to do with coin types. Fixing the obvious bug had simply let the suite run far enough to expose what was hiding behind it.</p><p>The pattern was consistent: the resolver’s **interface** (`IDXResolver`) already declared a richer contract than the implementation delivered. The interface had error types like `TextKeyTooLong`, `ContenthashTooLong`. It had `setApprovalForAll`. It documented that reads should return empty data after expiry. The implementation had none of it.</p><p>When an interface is ahead of its implementation, the interface is usually the spec — it’s the promise the rest of the system was built against. So I finished the resolver to match:</p><p>- **Length limits** on text keys (64 bytes), values (1024 bytes), and content hashes (128 bytes), reverting with the interface’s own error types.<br>- **Expiry-aware reads**, so a name that has lapsed stops leaking its old records to whoever holds it next:</p><p>```solidity<br>function text(bytes32 node, string calldata key) external view returns (string memory) {<br> if (registry.isExpired(node)) return “”;<br> return textRecords[node][key];<br>}<br>```</p><p>- **Operator approval** (`setApprovalForAll` / `isApprovedForAll`), so an owner can delegate record management — table stakes for any serious name service.</p><p>**10 → 4.**</p><p>— -</p><p>## Behind the second bug, a test that lied</p><p>The final four were burn tests: a domain should become burnable once it’s been expired past its grace period. They reverted with `NotYetBurnable`, which carries a `burnableAt` timestamp in the error.</p><p>So I did the arithmetic. I took `burnableAt`, subtracted the registration duration, subtracted the grace period, and checked whether the result matched the test’s register time. With a 70-day grace period, it matched *exactly*. The contract’s math was flawless.</p><p>The test, on the other hand, had defined:</p><p>```ts<br>const GRACE_PERIOD = 30n * 24n * 60n * 60n; // 30 days<br>```</p><p>and fast-forwarded only `expiry + 30 days + 60 seconds`. Against a contract whose grace period is 70 days — a deliberate product decision, documented right there in the contract header — that timestamp is still inside the grace window. The contract was correctly refusing to burn a name that wasn’t burnable yet.</p><p>This was the inverse of the previous two stages. The first two times, the contract was wrong and the tests were right. This time the test was stale and the contract was correct. The fix was a one-line constant change in the test file:</p><p>```ts<br>const GRACE_PERIOD = 70n * 24n * 60n * 60n;<br>```</p><p>**4 → 0. Eighty-two passing.**</p><p>— -</p><p>## What I’d tell my past self</p><p>**A shared standard is not a shared implementation.** Both contracts “implemented ENSIP-11.” Only one imported the code that actually did. If a value encodes a protocol rule, it lives in exactly one place and everyone imports it. The cost of a redefined constant is a bug that compiles, passes half your tests, and waits for production.</p><p>**Let the interface lead.** When `IDXResolver` promised errors and functions the implementation didn’t have, the failing tests weren’t noise — they were the interface calling in its debts. An interface ahead of its implementation is a to-do list, not a discrepancy to paper over.</p><p>**Before you trust a test, find out who’s wrong.** It’s tempting to treat every red test as a contract bug. Two-thirds of mine were. The last third were the test lying. The only way to know is to compute the on-chain truth — that `burnableAt` value told me, unambiguously, that the contract was right.</p><p>**Green arrives in layers.** One opaque revert masked two more bugs underneath it. Each fix peeled back the next. If you’ve ever fixed “the bug” and watched a new wave of failures appear, that’s not regression — that’s your suite finally running deep enough to tell you the rest of the truth.</p><p>— -</p><p>*The contracts are part of DEXignation, a `.dex` blockchain name service. If you’re building anything that touches ENS-style multi-chain address records, internalize the ENSIP-11 vs SLIP-44 distinction before you write your first `setAddr` — it will save you a terminal full of red.*</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c7f89ec85f9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/one-wrong-bit-how-a-single-coin-type-encoding-broke-37-tests-in-our-ens-style-name-service-0c7f89ec85f9">One Wrong Bit: How a Single Coin-Type Encoding Broke 37 Tests in Our ENS-Style Name Service</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The week’s actual lesson]]></title>
            <link>https://medium.com/dexignation/the-weeks-actual-lesson-467c9a487197?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/467c9a487197</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[en]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 05:20:36 GMT</pubDate>
            <atom:updated>2026-06-13T05:20:35.497Z</atom:updated>
            <content:encoded><![CDATA[<p>Last week’s post was about subtraction: I deleted 1,000 lines of well-intentioned but over-engineered token mechanics because the simpler system was correct and the elaborate one was a distraction.</p><p>This week’s post is about a different kind of restraint. I added 200 lines, but they were exactly the 200 lines that nine years of ENS engineering had already validated. I didn’t add a “DEXignation flavor” to text records. I didn’t introduce a slightly-different `setText` signature with a “useful tweak.” I implemented the four standards verbatim and let nine years of tooling work for me.</p><p>There’s a phrase from the Unix world: *worse is better*. The Unix kernel doesn’t try to be elegant; it tries to be a thin, predictable layer that other things can build on. The text-records standard is the same: nothing about EIP-634 is elegant. The function signature includes a `string` parameter that the EVM doesn’t index well. The event emits the key both as `indexed` and non-indexed because indexed strings get hashed and become unreadable. It’s awkward. It’s what everyone uses.</p><p>And because it’s what everyone uses, I am — for the cost of 50 lines of resolver code — now compatible with everyone.</p><p>I don’t have a partnership team. I don’t have a business development department. I don’t have a tooling ecosystem of my own. I have a small `.dex` registry that conforms exactly to interfaces other people have already integrated. And that, for now, is enough.</p><p>Next week: Amoy redeployment with the full v1.0 contracts, then beta testing. After that — if the beta holds — Polygon mainnet.</p><p>The week after that, maybe I’ll start thinking about subdomain delegation.</p><p>But not before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=467c9a487197" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/the-weeks-actual-lesson-467c9a487197">The week’s actual lesson</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What I’m not doing (and why)]]></title>
            <link>https://medium.com/dexignation/what-im-not-doing-and-why-9be47252ffb9?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/9be47252ffb9</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 01:41:31 GMT</pubDate>
            <atom:updated>2026-06-12T01:41:30.288Z</atom:updated>
            <content:encoded><![CDATA[<p>Subdomain delegation is the obvious next feature. It’s also a sub-product with real design decisions:</p><p>- **Pricing model**: do subdomains cost USDC? Are they free to the parent owner? Can the parent set their own price?<br>- **Token vs record**: are subdomains themselves NFTs (like ENS NameWrapper) or just resolver records (like classic ENS)?<br>- **Revocation rights**: can the parent owner reclaim a subdomain at will? Or are there ENS-style “fuses” that lock down the parent’s power?<br>- **NFT marketplace implications**: if subdomains are NFTs and the parent can revoke them, marketplaces have an obvious trust problem. If they can’t be revoked, then a parent who delegates `wallet.alice.dex` to a third party can never get it back.</p><p>Each of these is a fork in the road for the entire product. I am not going to make four such decisions in a week, run a one-day audit on them, and ship to mainnet. That’s how you end up with a v2 that breaks every v1 holder.</p><p>So `subdomain.dex` waits for v1.1. There will be a dedicated design cycle, a dedicated audit, a dedicated launch. It might take a month. It might take three. What it will not do is ride along on this release because I felt like shipping it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9be47252ffb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/what-im-not-doing-and-why-9be47252ffb9">What I’m not doing (and why)</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The result]]></title>
            <link>https://medium.com/dexignation/the-result-af0d005bd61b?source=rss----133383133ed1---4</link>
            <guid isPermaLink="false">https://medium.com/p/af0d005bd61b</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Roy]]></dc:creator>
            <pubDate>Fri, 12 Jun 2026 01:41:23 GMT</pubDate>
            <atom:updated>2026-06-12T01:41:21.757Z</atom:updated>
            <content:encoded><![CDATA[<p>After the bugs were fixed and the contracts were in their proper directories, the test suite settled at:</p><p>```<br>79 passing (36s)<br>```</p><p>That’s the 49 baseline tests, the 21 new Resolver tests (text + contenthash + ERC-165), the 7 new burn tests, plus a couple of additional checks I’d forgotten about.</p><p>More importantly, the four ENS interface IDs now report `true` from `supportsInterface`. That means:</p><p>- **MetaMask** can show profile cards for `.dex` domains using its existing ENS code path.<br>- **IPFS-aware browsers** (Brave, Opera) can navigate to `.dex` domains pointing at IPFS sites with no further integration work.<br>- **OpenSea** can display avatar text records for `.dex` domain NFTs by reading the resolver the same way it reads ENS resolvers.<br>- **The official ENS app** could, in principle, resolve a `.dex` name. (It won’t, because its UI hardcodes `.eth`, but the resolver interface is interchangeable.)</p><p>None of these integrations required me to talk to anyone. No business development calls. No partnership announcements. No SDK to publish. The wallets and browsers don’t even know `.dex` exists. They just call `text()` and `contenthash()` and `addr(node, coinType)` on whatever resolver they’re pointed at, and the bytes that come back are formatted exactly as their existing parsers expect.</p><p>This is what standards do. This is what nine years of ENS engineering bought, and what I got to inherit for free by typing the right four function signatures.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af0d005bd61b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dexignation/the-result-af0d005bd61b">The result</a> was originally published in <a href="https://medium.com/dexignation">DEXignation</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>