Skip to content

DEXignation/dexignation-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEXignation (DXN)

A Polygon-native Web3 naming protocol. Inspired by ENS and extended with native token incentives, subname commercialization, and a built-in secondary market (fixed-price marketplace + English/Dutch auctions).

Register .dex names, resolve rich on-chain records, sell subnames with buyer-protecting sale-locks, stake DXN for discounts and rewards, and trade names on the native secondary market.

Why DEXignation

Existing naming services solve identity but leave commerce and incentives thin. DEXignation is built around three ideas:

  • Names as tradeable, rentable assets — registration is USD-priced (via Chainlink), names are ERC-721 NFTs, and a native marketplace + auctions make the secondary market first-class rather than an afterthought.
  • Subnames as a business — a parent name owner can price and sell subnames, and a sold subname is protected from the parent by a registry-level sale-lock until it expires. This makes subname issuance a real commercial primitive.
  • Aligned token economics — protocol revenue is split on-chain across treasury, stakers, burn, and buffer; DXN staking grants registration discounts and rewards, tying usage to the token.

Status

Live on Polygon Mainnet (chain 137).

  • 255 unit tests passing
  • External security audit complete — Beosin, all 8 findings Fixed (see docs/audit/)
  • All 16 contracts (12 core + 4 trading) deployed deterministically to 0xdeed010xdeed16 vanity addresses via the Arachnid CREATE2 proxy
  • Source verification (PolygonScan + Sourcify) pending against the final audited code

한국어로 보기

How it works

The protocol is five modules connected by well-defined cross-contract calls.

1. Domain lifecycle

  • DXRegistry — the root registry and single source of truth: each node's owner, resolver, expiry, and sale-lock state. Every parent-node mutation (reassign / revoke / setSubnodeOwner / setSubnodeRecord) routes through one internal guard so a sold subname cannot be seized while its sale-lock is live.
  • DXRegistrar — represents each .dex name as an ERC-721 NFT; on transfer it bumps a per-node version to batch-invalidate stale resolver records in O(1).
  • DXRegistrarController — the user-facing entry point: commit-reveal against front-running, USD-denominated pricing, a multi-tier discount system (ERC-20 balance / soulbound token / staking, non-stacking), and DXN reward minting.

2. Resolution

  • DXResolver — multi-chain addresses, text records, content hashes, multilingual text, and agent-identity records, all namespaced by a per-node version. Every read short-circuits on expiry, so funds are never routed to a previous owner after a name changes hands.
  • DXReverseRegistrar — EIP-181 reverse resolution (address → name).

3. Revenue & staking

  • RevenueDistributor — atomically splits ERC-20 protocol revenue across BPS-weighted destinations (treasury / staking / burn / buffer), invoking staking notification in the same transaction so no separate keeper is required.
  • DXNStaking — a Synthetix-style accumulator supporting multiple concurrent ERC-20 reward assets, with a minimum-stake threshold that neutralizes first-depositor / dust-stake attacks.

4. Secondary market

  • DXMarketplace — fixed-price listings.
  • DXEnglishAuction — ascending auction with an anti-snipe extension window.
  • DXDutchAuction — descending auction.

Cross-venue mutual-exclusion checks prevent the same name from being listed in two places at once.

5. Subname commerce

  • DXSubnameRegistrar — parent owners set per-subname prices and sell them; the registry's sale-lock protects the buyer until expiry. Parent-direct (free) issuance stays freely manageable; only sold subnames are locked.

Key characteristics

  • USD-priced registration via Chainlink POL/USD, with a LINK-routed fallback.
  • Version-based record invalidation — one storage write invalidates all prior resolver records on transfer.
  • Sale-lock as a first-class protection — enforced centrally in the registry, closing low-level bypass paths.
  • Deterministic, layered deployment — addresses are known before broadcast and ordered by dependency (deed01 = DXRegistry … deed16 = DXSubscriptionRenewer).
  • Owner-tunable trading parameters — auction fee / increment / extension are adjustable post-deploy without redeployment.

Deployed contracts

See docs/deployments.md for the full address table (deed01–deed16), external dependencies, and trading parameters.

Security

  • External audit by Beosin — report No. 202607031722 (Jul 3 2026): 3 Medium / 2 Low / 3 Info, all Fixed. Summary + report in docs/audit/.
  • Full contract source is public in contracts/ for independent review.
  • Report responsible-disclosure issues per SECURITY.md.

Build & test

npm install
npm run build        # hardhat compile
npm test             # hardhat test mocha — 255 passing

