Yos Riady optimize for learning

Harberger Taxes on Ethereum

Harberger Taxes

Harberger Taxes is an economic abstraction that aims to democratize the control of assets between private and commons ownership. In this taxation system, asset owners self-assess the value of assets they own and pay a tax rate of X% on that value. Whatever value owners specify for the asset, they have to be willing to part ways and sell it to anyone at that price.

💡 Harberger Taxes was repopularized by its mention in Radical Markets.

The emerging field of cryptoeconomics uses both cryptography and economic incentives to design decentralized protocols and applications. Smart contracts defines the rules of an economic game which incentivize rational actors to behave in optimally desirable ways. Decentralized protocols lets us inscribe transparent rules on the blockchain that aligns individual incentives to achieve a common goal.

Previously, it was difficult or even impossible for economists to test these ideas in a real environment. Blockchains offer a testing ground for economic abstractions such as Harberger Taxes, where rules can be enforced with smart contracts.

Let’s examine the Harberger Tax model and discover how we can use it in decentralized applications.

Harberger Taxes

Every citizen and corporation would self-assess the value of assets they possess, pay a roughly 7% tax on these values, and is required to sell the assets to anyone willing to purchase them at this self-assessed price.

‘Property is Monopoly’

Harberger Taxes works as follows:

  • Asset owners determines the value of their asset, and pay taxes on that price.
  • Anyone at any time can acquire an asset at the owner’s price, immediately taking ownership of the asset upon purchase. The new owner then sets a new price.

Asset owners are incentivized to set a low price to minimize the amount taxes they have to pay. At the same time, owners are incentivized to set a price high enough to discourage others from buying it away too easily. This creates a balancing act for owners to price an asset at the value they are willing to pay to keep it.

Because of these opposing pressures, asset owners can’t set impossibly high prices nor refuse reasonably priced offers. This creates a more efficient market.

Contract Code

In the next section, we’ll implement Harberger Taxes on Ethereum. We’ll start with a Solidity smart contract to collect taxes from asset owners.

Taxed Assets

First, define a marketplace of assets that users will own and trade with each other. Each Asset has an asset Id, an owner address if any, and a price.

contract Marketplace {
  struct Asset {
      address owner;
      uint price;
  }

  mapping(bytes32 => Asset) public assets;

  // Returns the price of an asset
  function getPrice(bytes32 assetId) public view returns (uint) {
    Asset storage a = assets[assetId];
    return a.price;
  }

  // New asset creation and buy functions omitted for clarity
  function addAsset(bytes32 assetId, uint price) public;
  function buyAsset(bytes32 assetId) public payable;
}

The self-assessed price of an asset determines the amount of tax its owner will have to pay to keep it.

Tax Balances

In our implementation, we collect taxes on demand from prepaid balances maintained by each account. We will collect taxes via a TaxCollector contract:

contract TaxCollector {
    struct TaxBalance { // Prepaid asset tax information
      uint balance; // Amount in ether
      uint lastCollectedAt; // Timestamp of last collection date
    }
    mapping(bytes32 => TaxBalance) public taxBalances;

    // Address where collected taxes are sent to
    address public taxRecipient;

    // Daily tax rate (there are no floats in solidity)
    uint32 public taxNumerator;
    uint32 public taxDenominator;

    constructor(
        address _taxRecipient,
        uint32 _taxNumerator,
        uint32 _taxDenominator
    ) public {
        taxRecipient = _taxRecipient;
        taxNumerator = _taxNumerator;
        taxDenominator = _taxDenominator;
    }
}

This TaxCollector contract maintains balances of prepaid tax payments for each Asset in the marketplace.

Asset owners calls deposit() to top up their tax payment balance with Ether:

// Asset owners calls this with Ether to deposit tax payments for a particular asset
function deposit(bytes32 assetId) public payable {
    taxBalances[assetId].balance += msg.value;
}

// Withdraw tax payments, omitted for simplicity
function withdraw(bytes32 assetId, uint256 amount) public;

Note that whenever an Asset is created by the Marketplace contract, a corresponding TaxBalance should be created for that asset, with zero balance and lastCollectedAt set to the asset creation date. This keeps track of tax payments of each asset. For simplicity, this step is omitted from the sample code.

Tax Collection

We will collect() taxes in batches on demand. If during tax collection the asset owner has insufficient advance tax balance for the tax period between the last collection date and the present time, the asset owner will have failed to pay their tax. It’s the responsibility of the asset owner to ensure that they have set aside enough tax payments for their asset.

Let’s first define a function for calculating the taxes owed for an asset:

Marketplace public marketplace; // Address of asset marketplace contract

function taxOwed(bytes32 assetId) public view returns (uint256) {
    uint assetPrice = marketplace.getPrice(assetId); // External contract call

    return assetPrice * (now - a.lastCollectedAt) * taxNumerator
        / taxDenominator / 1 days;
}

