Names as keys

Turn ENS names into temporary, revocable digital keys for physical doors using ENSv2.

Names as keys

Created At

ETHGlobal Mumbai

Project Description

What if your ENS name could open a physical door?

Names as Keys is a decentralized access-control system that transforms ENSv2 names into temporary, revocable digital keys. Instead of relying on physical keys, RFID cards, shared PINs, or centralized guest databases, door owners can grant access through hierarchical ENS credentials linked to Ethereum wallets.

THE PROBLEM

Traditional access-control systems rely on centralized databases and proprietary infrastructure to manage who can enter a building, room, or protected space. Temporary access often requires issuing physical cards, sharing PIN codes, or maintaining guest lists.

These approaches introduce security risks, administrative overhead, and dependence on a central authority. A copied PIN can be reused, a lost key must be replaced, and access permissions are often difficult to verify independently.

OUR SOLUTION

Names as Keys uses ENSv2's programmable registry architecture to represent ownership, delegation, and guest access directly through a hierarchical namespace.

Our proposed hierarchy is:

Owner: nak-lokesh-20261105.eth

Door: lock.nak-lokesh-20261105.eth

Guest: mira.lock.nak-lokesh-20261105.eth

The root namespace represents the owner. The lock subregistry represents a physical door. Guest names beneath the lock represent temporary access credentials.

Each credential is associated with a guest wallet and governed by access rules such as ownership, expiration, and revocation.

Rather than maintaining a separate centralized guest list, the system uses ENSv2 registry relationships and smart-contract state to determine whether a guest is authorized.

How it's Made

Names as Keys is built using Ethereum, ENSv2, Solidity, Foundry, JavaScript, MetaMask, and the Ethereum Sepolia testnet.

Our main technical challenge was transforming ENSv2's hierarchical registry model into a practical authorization system for physical resources without introducing a centralized guest database.

ENSv2 REGISTRY ARCHITECTURE

We designed a three-level namespace consisting of an owner-controlled root, a door-specific lock registry, and individual guest credentials.

The hierarchy follows:

root.eth → lock.root.eth → guest.lock.root.eth

We use ENSv2 registry relationships to model ownership and delegated authority. Each registry has a specific responsibility, allowing the system to distinguish control of the overall namespace from permissions associated with an individual door.

We developed Foundry fork fixtures to validate the complete hierarchy, including ownership, parent-child relationships, expiration, revocation, and replacement behavior.

SMART CONTRACTS

We implemented two application-specific Solidity contracts.

CredentialRegistrar manages restricted credential issuance and revocation. It is designed to enforce authorization boundaries so that only permitted actors can create or revoke guest credentials.

DoorKeys provides the unlock(label) function, which allows a guest to present a specific ENS credential when requesting access.

The label argument is an important design decision. Instead of maintaining a separate wallet-to-credential index, the contract uses the supplied credential label and ENSv2 registry state to determine which credential should be checked.

DoorKeys validates the relevant registry relationships, ownership, and credential validity before emitting a DoorUnlocked event.

This makes the ENSv2 hierarchy part of the actual authorization mechanism rather than simply a naming layer.

FOUNDRY TESTING

We used Foundry to develop and test the Solidity contracts.

Our tests cover registry hierarchy construction, ownership, restricted permissions, credential lifecycle behavior, expiration, revocation, replacement, and door authorization.

The project includes fork-based tests using pinned Ethereum state to reproduce the expected ENSv2 behavior consistently.

Our latest validation completed 260 Foundry tests successfully.

SEPOLIA DEPLOYMENT WORKFLOW

We designed a 15-step deployment sequence to establish the ENS root, configure the lock registries, deploy the application contracts, grant permissions, and issue a temporary guest credential.

The deployment process uses a custom JavaScript browser interface integrated with MetaMask.

Instead of automatically broadcasting deployment transactions, our workflow prepares unsigned transaction candidates for explicit review.

Before execution, it checks wallet identity, Sepolia chain ID, contract addresses, calldata, nonce, transaction value, gas limits, fee parameters, contract state, and prerequisite transactions.

Each transaction requires a separate authorization decision and independent wallet confirmation.

After submission, the workflow verifies transaction receipts, expected events, current on-chain state, and finality before advancing dependent steps.

This was particularly important because ENS registry configuration involves multiple contracts and permission boundaries that must be established in the correct order.

The first two Sepolia transactions have been confirmed: obtaining mock rent tokens and approving the bounded registrar payment allowance.

The remaining deployment steps are still subject to their individual security checks.

FRONTEND ARCHITECTURE

Our application architecture separates the owner, guest, and door-controller responsibilities.

The owner dashboard runs on a laptop and provides the interface for managing the door and issuing access credentials.

The guest interface is designed for mobile use. A static QR code attached to the door opens a door-specific URL, allowing the guest to connect MetaMask and request access.

The QR code identifies the door but contains no secret access credential.

The door controller is designed to monitor DoorUnlocked events and activate a simulated unlocking mechanism for eight seconds.

The full mobile QR-to-door integration is still under development.

TESTING AND VALIDATION

In addition to the 260 Foundry tests, we validated 174 deployment workflow tests, including browser regressions, and 7 frontend tests.

These tests help verify transaction preparation, authorization safeguards, deployment dependencies, and expected application behavior.

NOTABLE TECHNICAL DECISIONS

One of our most important decisions was avoiding a separate centralized guest list or wallet-to-credential mapping.

Instead, we use the hierarchical ENSv2 namespace and explicit credential labels to locate and validate access rights.

Another decision was keeping the door's QR code static. Guest permissions can change on-chain without requiring a new QR code every time access is granted or revoked.

We also built a guarded transaction-review workflow rather than relying on an unrestricted deployment script. This provides a reviewable path for configuring a multi-contract ENSv2 system.

PARTNER TECHNOLOGY

ENSv2 is the foundation of the project, not an optional integration.

Its programmable registries enable the ownership hierarchy, delegated authority, and credential relationships that make Names as Keys possible.

Ethereum provides the execution and verification layer, Solidity implements the access-control logic, Foundry provides contract testing, MetaMask enables wallet-based interaction, and Sepolia provides the public test environment.

Together, these technologies allow us to explore a decentralized access-control system where an ENS name becomes a temporary, verifiable, and revocable digital key.

background image mobile

Join the mailing list

Get the latest news and updates