HostDec Logo
HostDec
Decentralized Hosting
...
🇺🇸  English
🇦🇷  Español
Domains Browser Docs Whitepaper Token Community ↗ Open DApp
Native protocol token

HostDec HDEC

HDEC is the ERC-20 token that powers the HostDec ecosystem. It is used to register domains, participate in on-chain governance, and sign gasless transactions with ERC-20 Permit.

ERC-20 ERC-20 Permit ERC-20 Votes 1B fixed supply OpenZeppelin v5.2.0
HDEC Logo
💰
Total supply
1B HDEC
1,000,000,000 · fixed forever
🔒
New emissions
Zero
No additional mint function
⚙️
Standard
ERC-20
+ Permit + Votes (OZ v5.2.0)
Network
Arbitrum
One — Chain ID 42161
Contract ERC-20
📋 Contract details

The HDEC token is deployed on Arbitrum One. All parameters are immutable: name, symbol, and total supply cannot be changed after deployment.

Name hostdec ERC-20
Symbol HDEC
Contract 0x45d1021512d607b0a81425f2547d6279a7ea5987
Decimals 18
Total supply 1,000,000,000 HDEC · fixed, no future minting
Network Arbitrum One (Chain ID: 42161) ✓ Active
Supply distribution
Full initial supply → deployer 1,000,000,000 HDEC (100%)

100% of the supply is minted to the deployer in the constructor. Subsequent distribution —vesting, community, liquidity, team— is managed off-chain according to the project roadmap, transferring from the deployer wallet as planned stages are executed.

Standard Extensions
🧩 Token extensions

HDEC implements three OpenZeppelin standards that expand the base ERC-20 capabilities with gasless signing and on-chain governance.

📦
Base ERC-20
Standard transfers, approvals, and allowances. Compatible with any wallet, DEX, or DeFi protocol in the EVM ecosystem.
✍️
ERC-20 Permit
Off-chain approvals with EIP-712 signature. The user signs a message instead of sending an approve() transaction, eliminating the gas cost for that step.
🗳️
ERC-20 Votes
Voting power checkpoints per block. Enables on-chain governance with OpenZeppelin Governor. Compatible with historical voting snapshots.
Inheritance tree
hostdec
├── ERC20             // transfer, balance, allowance
├── ERC20Permit      // EIP-712 gasless signature (off-chain approve)
│    └── Nonces       // nonce counter shared with Permit
└── ERC20Votes       // vote checkpoints, delegation, history
     └── Votes        // base interface compatible with Governor
⚠️
Activating voting power requires delegation By design of ERC-20 Votes, tokens have no voting power until the address calls delegate() at least once. You can self-delegate: delegate(msg.sender). This is required to participate in governance.
ERC-20 Permit Gasless
✍️ Gasless approvals (Permit)

ERC-20 Permit (EIP-2612) allows approving token spending with an off-chain signature instead of an on-chain transaction, improving UX by eliminating the approve() step.

How does it work?

Instead of executing approve(spender, amount) (which costs gas), the user signs an EIP-712 message with their wallet. The recipient contract then calls permit(owner, spender, value, deadline, v, r, s) on-chain to finalize the approval and execute the operation in a single transaction.

Usage in HostDec

The DApp can implement single-transaction domain registration flows: the user signs the permit off-chain and the domain contract applies the permit + transferFrom in one atomic call, saving an entire transaction.

// Off-chain user signature (in the DApp, no gas)
const { v, r, s } = await signPermit({
  owner, spender, value, deadline, nonce
});

// Single on-chain transaction: permit + action
await contract.permitAndRegister(
  name, deadline, v, r, s
);
ERC-20 Votes Governance
🗳️ On-chain governance (Votes)

ERC-20 Votes turns every HDEC token into delegable voting power. The vote balance is recorded per block, enabling historical snapshots for governance proposals.

Vote delegation

Tokens do not generate voting power automatically. Each holder must delegate their vote at least once. You can self-delegate to activate your own power, or delegate to any other trusted address.

1

Get HDEC

Acquire HDEC tokens via the marketplace, DEX, or protocol distribution. Without delegation, your balance does not count as votes.

2

Call delegate(address)

Call delegate(msg.sender) to self-delegate or delegate(otherWallet) to delegate to a representative. This step is only done once (or when you want to change your delegate).

3

Participate in governance