Here’s our tax collect() function:

function collect(bytes32 assetId) public onlyCollector returns (bool) {
    TaxBalance storage taxBalance = taxBalances[assetId];
    uint taxes = taxOwed(assetId);

    if (taxes <= taxBalance.balance) {
        taxBalance.lastCollectedAt = now;
        taxBalance.balance -= taxes;
        taxRecipient.transfer(taxes) += tax;
        return true;
    } else {
        taxBalance.lastCollectedAt = now;
        taxBalance.balance = 0;
        foreclose(bytes32 assetId); // foreclose asset
        return false;
    }
}

Remember that the amount of Harberger taxes paid is proportional to a given asset’s price and the duration that the asset is held. In the above code:

  • First, we retrieve the asset’s taxBalance by assetId.
  • We check if the asset owner has deposited sufficient advance taxOwed() for the asset.
  • If there is sufficient balance, we transfer the taxes owed to the taxRecipient address and update the asset’s advance tax balance and lastCollectedAt. The asset owner has successfully paid their Harberger Tax and continues to own it.
  • If there is insufficient balance, we foreclose the asset.

Note that the above function has an onlyCollector modifier that makes collect() only be callable only by whitelisted tax collector addresses.

Foreclosure

Failure to pay tax will result in an asset’s foreclosure. A foreclosed Asset has owner set to address(0) which means it is open for auction.

function foreclose(bytes32 assetId) internal {
    Asset storage a = assets[assetId];
    a.owner = address(0); // Asset is now open for auction
}

The sample code is simplified for clarity, but you can fill in the rest. The basic harberger tax calculation, deposits, and collection is implemented.

Use Cases

Let’s look at how Harberger Taxes can be used in real-life applications.

Continuous Auctions

With Harberger taxes, users will know what the going price is for any asset. This results in liquid markets where anyone can make an offer even if the owner is not actively selling.

For example, NFT marketplaces such as Decentraland, OpenSea, and Harberger Ads lists digital goods that users can browse and purchase at any time.

Arts Funding

In recent years we’ve seen the proliferation of new forms of art funding such as subscription patronage to crowdfunding. The blockchain offers even more opportunities to re-imagine how we fund and support creators and artists.

For example, we can use Harberger taxes to sell limited sponsorship seats which carry special privileges to fans. This is similar to the pay-what-you-want model of self-assessed price discrimination.

Rare Patrons offers a radical market approach for fans to participate in supporting their favourite creators.

Rare Patrons works as follows:

  • Every musician has a single patron seat.
  • Anyone can buy the patron seat (to become the singular patron & gain the privilege of being the patron).
  • Upon buying it they have to self-assess the value of this seat (being the patron).
  • During the tenure of being a patron, this patron has to pay a > percentage fee (say 5%) of the self-assessed seat value per year as their patronage to the musician.
  • At any point in time, someone else can buy this patron seat at this self-assessed value, changing ownership.
  • Upon being “dethroned” as the rare patron for a specific musician, that patron earns a collectible “Post-Patron” badge, signifying that they were a patron at a certain point in history. They just join the “Patrons Club”.
  • They can choose to sell this collectible if they no longer want it.

New funding models are now made possible with smart contracts.

Intellectual Property

Harberger Taxes can be applied to intellectual property and open source.

When a patent requires the active payment of a nonzero amount of tax, patent trolls have less of an incentive to ‘squat’ useless works that have no value beyond being useful in a suit in the future. It also makes the IP market more liquid.

Tokenized Communities

Cryptocommunities (or DAOs) can use Harberger taxes to strike a balance between private and commons ownership.

Given a community with scarce assets, how can we allocate it efficiently to productive members of the community? Exclusive ownership of a community asset can be taxed, ensuring that those that value it the most have access. Failing to pay the tax will trigger a forced auction of the asset that all community members can participate in.

Cryptocommunities can coordinate between themselves how taxes are utilized. For example, taxes can go to a curve-bonded reserve via sponsored burning. Alternatively, this reserve can be redistributed to the community as a universal basic income, or go to a community fund that is governed by a DAO.

Harberger taxes and other emerging cryptoeconomic primitives offers new ways for individuals to coordinate at scale.

Summary

In this article, we’ve looked at Harberger Taxes and how we can use it in decentralized applications. While it remains a challenge to implement new economic abstractions in the real world, the blockchain offers a valuable testing ground for new mechanisms of cooperation.

Author

Yos is a software craftsman based in Singapore. Learn more.

📬 Get updates straight to your inbox!

Subscribe to my newsletter to make sure you don't miss anything.




Here's something you might be interested in...

Going Serverless book

Have you heard about the Serverless programming model? The Going Serverless book teaches you how to build scalable applications with the Serverless framework and AWS Lambda. You'll learn how to design, develop, test, deploy, and secure Serverless applications from planning to production.

Find out more →