Stack: Hardhat 3 · viem · Hardhat Ignition · solc 0.8.28 (cancun) · OpenZeppelin 5.x · Chainlink Data Feeds · Polygon PoS.

Client integration

Contract addresses for app/backend clients are generated from the deployment files (single source of truth) — never hand-copied:

node tools/gen-addresses.mjs

Emits Flutter (.g.dart), Node.js/TypeScript (contracts.ts), Java (Contracts.java), a JSON map, and a Markdown table. Re-run after any redeploy to sync every platform at once.

License

See LICENSE.


DEXignation (DXN) — 한국어

Polygon 네이티브 Web3 네이밍 프로토콜. ENS에서 영감을 받아 네이티브 토큰 인센티브, 서브네임 상업화, 내장 2차 거래 시장(고정가 마켓플레이스 + 영국식/더치 경매)으로 확장했습니다.

왜 DEXignation인가

기존 네이밍 서비스는 신원은 해결하지만 상거래인센티브는 얕습니다. DEXignation은 세 가지 축으로 설계되었습니다:

  • 거래·임대 가능한 자산으로서의 이름 — 등록가는 Chainlink 기반 USD 책정, 이름은 ERC-721 NFT, 마켓플레이스와 경매로 2차 시장을 일급으로 지원.
  • 비즈니스로서의 서브네임 — 부모 이름 소유자가 서브네임에 가격을 매겨 판매하고, 판매된 서브네임은 만료까지 레지스트리 레벨 *판매-잠금(sale-lock)*으로 부모로부터 보호됩니다. 서브네임 발급이 단순 편의가 아니라 실제 상거래 수단이 됩니다.
  • 정렬된 토큰 이코노미 — 프로토콜 수익을 온체인에서 treasury/스테이커/소각/버퍼로 분배하고, DXN 스테이킹이 등록 할인과 보상을 제공해 사용과 토큰을 연결.

상태

Polygon 메인넷(chain 137) 라이브.

  • 255개 테스트 통과
  • 외부 보안 감사 완료 — Beosin, 8건 전부 Fixed (docs/audit/)
  • 16개 컨트랙트(코어 12 + 트레이딩 4)를 Arachnid CREATE2 프록시로 0xdeed01~0xdeed16 vanity 주소에 결정론적 배포
  • 소스 검증(PolygonScan + Sourcify)은 감사 최종 코드 기준 진행 예정

동작 구조 (5개 모듈)

  1. 도메인 라이프사이클DXRegistry(루트 레지스트리·판매잠금의 진실 원천), DXRegistrar(이름 NFT·전송 시 레코드 O(1) 무효화), DXRegistrarController (commit-reveal 등록·USD 결제·다중 할인·DXN 보상).
  2. 해석DXResolver(멀티체인 주소·텍스트·콘텐츠 해시·다국어·에이전트 신원, 만료 시 읽기 차단), DXReverseRegistrar(역방향 해석).
  3. 수익·스테이킹RevenueDistributor(원자적 BPS 분배), DXNStaking(다중 보상, 최소 스테이크 임계로 first-depositor 공격 차단).
  4. 2차 시장DXMarketplace, DXEnglishAuction(anti-snipe 연장), DXDutchAuction. 교차 등록 방지.
  5. 서브네임 커머스DXSubnameRegistrar. 판매된 서브네임만 만료까지 잠금, 부모-직접 발급은 자유롭게 관리 가능.

핵심 특징

  • Chainlink POL/USD 기반 USD 등록가 (LINK 경유 폴백)
  • 전송 시 버전 기반 레코드 무효화 (한 번의 쓰기로 이전 레코드 전부 무효)
  • 레지스트리에 중앙 집행되는 판매-잠금 (저수준 우회 경로 차단)
  • 결정론적 계층 배포 (deed01~16, 의존성 순서)
  • owner 조정 가능한 트레이딩 파라미터 (재배포 없이 수수료·증분·연장 튜닝)

보안

Beosin 외부 감사(리포트 No. 202607031722, 2026-07-03): Medium 3/Low 2/Info 3, 전부 Fixed. 컨트랙트 전체 소스는 contracts/에 공개되어 독립 검증이 가능합니다. 취약점 제보는 SECURITY.md를 따르세요.

빌드·테스트

npm install
npm run build
npm test             # 255 passing

클라이언트 연동

앱/백엔드 주소는 배포 파일(single source of truth)에서 자동 생성합니다:

node tools/gen-addresses.mjs   # Flutter / Node.js / Java 상수 생성

재배포 후 이 명령 한 번이면 전 플랫폼이 새 주소로 동기화됩니다.

Releases

Packages

Contributors

Languages