With active votes you can vote on Governor proposals. Voting power is snapshotted at the block in which each proposal is created, preventing flash loan attacks.

🔒
Per-block snapshots Vote checkpoints are recorded on-chain with the exact block number. Governance proposals use the balance at the creation block, making it impossible to inflate votes with flash loans.
Technical reference ABI
🔩 Contract functions

Complete reference of the most important HDEC token functions for integration into contracts, DApps, or scripts.

VIEW
maxSupply() → uint256

Returns the token's maximum supply: 1,000,000,000 × 10¹⁸. Identical to the total supply since no future minting is possible.

READ
totalSupply() → uint256

Total supply in circulation (in wei, 18 decimals). Equals maxSupply() unless burns have occurred.

READ
balanceOf(address account) → uint256

HDEC balance of an address in base units (18 decimals).

READ
getVotes(address account) → uint256

Current voting power of an address. Returns 0 if the address has not yet delegated.

READ
getPastVotes(address account, uint256 timepoint) → uint256

Voting power of an address at a specific past block. Used by the Governor for proposal snapshots.

READ
delegates(address account) → address

Returns the address to which voting power is being delegated. address(0) means no active delegation.

READ
nonces(address owner) → uint256

Current nonce of the owner for ERC-20 Permit. Incremented with each permit() used. Shared between ERC20Permit and Nonces.

WRITE
delegate(address delegatee)

Delegates the caller's voting power to delegatee. To self-delegate: delegate(msg.sender). Required to activate voting power.

WRITE
delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s)

Delegates votes via an off-chain signature, without the holder spending gas. Allows delegating on behalf of another with their signed consent.

WRITE
permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)

Applies an off-chain signed approval (EIP-2612). Finalizes the allowance without the owner spending gas on approve().

WRITE
transfer(address to, uint256 amount) → bool

Transfers HDEC from the caller to the recipient. Automatically updates the vote checkpoints of both addresses.

WRITE
approve(address spender, uint256 amount) → bool

Approves spender to spend up to amount HDEC from the caller. On-chain alternative to the Permit flow.

Source code Solidity 0.8.28
📄 Full contract

Complete token implementation. No additional business logic: pure OpenZeppelin standard with the minimum overrides required by multiple inheritance.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import "OpenZeppelin/ERC20.sol";         // v5.2.0
import "OpenZeppelin/ERC20Permit.sol";    // EIP-2612
import "OpenZeppelin/ERC20Votes.sol";     // Governance
import "OpenZeppelin/Nonces.sol";

contract hostdec is ERC20, ERC20Permit, ERC20Votes {

    // Fixed total supply: 1,000,000,000 HDEC
    uint256 private constant INITIAL_SUPPLY =
        1_000_000_000 * 10 ** 18;

    constructor()
        ERC20("hostdec", "HDEC")
        ERC20Permit("hostdec")
    {
        _mint(msg.sender, INITIAL_SUPPLY);
    }

    // Required override: ERC20 + ERC20Votes both define _update
    function _update(address from, address to, uint256 amount)
        internal override(ERC20, ERC20Votes) {
        super._update(from, to, amount);
    }

    // Required override: ERC20Permit and Nonces share nonces()
    function nonces(address owner)
        public view override(ERC20Permit, Nonces)
        returns (uint256) {
        return super.nonces(owner);
    }

    // Fixed maximum supply, no future minting possible
    function maxSupply() external pure returns (uint256) {
        return INITIAL_SUPPLY;
    }
}
🔐
Why two overrides? Multiple inheritance in Solidity requires manually resolving function conflicts. _update is defined by both ERC20 and ERC20Votes; the override with super._update() ensures both chains execute in the correct order, keeping balances and checkpoints in sync.
Audit OpenZeppelin
🛡️ Security and trust

HDEC implements no custom business logic beyond the standard. All critical security code comes from OpenZeppelin v5.2.0.

🔒
No subsequent minting
The constructor mints the entire supply and there is no additional mint function. Supply is immutable from the deploy block.
🚫
No owner or admin
The contract has no admin roles or privileged functions. No wallet can pause, mint, or alter the token.
OZ v5.2.0 audited
Imports are pinned to OpenZeppelin v5.2.0, a stable release with multiple security audits.
Anti flash loan
ERC-20 Votes checkpoints use per-block snapshots, making it impossible to manipulate voting power within the same transaction.