Domain squatting is a chronic problem and effects ENS and DNS alike. Many names are listed at unattainable prices, with the most popular ones taken by brokers and only put to use when the high price is paid.
One solution to such a problem is the Harberger tax proposed in the book Radical Markets by Glen Weyl and Eric Posner. Under such a system assets are always on the market. The current owner self assesses the price of their asset and pays a predefined tax or levy in proportion to that price. That way there is always a flow of product and money.
Our dapp, Radical Domains, allows the migration of individual ENS names into a new ownership model inspired by Harberger taxes. We also take inspiration from the UK property market's use of freehold and leasehold titles - this is ETHLondon after all.
What It Does
The owner of an ENS domain can create and sell a tradable lease on their domain name with all rental yield accruing to them.
When they transfer ownership of their ERC721 ENS token to the Radical Domain smart contract, they received two ERC721 tokens in return:
- A freehold token which has no control over the domain name but receives all future rent from it.
- A leasehold token which controls the underlying domain name (e.g.
setResolver) but must declare its own selling price and pay rent at a set fraction of that price.
Neither holder alone can transfer ownership of the underlying ENS domain name, but any account or contract in possession of both the freehold and the leasehold token can withdraw it.
The leasehold token is "always for sale" (hat tip @simondlr) and can be purchased at any time through the Radical Domains site or automatically listed on markets such as OpenSea. The freehold token can optionally be traded or listed by its owner.
This has several advantages:
- it introduces liquidity into the market,
- It allows the earning of recurring passive income on an asset,
- it allows a seller in a hurry to receive some money up front (from initial sale of leasehold) and the rest later (as rental yield), and
- it incentivises dis-hoarding.
Other models are also possible, such as fixed term tradable leases.
How We Built It
The system relies heavily on the ERC721 non-fungible token (NFT) standard which invokes the
onERC721Received method on the recipient when a transfer takes place, and the ENS registrar functionality which allows the owner to nominate a controlling address which can make changes but not transfer ownership.
The owner of an ENS name can "radicalise" their domain by transferring ownership of their ERC721 token to our
RadicalManager contract. This is done by calling
safeTransferFrom on the ENS smart contract which invokes
onERC721Received on the
RadicalManager contract, which then goes about minting the leasehold and freehold tokens from the
RadicalFreehold contracts respectively.
Smart contracts were authored with help from Truffle, OpenZepellin and ENS (hat tip @makoto_inoue for assistance on site).
When radicalising a domain the initial owner sets the rental yield (e.g. at 10%) and initial sale price (e.g. 1 ETH) for the leasehold. Subsequent holders can set a new selling price (e.g. 10 ETH) for the domain after taking possession but must pay rent at the initial rate on the new price (10% x 10 ETH = 1 ETH/year). The holder of the freehold token receives the rent and can withdraw as much of it as has accrued at any time.
The leaseholder has exclusive control of the ENS domain name as long as they hold the leasehold token.
- Solidity is a moving target with breaking changes between versions, and encoding two
uint256values into a
bytesparameter stood out as a tough task (Evert).
- Beginners on the team (Richard and Kiki) found the learning curve steep and overwhelming.
- Getting to understand the ENS smart contracts and separating ENS concepts (e.g. controller) from ERC721 concepts (e.g. operator) was tough (Rosco).
- We switch between several options for the front-end and all had their own difficulties for beginners and experienved team members.
Accomplishments We're Proud Of
From a BUIDL perspective we are especially proud of implementing most of the core smart contract functionality.
We're proud of our teamwork because we're a team of different levels and technical background and everybody brought something unique.
And we're proud of the Ethereum community for the ecosystem which has been built, from the chain to the tools to the events.
What We Learned
The most interesting insight was the value of the pattern supported by ENS of allowing a "controller" to do everything but transfer ownership. This saved us from needing to add
call-through functionality to the contract and would be useful pattern to see deployed more widely by other ERC721 tokens so that the ideas in this project could be generalised.
What's next for Radical Domains
We intend to continue working on it and hope to see forks or pull-requests. Working on the project will provide valuable experience for those of us on the team who are new to development.