Skip to content

feat(contracts): implement governance token system - #109

Open
Malik6828 wants to merge 1 commit into
GruftNet:mainfrom
Malik6828:feat/governance-token-system
Open

feat(contracts): implement governance token system#109
Malik6828 wants to merge 1 commit into
GruftNet:mainfrom
Malik6828:feat/governance-token-system

Conversation

@Malik6828

@Malik6828 Malik6828 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Closes #80 — Build Governance Token System

contracts/GOV_Token.sol — BOXMKT ERC-20 Token

  • 100M max supply cap, admin + authorised minter roles
  • Full ERC-20: transfer, transferFrom, approve, increaseAllowance, decreaseAllowance, burn
  • Vesting: linear schedules escrowed in-contract; createVesting() / releaseVested() / revokeVesting()
  • Emissions: weekly mint to reward pool via emitTokens() with cooldown enforcement

contracts/Timelock.sol — 2-day Timelock Executor

  • MIN_DELAY = 2 days, GRACE_PERIOD = 14 days
  • queue() / execute() / cancel() — CEI pattern: state set to Executed before external call
  • Separate proposer and executor roles (set to Voting contract on deploy)
  • isReady() and hashTransaction() view helpers for off-chain tooling

contracts/Voting.sol — veToken Governance

Lock Duration Voting Power Multiplier
1 year
2 years
3 years
4 years
  • lock() / extendLock() / unlock() — tokens held in escrow until expiry
  • Proposals: 5-day voting period, 4% quorum, 1 000 BOXMKT threshold to propose
  • finalise() → queues passing proposals in Timelock automatically
  • execute() → forwards call through Timelock after 2-day delay
  • Immutable audit trail: every vote appended to voteHistory[] array; getVoteHistory(from, to) for pagination
  • cancel() works for both Active and Queued proposals (also cancels in Timelock)
    closes Build Governance Token System #80

- contracts/GOV_Token.sol: ERC-20 BOXMKT token
    - 100M max supply cap
    - Admin + authorised minter roles
    - Linear vesting schedules with escrow (create / release / revoke)
    - Weekly emission mints with configurable cooldown
    - Full ERC-20: transfer, transferFrom, approve, increase/decreaseAllowance, burn

- contracts/Timelock.sol: 2-day timelock executor
    - MIN_DELAY = 2 days, MAX_DELAY = 30 days, GRACE_PERIOD = 14 days
    - queue() / execute() / cancel() with CEI pattern in execute()
    - Separate proposer and executor roles (set to Voting contract)
    - hashTransaction() view helper for off-chain tooling

- contracts/Voting.sol: veToken governance
    - Lock BOXMKT 1–4 years; voting power = amount × lockYears (1×–4×)
    - extendLock() increases power without unlock penalty
    - Proposals: 5-day voting period, 4% quorum (QUORUM_BPS = 400)
    - Proposal threshold: 1 000 BOXMKT locked
    - Passes → auto-queued in Timelock via finalise()
    - execute() forwards call through Timelock after 2-day delay
    - Immutable on-chain voteHistory array for full audit trail
    - cancel() works for both Active and Queued proposals

Closes GruftNet#80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Governance Token System

1 participant