Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UpsilonDAO

On-chain governance for the Upsilon (UPX) token — snapshot voting, quorum checks, timelock, and executable proposals through a React dashboard.

This DAO governs the pre-deployed upsilon token : UPX

Token (Sepolia) 0x57bfdA49355F95799399Deb4ff79aAB8d1971914 · Etherscan
Token repo upsilon-token-UPX--ERC20-Create2

Architecture

UPX (ERC20Votes)  →  voting power with checkpoints
UpsilonDAO        →  proposals, voting, queue, execute

Governance flow

  1. Delegate — UPX holders call delegate() to activate voting power
  2. Propose — accounts with ≥ proposalThreshold votes submit proposals
  3. Vote — weight is snapshotted at voteStart; voting opens strictly after that block
  4. Queue — successful proposals enter a timelock
  5. Execute — after the timelock, on-chain actions run (ETH transfers, contract calls, signaling with no actions)

Default deploy parameters

Parameter Value
Token Upsilon / UPX, 1M max supply
proposalThreshold 10 UPX
quorumNumerator 4 (4% of supply at snapshot)

Security

  • Fixed max UPX supply; owner-only emergency mint capped at MAX_SUPPLY
  • Proposal threshold reduces spam
  • Percentage-based quorum at vote snapshot
  • Timelock before execution
  • Reentrancy guard on execute
  • Custom errors for gas-efficient reverts
  • Immutable governance parameters set at deploy

Project layout

dao/
├── contracts/          # Foundry — UpsilonToken, UpsilonDAO, tests, deploy script
└── frontend/           # Vite + React UI (Wagmi / Viem)

Prerequisites

Contracts

cd contracts
forge build
forge test

Local (Anvil)

Start Anvil:

anvil

Deploy:

cd contracts
forge script script/DeployUpsilon.s.sol \
  --rpc-url http://127.0.0.1:8545 \
  --broadcast

Copy the logged UpsilonToken and UpsilonDAO addresses into frontend/.env:

VITE_CHAIN_ID=31337
VITE_TOKEN_ADDRESS=0x...
VITE_DAO_ADDRESS=0x...

Sepolia

Create contracts/.env (do not commit):

PRIVATE_KEY=0x...

Deploy:

cd contracts
source .env
forge script script/DeployUpsilon.s.sol \
  --rpc-url https://sepolia.drpc.org \
  --broadcast --private-key "$PRIVATE_KEY" \
  --legacy --with-gas-price 20000000000 -vv

Point the frontend at Sepolia:

VITE_CHAIN_ID=11155111
VITE_TOKEN_ADDRESS=0x...
VITE_DAO_ADDRESS=0x...

Frontend

cd frontend
npm install
npm run dev

The app reads governance parameters and proposal state from the chain pinned by VITE_CHAIN_ID — not from hard-coded UI assumptions.

Wallet setup

Anvil — import a test account into MetaMask:

  • RPC: http://127.0.0.1:8545
  • Chain ID: 31337

Sepolia — use a funded Sepolia account and the same chain ID as VITE_CHAIN_ID.

Try it out

  1. Connect wallet
  2. Activate voting power (self-delegate UPX)
  3. Create a signaling or ETH transfer proposal
  4. Vote after the voting delay elapses
  5. After voting ends, Queue then Execute

For transfer proposals, fund the DAO treasury first:

cast send <DAO_ADDRESS> --value 1ether \
  --rpc-url <RPC_URL> --private-key <KEY>

About

Decentralized governance dApp for the Upsilon Token(UPX) token with timelock and executable on-chain proposals. deployed on sepolia with quick testing mode timings.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages