Skip to content

Implement fee registry and governance system - #684

Open
Nemenwq wants to merge 3 commits into
Savitura:mainfrom
Nemenwq:On-Chain
Open

Implement fee registry and governance system#684
Nemenwq wants to merge 3 commits into
Savitura:mainfrom
Nemenwq:On-Chain

Conversation

@Nemenwq

@Nemenwq Nemenwq commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🎯 Fee Registry & Governance System

What's New

We're introducing decentralized governance to CrowdPay, allowing our community to participate in platform decisions. Platform fees are now managed on-chain instead of being hardcoded, giving token holders the power to propose and vote on fee changes.

Key Features

On-Chain Fee Management

  • Platform fees are now stored on the blockchain for transparency
  • Fees can be updated through community governance instead of admin-only changes
  • Automatic fee caching ensures fast and reliable contribution processing

Creator Revenue Sharing

  • High-volume creators now receive a share of platform fees
  • Revenue share is calculated automatically during withdrawals
  • This rewards creators who bring significant activity to the platform

Community Governance

  • Token holders can propose fee changes (requires 1,000 tokens)
  • All token holders can vote on active proposals
  • 7-day voting period with participation requirements
  • Proposals need majority support + minimum participation to pass

New Governance Page

  • Visit /governance to view current fees and active proposals
  • See your token balance and voting power
  • Vote on proposals directly from the interface
  • View complete proposal history

Why This Matters

  • Transparency: Fee changes are now visible on-chain and trackable
  • Community Voice: Token holders have a say in platform decisions
  • Creator Incentives: Rewards successful creators with revenue sharing
  • Future-Proof: Sets up infrastructure for more decentralized features

What Changed for Users

  • Contributors: Contribution fees may change over time based on governance decisions
  • Creators: May receive additional revenue share on withdrawals
  • Token Holders: Can now participate in platform governance

Configuration

Admins need to configure two new environment variables:

  • FEE_REGISTRY_CONTRACT_ID - The deployed fee registry contract address
  • GOVERNANCE_TOKEN_ID - The governance token issuer address

Testing

Before deploying:

  1. Deploy the fee registry contract to testnet
  2. Run the database migration
  3. Test proposal creation and voting
  4. Verify fee calculations in contributions
  5. Confirm creator share calculations in withdrawals

closes #681

Nemenwq and others added 3 commits August 18, 2026 20:45
- Add Soroban fee registry contract with on-chain fee management
- Implement backend feeRegistry.js for fee caching and calculation
- Add governance.js service for proposal management and voting
- Create governance API routes for proposal CRUD operations
- Add database migrations for governance proposals and votes
- Update contribution flow to use on-chain fees
- Update withdrawal flow to include creator revenue share
- Build frontend /governance page with voting UI
- Add fee cache refresh cron job (5-minute interval)
- Configure environment variables for governance contract
- Replace process.env with import.meta.env for Vite compatibility
- Escape apostrophe in text to avoid react/no-unescaped-entities error
- Remove unused React import
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.

On-Chain Fee Registry, Creator Revenue Share & Community Voting

1 participant