OmniPools enables one-click prize payouts using Flow Actions with weak guarantees.
Vaults.cdc
- Manages pools, participants, winners
- Tracks operation IDs for audit trail
- Supports weak guarantees (skip failed transfers)
Registry.cdc
- Organization and creator badge management
- Access control for vault operations
Source → Sink Pattern
// tx_payout_split.cdc
transaction(org: Address, vaultId: UInt64) {
prepare(signer: auth(Storage) &Account) {
// Withdraw from org vault
// Deposit to winners with weak guarantees
}
execute {
// Skip failed transfers, log misses
// Emit PayoutExecuted event
}
}If recipient missing capability:
- ✅ Skip transfer (don't revert)
- ✅ Log miss for manual follow-up
- ✅ Continue with other winners
- Optimized configuration with
config.load() - Automatic contract address resolution
- Multi-network support (local/testnet/mainnet)
- NetworkProvider: FCL configuration and network switching
- FlowConnect: Wallet connection status
- TransactionExecutor: UI-based transaction execution
- VaultData: Real-time blockchain data fetching
- Scripts query blockchain for vault data
- UI displays real-time information
- User executes transactions via FCL
- Events update UI automatically
event PayoutExecuted(
vaultId: UInt64,
operationId: UInt64,
totalPaid: UFix64
)Operation IDs enable:
- Audit trail of all payouts
- Tracking total amounts paid
- Linking to external receipts
- Analytics and reporting
- Multi-signature: Service account holds funds
- Role-based access: Operators can execute payouts
- Audit trail: All operations logged on-chain
- Weak guarantees: Resilient to individual failures