Skip to content

QuickSwap/quickswap-voting

Repository files navigation

QuickSwap Voting

Snapshot voting power wrappers for QuickSwap governance.

Architecture

Architecture

Modules

Module Chains Description
WalletAndDQuickModule Polygon Wallet QUICK + Dragon's Lair
WalletQuickModule Base, Eth, Manta Wallet QUICK only
SyrupStakingModule Polygon Syrup pools (factory + legacy)
AlgebraV3Module Polygon Algebra V3 LP positions
AlgebraIntegralV4Module Base Algebra v4 LP positions
LiquidityManagersModule All ALM vaults (Gamma, Steer, ICHI)
V2LPStakingModule All V2 LP staking pools

Quick Start

pnpm install
pnpm exec hardhat compile
pnpm test

Configuration

All configuration is in config/chains.json (single source of truth).

Keystore Setup

pnpm exec tsx scripts/create-keystore.ts

# Add to .env:
KEYSTORE_PATH=keystores/deployer-0x<address>.json

Deployment

Deployment outputs

  • Source of truth: config/chains.json
  • Local backups: deployments/*.json (gitignored)

Full Chain Deployment

Deploys all modules + aggregator:

pnpm exec hardhat run scripts/deploy/chain.ts --network polygon
pnpm exec hardhat run scripts/deploy/chain.ts --network base

Redeploy Aggregator Only

Reuses existing modules, only deploys new aggregator:

pnpm exec hardhat run scripts/deploy/redeploy-aggregator.ts --network polygon
pnpm exec hardhat run scripts/deploy/redeploy-aggregator.ts --network base

Wallet-Only Chains

pnpm exec hardhat run scripts/deploy/wallet-quick-only.ts --network ethereum

Owner Address

Default owner: 0xDA1077c4b0dd6da1BDF166F30aa4BDbF517d637b

Override with your Safe multisig:

OWNER_ADDRESS=0xYourSafe pnpm exec hardhat run scripts/deploy/chain.ts --network polygon

Verification

pnpm exec hardhat verify --network <chain> <ADDRESS> <ARGS>

Snapshot Strategy

{
  "name": "erc20-balance-of",
  "network": "<CHAIN_ID>",
  "params": {
    "address": "<AGGREGATOR_ADDRESS>",
    "symbol": "QUICK",
    "decimals": 18
  }
}

Get the aggregator address from config/chains.jsonchains.<chain>.deployed.aggregator.

Debugging Snapshot Settings

To confirm what Snapshot Hub currently has stored for a space:

pnpm exec tsx scripts/check-snapshot-space.ts
SPACE=quickvote.eth pnpm exec tsx scripts/check-snapshot-space.ts

Publishing Snapshot Settings (Safe)

When using Safe multi-sig, Snapshot space updates are signed as a Safe “message”, but the signed payload still needs to be broadcast to Snapshot Hub.

  1. Save the typed-data JSON you signed (the object with domain, types, primaryType, message) to a file, e.g. space-message.json.

  2. Publish it using the Safe prepared signature:

pnpm exec tsx scripts/publish-snapshot-settings.ts --file ./space-message.json --sig 0x<preparedSignature>
  1. Verify it’s live:
pnpm exec tsx scripts/check-snapshot-space.ts

Testing

pnpm test

Admin Operations

Update allowlists via Safe multisig:

liquidityManagersModule.setVaults(address[] vaults);
v2LPStakingModule.setPools(address[] pools);
syrupStakingModule.setLegacyPools(address[] pools);

Generate Safe transaction JSON:

pnpm exec tsx scripts/generate-safe-txs.ts <chain>

License

MIT

About

Quickswap voting contract.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •