Cardano Deposit Crowdfunding
Smart Contract Specification
Overview
To ideate, design and develop an open source smart contract who enables ADA holders to collaboratively fund the deposit required to submit a governance action on Cardano onchain governance. The goal is to allow trustless crowdfunding and exact refunds while respecting the rules of on-chain governance (CIP-1694 & Constitution).
Ultimately removing financial barriers for Cardano citizens who want to engage in Onchain Governance by submitting Governance Actions
Project Owner: Mesh
Development lead: Hinson & Ken (SIDAN Lab)
Mesh Multisig Integration: Quirin
Support: Mike Hornan & Adam Rusch
Audit: TxPipe
Estimate time for development: ~3 weeks, to be completed in July 2025
Core Behaviors & Requirements
1. ADA-Only Contributions
- The contract only accepts ADA (Lovelace).
- All transactions involving native tokens must be .
2. Open, Flexible Contributions
- can contribute any amount of ADA toward the 100,000 ADA goal.
- No whitelist or cap per contributor.
- Contributions are cumulative until the threshold is reached.
3. Tracking Individual Contributions
- Each contributor’s exact contribution must be recorded.
- This is needed to ensure precise and fair refunds.
- Can be done via per-user UTxOs with datums or a central tracking datum.
4. Early Withdrawals Before Goal
- Contributors can withdraw their ADA at any time before the 100k ADA goal is reached.
- The smart contract validator must allow UTxOs to be consumed and returned to the contributor if the pool is still “open.”
5. Locking Upon Goal Reached
- is contributed, the pool is locked.
- Further contributions and voluntary withdrawals are no longer permitted.
- At this point, the funds are ready to be used for submitting the governance action.
6. Open Governance Action Submission
- The contract should allow submission transactions to consume the locked UTxO and transfer the funds into the governance system.
- gov action type and content has to be provided by creator of a deposit, deposit initiator = ga proposer.
- Gov action submitted onchain once deposit trheshold is met
7. Campaign Deadline & Failure Case
- A time-based deadline (measured in epochs) is set from the time of the first contribution.
- If the 100k ADA target is not reached within this time, the campaign is considered failed.
- After the deadline, funds are automatically returned to the contributors wallets.
8. Exact Refunds on Failure
- In a failed campaign, each contributor must receive exactly the amount they originally contributed.
- Refunds must be precise, and account for minimal UTxO requirements.
9. Refunds After Governance Action Ends
- After the governance action is either enacted or expired, the 100k ADA deposit is refunded by protocol.
- These funds return to the contract address and become withdrawable.
- Each contributor may withdraw their original share exactly as before.
- from initial deposit until treshold must be met: 6 epochs.
if threshold is not met, funds automatically returned to contributors
10. DRep Registration & Voting Mechanism
-
Registration and Certificates:
- Stake Registration: The contract should automatically generate a Stake Registration Certificate (2 ADA) for the deposit return address.
- DRep Registration: The contract should also generate a DRep Registration Certificate (500 ADA) for the DRep.
- Delegation Certificate to DRep: The contract must issue a Delegation Certificate to delegate the voting power of the crowdfunding contract’s ADA to the crowdfunding contract's DRep ID. This delegation should occur when the governance action is submitted on-chain.
- Delegation Certificate to Stake Pool (Optional): The contract MAY issue a Delegation Certificate to delegate the stake of the crowdfunding contract’s ADA to a specific Stake Pool Operator (SPO). This delegation should happen during the crowdfunding period, as it will have no effect on staking rewards while the governance action is active on-chain. However, the delegation will still be used for voting power during the governance action.
-
Max Crowdfunding Limit:
-
The total limit for the crowdfunding contract should be set to 100,510 ADA to account for the 100,000 ADA pool and the 2 ADA for Stake Registration and 500 ADA for DRep Registration.
-
Single Transaction for All Certificates and Governance Action:
All the following actions should be bundled into a single transaction:
-
Submitting the DRep Registration Certificate.
-
Submitting the Stake Registration Certificate.
-
Submitting the Delegation Certificate for the crowdfunding DRep ID.
-
Submitting the Vote Certificate for the DRep to vote YES on the governance proposal tied to the crowdfunding. (The TX ID with index 0 = gov-action ID)
-
Submitting the Governance Action itself (the proposal) using the crowdfunding pool funds
-
DRep Voting Conditions:
once deposit treshold is met, smart contract creates DRep for each gov action, set as default vote yes for respective GA, allow ada holder to directly support specific GA by delegating to ga-DRep. GA DRep retires once GA lifetime is met
-
Vote Limitations: The GA DRep is only allowed to vote YES on the governance proposal that is tied to the crowdfunding campaign and no other governance proposals. The GA DRep should not be able to participate in any other governance actions outside the scope of the crowdfunding.
-
Vote Power: The DRep's voting power is derived from the funds in the crowdfunding pool, but the crowfunding stake address will not generate staking rewards while the governance action is active on-chain.(If also delegated to a stake pool)
-
Post-Governance Action:
- After the governance action is enacted or expired, the crowdfunding contract must unregister the DRep in order to reclaim the 500 ADA registration deposit. This unregistration must happen in the same transaction as the withdrawal of the governance action deposit that has been returned.
- The DRep's delegation status is not relevant at this stage; only the unregistration certificate is required to recover the deposit.
- Any leftover funds or rewards generated during the crowdfunding period should be dealt with according to your refund protocol.
Optional Enhancements
- State machine pattern: Use states like
Open
, Locked
, and Refundable
for clearer logic.
- Overshoot handling: Prevent or adjust contributions that would push the total over 100k ADA.
- Minimal UTxO guardrails: Ensure refunds don't fall below protocol-required values.
- Logging: Include contribution metadata in datums to support off-chain indexing and transparency.
Notes
- once deposit treshold is met, smart contract creates DRep for each gov action, set as default vote yes for respective GA, allows ada holders to directly support specific GA by delegating to ga-DRep
- ga type & content included in creation of ga-deposit action
Outcomes:
Acceptance Criteria:
Evidence of completion:
Post-development KPIs
% of gov actions using smart contract out of total submitted gov actions over time
Target: