Page cover

microchipTechnical Architecture

Smart Contract Design

Go Fund Whale's smart contracts are the immutable backbone of the protocol. They ensure that donations flow automatically, that no single party can intercept or redirect funds, and that the system operates precisely as designed.

Core Components

1. Fee Accumulation Contract

This contract manages the collection of trading fees from DEX swaps.

Function: AccumulateFee(amount: u64, trader: Pubkey)
├─ Validates swap pair
├─ Calculates fee percentage
├─ Transfers SOL to fee wallet
├─ Emits AccumulationEvent
└─ Updates running total

Key properties:

  • Permissionless — any DEX can integrate

  • Non-custodial — user funds never touch the contract

  • Transparent — fee percentage hardcoded, cannot be changed without new deployment

  • Auditable — every accumulation event is logged

2. Donation Settlement Contract

This contract triggers every five minutes and distributes accumulated fees.

Key properties:

  • Permissionless trigger — any keeper can call (incentivized with small gas reimbursement)

  • Deterministic — distribution logic is fixed; no governance votes delay settlements

  • Atomic — all transfers succeed or all fail; no partial donations

  • Verifiable — every donation creates a transaction on-chain

3. Impact Registry

This contract maintains an on-chain record of:

  • Verified organizations (name, wallet, region)

  • Donation history (timestamp, amount, recipient)

  • Outcome metrics (linked to off-chain reports)

Upgrade & Governance

No governance token. Go Fund Whale operates on fixed mechanics, not community votes. This means:

  • No treasury debates that delay donations

  • No token-weighted voting that favors large holders

  • No governance attacks

Immutable mechanism. The core donation logic cannot be changed. If the community wants to adjust fee distribution, we deploy a new version of the protocol and migrate liquidity. The old version continues operating independently.

Transparent updates. Any parameter change (fee percentage, organization list, donation frequency) is proposed publicly, tested on devnet, and deployed to mainnet with a 7-day notice period. All changes are logged on-chain.

Gas Efficiency & Cost

The entire donation settlement costs are negligible even at high frequency (2-minute cycles). The cost is absorbed by the protocol and never passed to traders or organizations.

Solana's low-cost model is essential to Go Fund Whale's viability. Ethereum would make per-5-minute settlements prohibitively expensive.

Security Considerations

Reentrancy

All external calls are wrapped in checks-effects-interactions pattern. SOL transfers use transfer_checked which is reentrancy-safe.

Integer Overflow

All arithmetic uses Solana's built-in checked_add, checked_sub, checked_mul functions. Overflow reverts the transaction.

Last updated