TAXR Token – Technical Documentation

The TAXR token is the native utility and governance token of the Taxr protocol. This document provides a comprehensive overview of its design, functionality, and integration within the broader Taxr ecosystem.

Overview

TAXR is an ERC-20 compliant token that powers real-world claim settlement, treasury flow, and token-based compression through enforced burns. It implements a dual-layer system that separates market tokens from utility tokens while maintaining a single token standard.

Token Architecture

Dual-Layer System

The token implements a dual-layer design that distinguishes between different token uses:

Layer Purpose Lifecycle
Market Layer Tradable TAXR from treasury, used for governance and market incentives Permanent (float)
Utility Layer Temporary TAXR for tax claim settlements Minted per use, then burned
┌──────────────────────────────────────────────────────────┐
│                       TAXR Token                          │
├──────────────────────────┬───────────────────────────────┤
│        Market Layer      │         Utility Layer         │
├──────────────────────────┼───────────────────────────────┤
│ • Tradable               │ • Minted for specific use     │
│ • Governance rights      │ • Burned after settlement     │
│ • Staking rewards        │ • Fixed at $0.10/token        │
│ • LP incentives          │ • Tracked separately          │
└──────────────────────────┴───────────────────────────────┘
                │                        │
        ┌───────▼────────┐      ┌───────▼────────┐
        │  Market Flow   │      │  Utility Flow  │
        └───────┬────────┘      └───────┬────────┘
                │                        │
┌───────────────▼──────────┐   ┌────────▼───────────────┐
│ • Secondary market       │   │ 1. Taxpayer pays claim │
│ • DAO treasury           │   │ 2. Utility TAXR minted │
│ • Governance allocation  │   │ 3. Claim settled       │
│ • Protocol incentives    │   │ 4. TAXR burned         │
└──────────────────────────┘   └────────────────────────┘
                

Key Components

1. Burn Lifecycle Management

The token implements comprehensive burn tracking and management:

2. Faucet Controls

The token includes faucet controls for gradual transition to market-only token:

3. Governance Distribution System

The burn-to-govern mechanism rewards addresses that have burned tokens:

TODO: Governance distribution policy needs finalization, including:

4. Supply Management

The token manages its supply with careful allocation:

Allocation Amount Purpose
Tax Settlement 1,000,000,000 TAXR Reserved for tax claims settlement
Treasury 1,000,000,000 TAXR Protocol treasury for operations
Jurisdiction Onboarding 750,000,000 TAXR Incentives for jurisdiction participation
Emissions & Staking 1,000,000,000 TAXR Protocol rewards and staking incentives
Liquidity Seeding 500,000,000 TAXR Market liquidity bootstrapping
Development Fund 500,000,000 TAXR Development and growth initiatives
Governance Reserve 250,000,000 TAXR Governance distribution to participants

Technical Implementation

Contract Structure

The TaxrToken contract is an ERC-20 implementation that inherits from multiple OpenZeppelin contracts:

contract TaxrToken is ERC20, ERC20Burnable, AccessControl, ERC2771Context {
    // Role definitions
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant UTILITY_MINTER_ROLE = keccak256("UTILITY_MINTER_ROLE");
    bytes32 public constant TREASURY_ROLE = keccak256("TREASURY_ROLE");
    
    // Token constants, tracking, and storage
    // ...

    // Implementation of token functionality
    // ...
}

Role-Based Access Control

The token implements a comprehensive role system:

Role Purpose Key Functions
DEFAULT_ADMIN_ROLE DAO governance / deployment owner Grant/revoke other roles
ADMIN_ROLE Reserve management / configuration setReserveAddresses, initializeTokenSupply
MINTER_ROLE Mint tradable TAXR mint
UTILITY_MINTER_ROLE Mint and burn utility-layer TAXR mintUtility, burnUtility, transferUtility
TREASURY_ROLE Treasury operations burnFromVault

