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.

The HDEC token is deployed on Arbitrum One. All parameters are immutable: name, symbol, and total supply cannot be changed after deployment.
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.
HDEC implements three OpenZeppelin standards that expand the base ERC-20 capabilities with gasless signing and on-chain governance.
approve() transaction, eliminating the gas cost for that step.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
delegate() at least once. You can self-delegate: delegate(msg.sender). This is required to participate in governance.
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 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.
Get HDEC
Acquire HDEC tokens via the marketplace, DEX, or protocol distribution. Without delegation, your balance does not count as votes.
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).
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.
Complete reference of the most important HDEC token functions for integration into contracts, DApps, or scripts.
maxSupply() → uint256
Returns the token's maximum supply: 1,000,000,000 × 10¹⁸. Identical to the total supply since no future minting is possible.
totalSupply() → uint256
Total supply in circulation (in wei, 18 decimals). Equals maxSupply() unless burns have occurred.
balanceOf(address account) → uint256
HDEC balance of an address in base units (18 decimals).
getVotes(address account) → uint256
Current voting power of an address. Returns 0 if the address has not yet delegated.
getPastVotes(address account, uint256 timepoint) → uint256
Voting power of an address at a specific past block. Used by the Governor for proposal snapshots.
delegates(address account) → address
Returns the address to which voting power is being delegated. address(0) means no active delegation.
nonces(address owner) → uint256
Current nonce of the owner for ERC-20 Permit. Incremented with each permit() used. Shared between ERC20Permit and Nonces.
delegate(address delegatee)
Delegates the caller's voting power to delegatee. To self-delegate: delegate(msg.sender). Required to activate voting power.
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.
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().
transfer(address to, uint256 amount) → bool
Transfers HDEC from the caller to the recipient. Automatically updates the vote checkpoints of both addresses.
approve(address spender, uint256 amount) → bool
Approves spender to spend up to amount HDEC from the caller. On-chain alternative to the Permit flow.
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; } }
_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.
HDEC implements no custom business logic beyond the standard. All critical security code comes from OpenZeppelin v5.2.0.