🚨 SMART CONTRACT SECURITY DISCLAIMER
These smart contracts are part of a hackathon project and are NOT PRODUCTION READY. Important considerations:
- NO AUDIT: These contracts have not undergone a professional security audit
- EXPERIMENTAL: The code is experimental and may contain bugs or vulnerabilities
- HIGH RISK: Do not use these contracts with substantial amounts of funds
- IN DEVELOPMENT: The contract architecture may change significantly
- TEST ONLY: Only use on testnet for demonstration purposes
While we follow smart contract security best practices and our code is based on the battle-tested Pool-Escrow architecture, this implementation is still experimental and meant for hackathon demonstration purposes only.
- Overview
- Project Origins
- Smart Contract Architecture
- Development Setup
- Testing & Deployment
- Security Features
- Documentation
The SwipePad smart contracts power our decentralized donation platform on Celo, enabling secure and transparent micro-donations through MiniPay. Our core contract, DonationPool
, manages the entire lifecycle of donation campaigns with two flexible funding models.
SwipePad's smart contract architecture is built upon the foundation of Pool-Escrow, another successful project from our team that powers PoolParty.cc. We've forked and adapted the core Pool contract architecture to create a specialized version for handling charitable donations with the following enhancements:
- Specialized for charitable donations and impact campaigns
- Integration with MiniPay for mobile-first UX
- Additional funding models (All-or-Nothing & Keep-What-You-Raise)
- Enhanced dispute resolution for charitable contexts
- Multi-currency support focused on Celo stablecoins
- Optimized fee structure for micro-donations
- Campaign creation and management
- Multi-currency donation support (cUSD, cEUR, cKES)
- Flexible funding models (All-or-Nothing & Keep-What-You-Raise)
- Role-based access control
- Emergency pause functionality
- Dispute resolution system
- Comprehensive event logging
The heart of our platform, built upon Pool-Escrow's battle-tested architecture, enabling:
- Campaign creation and management
- Secure donation handling
- Platform fee management
- Emergency controls
- Dispute resolution
- DonationConstantsLib: Configuration constants
- DonationEventsLib: Event definitions
- DonationErrorsLib: Custom error handling
- DonationPoolAdminLib: Administrative functions
- DonationPoolBalanceLib: Balance management
- DonationPoolDetailLib: Campaign details
- DonorDetailLib: Donor information
- OpenZeppelin:
Ownable2Step
: Secure ownership transfersPausable
: Emergency stop functionalityAccessControl
: Role-based permissions
- Pool-Escrow:
- Core escrow functionality
- Base contract patterns
- Security features
# Clone the repository
git clone https://github.com/your-username/swipe-pad
cd swipe-pad/contracts
# Install dependencies
forge install
forge build
forge test
forge fmt
forge snapshot
anvil
forge script script/DonationPool.s.sol:DonationPoolScript --rpc-url <your_rpc_url> --private-key <your_private_key>
- Two-Step Ownership: Safe ownership transfers
- Role-Based Access: Granular permission control
- Emergency Pause: Quick response to issues
- Dispute Resolution: Handle problematic campaigns
- Safe Token Transfers: Secure token handling
- Events & Logging: Full transparency
We welcome contributions! Please check our Contributing Guidelines before submitting PRs.
This project is licensed under the MIT License - see the LICENSE file for details.