A milestone-based funding platform with jury voting system for early-stage projects. Built with Factory Pattern for scalability and advanced governance features.
| Repository | Description | Status |
|---|---|---|
| Frontend | Next.js web application with React & Material-UI | โ Active |
| Backend | AI Multiagent system for deck and document analysis | โ Active |
| Smart Contracts | Solidity contracts with Hardhat & TypeScript | โ Active |
VenturePilot revolutionizes early-stage project funding by implementing a milestone-based approach where investors commit funds that are only released when specific project milestones are approved by an authorized jury. This system ensures accountability, reduces risk, and enables partial funding with community governance.
graph TB
subgraph "Factory Layer"
Factory[VenturePilotFactory]
Factory --> AuthorizeJurors[Authorize Jurors]
Factory --> CreateRounds[Create Rounds]
Factory --> TrackRounds[Track Rounds]
end
subgraph "Round Layer"
Round1[VenturePilotRound #1]
Round2[VenturePilotRound #2]
RoundN[VenturePilotRound #N]
end
subgraph "Governance"
Jury[Jury Members]
Community[Community Triggers]
Founders[Project Founders]
Investors[Investors]
end
Factory --> Round1
Factory --> Round2
Factory --> RoundN
Jury --> Round1
Jury --> Round2
Jury --> RoundN
Community --> Round1
Community --> Round2
Community --> RoundN
Founders --> Round1
Founders --> Round2
Founders --> RoundN
Investors --> Round1
Investors --> Round2
Investors --> RoundN
classDef factory fill:#e1f5fe,stroke:#0277bd,stroke-width:2px
classDef round fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef governance fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
class Factory factory
class Round1,Round2,RoundN round
class Jury,Community,Founders,Investors governance
sequenceDiagram
participant F as Factory Owner
participant Founder as Project Founder
participant Investor as Investor
participant Jury as Jury Member
participant Community as Community
participant Round as Round Contract
F->>+Factory: authorizeJuror(juror)
Factory-->>-F: โ
Juror authorized
Founder->>+Factory: createFundingRound(token, amount, deadline, milestones)
Factory->>+Round: Deploy new round
Round-->>-Factory: Round created
Factory-->>-Founder: Round ID & Address
Founder->>+Round: whitelistInvestor(investor)
Round-->>-Founder: โ
Investor whitelisted
Investor->>+Round: invest(amount)
Round-->>-Investor: โ
Investment recorded
Note over Round: Funding deadline reached
Round->>Round: Move to Execution Phase
Community->>+Round: triggerMilestoneDeadline(milestoneId)
Round-->>-Community: โ
Voting started
Jury->>+Round: castJuryVote(milestoneId, approve)
Round-->>-Jury: โ
Vote recorded
Note over Round: Jury approves milestone
Founder->>+Round: completeMilestone(milestoneId)
Round-->>-Founder: โ
Milestone completed
Note over Round: 24h verification delay
Founder->>+Round: releaseFunds(milestoneId)
Round-->>-Founder: ๐ฐ Funds released
- ๐ Partial Funding: Rounds can proceed with partial funding
- ๐ณ๏ธ Jury Voting: 3 authorized wallets decide milestone approval
- โฐ Deadline System: Specific deadlines per milestone
- ๐ซ Restricted Voting: Only jury can vote (not founders/investors)
- ๐ Community Triggers: Anyone can activate deadline voting
- ๐ญ Factory Pattern: Scalable and gas-optimized deployment
- ๐ก๏ธ Security First: ReentrancyGuard, SafeERC20, comprehensive validations
- ๐จ Emergency Features: Pause, cancel, withdrawal protections
- ๐ฐ Proportional Release: Funds released proportionally to funding achieved
- ๐ฅ Whitelist System: Founder-controlled investor access
- ๐ Multiple Rounds: Independent rounds per project
- ๐ Transparent Tracking: Full visibility of funding and milestones
- โก Automatic Transitions: Smart phase management
# Clone and setup
git clone https://github.com/TomasDmArg/money-mule-contracts.git
cd money-mule-contracts
npm install
# Compile contracts
npm run compile
# Run tests
npm run test
# Deploy demo system
npm run deploy:factory| Contract | Address | Network |
|---|---|---|
| VenturePilotFactory | 0xa1820208Dff37B39a8a324e82E3449283e21703b |
Saga Chainlet |
| USDC Token | 0xA2bE65F0Bfb810eF7B17807F3cd10D428f989A4a |
Saga Chainlet |
| Parameter | Value |
|---|---|
| Chain ID | 2751721147387000 |
| RPC URL | https://moneymule-2751721147387000-1.jsonrpc.sagarpc.io |
| Explorer | https://moneymule-2751721147387000-1.sagaexplorer.io |
- ๐ Smart Contract Documentation - Complete technical documentation
- ๐ช USDC Token Guide - Token deployment and configuration
// Factory owner authorizes jurors
await factory.authorizeJuror(juror1.address);
await factory.authorizeJuror(juror2.address);
await factory.authorizeJuror(juror3.address);// Founder creates funding round
const milestones = [{
description: "MVP Development",
fundingAmount: ethers.parseEther("40"),
deadline: fundingDeadline + 86400,
juryWallets: [juror1, juror2, juror3]
}];
const [roundId, roundContract] = await factory.createFundingRound(
tokenAddress,
ethers.parseEther("100"),
fundingDeadline,
milestones
);// Founder whitelists investors
await round.whitelistInvestor(investor.address);
// Investors contribute funds
await round.invest(ethers.parseEther("50"));// Community triggers milestone deadline
await round.triggerMilestoneDeadline(1);
// Jury votes on milestone completion
await round.castJuryVote(1, true); // Approve
// Founder completes milestone
await round.completeMilestone(1);
// Funds released after verification delay
await round.releaseFunds(1);# Run all tests
npm run test
# Run with coverage
npm run test:coverage
# Clean and rebuild
npm run clean && npm run compile- โ Factory management & juror authorization
- โ Round creation & validation
- โ Funding phase & investor whitelisting
- โ Jury voting system & deadline triggers
- โ Milestone completion & fund release
- โ Investment withdrawal & edge cases
- โ Complete lifecycle integration tests
# ๐ญ Factory Deployment
npm run deploy:factory # Full demo deployment
npm run deploy:production # Production deployment
npm run manage:factory # Post-deployment management
# ๐ฌ Demo & Testing
npm run demo:factory # Complete lifecycle demo
npm run demo:factory:local # Local demo
# ๐ช USDC Token
npm run deploy:usdc # Deploy USDC token
npm run mint:usdc # Mint USDC tokens# Required
PRIVATE_KEY=your-private-key-here
FACTORY_ADDRESS=0xa1820208Dff37B39a8a324e82E3449283e21703b
# For demo accounts
PRIVATE_KEY_2=second-account-private-key
PRIVATE_KEY_3=third-account-private-key
# Network configuration
SAGA_RPC_URL=https://moneymule-2751721147387000-1.jsonrpc.sagarpc.io// Core Functions
function createFundingRound(
address token,
uint256 targetAmount,
uint256 fundingDeadline,
MilestoneData[] calldata milestones
) external returns (uint256 roundId, address roundContract);
function authorizeJuror(address juror) external;
function revokeJuror(address juror) external;
// View Functions
function getRoundContract(uint256 roundId) external view returns (address);
function getFounderRounds(address founder) external view returns (uint256[] memory);
function isAuthorizedJuror(address juror) external view returns (bool);// Investment Functions
function whitelistInvestor(address investor) external;
function invest(uint256 amount) external;
function withdrawInvestment(uint256 amount) external;
// Milestone Functions
function triggerMilestoneDeadline(uint256 milestoneId) external;
function castJuryVote(uint256 milestoneId, bool approve) external;
function completeMilestone(uint256 milestoneId) external;
function releaseFunds(uint256 milestoneId) external;- ๐ก๏ธ Reentrancy Guard: All critical functions protected
- ๐ Access Control: Role-based permissions with validation
- โ Input Validation: Comprehensive parameter checking
- ๐จ Emergency Controls: Pause, cancel, emergency recovery
- ๐ Safe Transfers: OpenZeppelin SafeERC20 implementation
- ๐ฏ Voting Isolation: Only authorized jury members can vote
- โฐ Time Controls: Deadlines and verification delays
- ๐ Transparent Process: All actions emit comprehensive events
- ๐ฐ Fund Protection: Multiple withdrawal conditions and safeguards
graph LR
A[Create Round] --> B[Whitelist Investors]
B --> C[Receive Funding]
C --> D[Trigger Milestone]
D --> E[Jury Votes]
E --> F[Complete Milestone]
F --> G[Release Funds]
classDef success fill:#e8f5e8,stroke:#388e3c,stroke-width:2px
class A,B,C,D,E,F,G success
graph LR
A[Create Round] --> B[Partial Funding]
B --> C[Proportional Milestones]
C --> D[Scaled Fund Release]
classDef partial fill:#fff3e0,stroke:#f57c00,stroke-width:2px
class A,B,C,D partial
graph LR
A[Trigger Milestone] --> B[Jury Votes]
B --> C[Milestone Rejected]
C --> D[Investor Withdrawal]
classDef rejected fill:#ffebee,stroke:#d32f2f,stroke-width:2px
class A,B,C,D rejected
- ๐จ Hardhat 3: Development framework
- ๐ก๏ธ OpenZeppelin: Security standards
- โก Ethers.js v6: Ethereum library
- ๐ Saga Chainlet: Deployment network
- ๐ TypeScript: Type safety
- ๐ญ Factory Pattern: Scalable round deployment
- โ๏ธ Jury Governance: Decentralized milestone approval
- ๐ Partial Funding: Flexible funding thresholds
- ๐ Community Triggers: Permissionless deadline activation
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ฐ Funding Restriction: Only invest during funding phase
- ๐ณ๏ธ Voting Restriction: Only authorized jury votes
- โฐ Community Trigger: Anyone can activate deadline voting
- ๐ Proportional Release: Funds released proportionally to funding achieved
- ๐จ Emergency Safety: Owner controls for critical situations
๐ Complete milestone-based funding with jury governance!