May 2024
Bene transforms blockchain crowdfunding by implementing trustless fundraising with built-in investor protection. The platform enables projects to raise funds through smart contracts that automatically enforce refund conditions and ownership verification, eliminating the need for intermediaries while ensuring complete transparency and security for both project owners and contributors.
The system employs a SvelteKit frontend with TailwindCSS and shadcn/ui components for a modern, responsive interface. The application architecture separates concerns across three distinct layers: UI components, platform abstraction, and blockchain integration.
The core innovation lies in ErgoScript smart contracts that utilize the UTXO model's self-replicating boxes. Each funding project exists as a stateful box containing: Dual-token mechanism (APT + PFT), Seven on-chain parameters enforcing funding rules, and Cryptographic verification of ownership and contributions.
The platform implements a sophisticated two-token architecture:
Auxiliary Project Token (APT): Minted during project creation, serves as temporary receipt for contributions and unique project identifier. Total supply equals PFT supply plus one identifier unit.
Proof-funding Token (PFT): Pre-existing project token distributed only after refund conditions expire, ensuring traceability and preventing double-counting during refunds.
Project Creation → Token Minting → Smart Contract Deployment → Contribution Phase → Conditional Settlement. The system supports seven distinct transaction types: box creation, token acquisition, refund processing, ERG withdrawal, unsold token withdrawal, token addition, and auxiliary exchange. Each transaction type enforces specific contract conditions through ErgoScript validation.
On-chain registers store immutable parameters:
The primary challenge was designing a refund mechanism that maintains contribution traceability while preventing double-spending attacks. Traditional crowdfunding platforms rely on centralized databases, but blockchain immutability requires proactive fraud prevention.
Implementing the dual-token system required extensive ErgoScript development to ensure APT tokens could be reliably traced back to their origin project during refunds. If PFT tokens were distributed immediately, distinguishing between current and historical project contributions would be impossible.
The UTXO model presents unique state management challenges compared to account-based blockchains. Self-replicating boxes required meticulous validation logic ensuring every contract parameter persists correctly across transactions while allowing specific value changes (ERG balance, token counters).
Smart contract security demanded ultra-conservative validation. The system implements 12 separate validation checks for self-replication alone, verifying ID consistency, block limits, exchange rates, constants, metadata, scripts, and token integrity. A single validation failure prevents the entire transaction.
Ergo's eUTXO model enables parallel transaction processing but complicates state transitions. The platform needed sophisticated counter mechanisms tracking sold, refunded, and exchanged tokens independently to prevent accounting errors during concurrent transactions.
Bene successfully demonstrates that blockchain technology can democratize fundraising access while providing stronger investor protections than traditional platforms. The dual-token mechanism achieves 100% contribution traceability through cryptographic proof rather than database records.
What began as a crowdfunding tool evolved into a comprehensive exploration of trustless financial primitives, showing that proper smart contract design can eliminate intermediaries without sacrificing security or usability.
The project proves that decentralized crowdfunding can provide superior guarantees compared to centralized platforms: automatic refunds enforce through code rather than policy, ownership verification relies on cryptographic signatures rather than account permissions, and complete transparency emerges from immutable on-chain parameters rather than quarterly reports.
The platform achieves sub-second transaction confirmation on Ergo's 2-minute block time, with the Fleet SDK enabling seamless wallet integration and transaction building. The contract's self-replicating architecture demonstrates that UTXO-based state machines can match account-based smart contract flexibility when properly designed.
May 2024