Key Functions

The contract implements the following key functions:

Token Supply Management

// Initialize the token supply by allocating to reserve addresses
function initializeTokenSupply() external onlyRole(ADMIN_ROLE);

// Mint tokens for the market layer
function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE);

Utility Layer Functions

// Mint tokens specifically for the utility layer (tax payment)
function mintUtility(address to, uint256 amount) external onlyRole(UTILITY_MINTER_ROLE);

// Burn tokens specifically for the utility layer (tax settlement)
function burnUtility(address from, uint256 amount) external onlyRole(UTILITY_MINTER_ROLE);

// Burn tokens from the treasury vault for ETH-based claims
function burnFromVault(uint256 amount) external onlyRole(TREASURY_ROLE);

Faucet Control Functions

// Open or close the public faucet
function setFaucetStatus(bool isOpen) external onlyRole(ADMIN_ROLE);

// Permanently close the faucet, cannot be reopened
function killFaucet() external onlyRole(ADMIN_ROLE);

Governance Distribution Functions

// Enable or disable governance share claiming
function setGovernanceSharesEnabled(bool enabled) external onlyRole(ADMIN_ROLE);

// Set governance share claim parameters
function setGovernanceParameters(uint256 ratio, uint256 minBurn) external onlyRole(ADMIN_ROLE);

// Claim governance tokens based on burn history
function claimGovernanceShare(address recipient) external returns (uint256);

Utility Functions

// Calculate the USD value of TAXR tokens (utility layer only)
function calculateUsdValue(uint256 amount) public pure returns (uint256);

// Calculate the TAXR tokens required for a given USD amount
function calculateTokensForUsd(uint256 usdAmount) public pure returns (uint256);

Burn-Based Economic Model

The TAXR token implements a burn-based model that enforces token compression and civic accountability:

           ┌─────────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
           │                 │     │             │     │             │     │             │
           │  Taxpayer pays  │────▶│  Mint TAXR  │────▶│  Settle    │────▶│  Burn TAXR  │
           │  claim (ETH)    │     │  utility    │     │  claim     │     │             │
           │                 │     │             │     │             │     │             │
           └─────────────────┘     └─────────────┘     └─────────────┘     └──────┬──────┘
                 │                                                                 │
                 │                                                                 │
           ┌─────▼─────────┐                                                ┌──────▼──────┐
           │               │                                                │             │
           │   Protocol    │                                                │  Burn-based │
           │   retains ETH │                                                │  governance │
           │               │                                                │             │
           └───────────────┘                                                └─────────────┘
            

Key economic principles:

Note: The taxpayer's payment is essentially tokenized through the utility layer, used for settlement, then burned. This mechanism creates a one-way flow that compresses the token supply while maintaining value in the protocol treasury.

Meta-Transaction Support

The token implements ERC-2771 for gas-free transactions:

function _msgSender() internal view override(Context, ERC2771Context) returns (address) {
    return ERC2771Context._msgSender();
}

function _msgData() internal view override(Context, ERC2771Context) returns (bytes calldata) {
    return ERC2771Context._msgData();
}

Testing Strategy

The TaxrToken contract is thoroughly tested with the following test cases:

Test files:

Integration Points

TaxrMastr Integration

The token integrates with the TaxrMastr contract for claim settlement:

  1. TaxrMastr receives payment for claim
  2. TaxrMastr calls mintUtility to create utility TAXR
  3. Claim is processed and settled
  4. TaxrMastr calls burnUtility to burn the tokens

PaymentRouter Integration

The token integrates with PaymentRouter for multi-currency support:

  1. PaymentRouter accepts ETH or other tokens
  2. Converts payment to equivalent TAXR value
  3. For ETH payments, calls burnFromVault

Frontend Integration

The token integrates with the frontend through:

Future Considerations

Governance System Finalization:

The governance distribution system needs policy finalization to address the following aspects:

Potential Enhancements

References