Smart Contracts

Verified contracts, audits, and security details

Smart Contracts

Spray and Play's smart contracts are the foundation of the platform. All contracts are open source, verified, and audited.

Verified on Chain: All contracts listed below have verified source code published on their respective block explorers. You can inspect every line of code.

Contract Overview

Our smart contract architecture consists of three core systems:

1. Reserve System - Manages pooled capital and stability buffer

2. Spray System - Handles deposits and position creation

3. Payout System - Processes withdrawals and yield distribution

Verified Contract Addresses

Ethereum Mainnet

ContractAddressVersionStatus
SprayRouter0x...v2.1.0✅ Active
ReservePool0x...v2.0.2✅ Active
PayoutController0x...v2.1.0✅ Active
Timelock0x...v1.0.0✅ Active
ProxyAdmin0x...v1.0.0✅ Active

Base

ContractAddressVersionStatus
SprayRouter0x...v2.1.0✅ Active
ReservePool0x...v2.0.2✅ Active
PayoutController0x...v2.1.0✅ Active

Solana

ProgramAddressVersionStatus
SprayProgram...v1.0.0✅ Active
ReserveVault...v1.0.0✅ Active

Verify Before Interacting: Always verify contract addresses on official block explorers before approving transactions. Fake contracts are a common attack vector.

How to Verify Contracts

On EVM Chains (Ethereum, Base, etc.)

1. Visit Etherscan (or chain-specific explorer)

2. Search the address from the table above

3. Check the "Contract" tab

4. Verify:

- Contract source code is published

- Compiler version matches

- ABI is available

- Contract name matches expected

On Solana

1. Visit Solscan or SolanaFM

2. Search the program address

3. Check:

- Program is verified

- Source code matches GitHub

- Authority addresses are correct

Example Verification

Example: Verifying SprayRouter on Base

1. Go to basescan.org
2. Enter: 0x... [actual address]
3. Click "Contract" tab
4. Look for:
   ✅ Contract Source Code Verified (Exact Match)
   ✅ Compiler Version: v0.8.19+commit.7dd6d404
   ✅ Optimization Enabled: Yes, 200 runs

Contract Architecture

Reserve Pool

The Reserve Pool manages all deposited capital:

Key Functions:
- deposit()        // Receive user deposits
- allocate()       // Deploy capital to trenches
- rebalance()      // Adjust allocations
- emergencyExit()  // Circuit breaker

Safety Features:

  • 10% stability buffer requirement
  • Health checks before allocations
  • Emergency pause capability
  • Multi-sig required for parameter changes

Spray Router

Handles the spray (deposit) flow:

Key Functions:
- spray()          // Create new position
- sprayWithBoost() // Spray with boost points
- previewSpray()   // Calculate expected outcome
- getTrenchInfo()  // Read trench status

Safety Features:

  • Slippage protection
  • Minimum/maximum deposit limits
  • Trench availability checks
  • Position tracking

Payout Controller

Manages withdrawals and yield distribution:

Key Functions:
- withdraw()       // Process mature positions
- claimYield()     // Distribute earnings
- earlyExit()      // Force exit with penalty
- getPosition()    // Read position details

Safety Features:

  • Lock period enforcement
  • Anti-flash loan protections
  • Gradual withdrawal limits
  • Rate limiting

Audit History

Completed Audits

#### Trail of Bits - Q1 2026

DetailInformation
ScopeReservePool, SprayRouter, PayoutController
Duration4 weeks
Findings12 total (3 Critical, 4 High, 5 Medium)
StatusAll critical and high findings resolved

Key Findings Resolved:

  • C1: Missing balance deduction in spray flow ✅ Fixed
  • C2: Race condition in deposit processing ✅ Fixed
  • C3: Status deadlock in payout system ✅ Fixed

Report: View Full Report

#### OpenZeppelin - Q1 2026

DetailInformation
ScopeGovernance, Timelock, ProxyAdmin
Duration3 weeks
Findings8 total (0 Critical, 2 High, 6 Medium)
StatusAll findings resolved

Key Findings Resolved:

  • H1: Timelock duration inconsistency ✅ Fixed
  • H2: Missing event emissions ✅ Fixed

Report: View Full Report

Ongoing Audits

#### CertiK - In Progress

DetailInformation
ScopeFull platform audit
StartedFebruary 2026
Expected CompletionMarch 2026
Status🔄 In Progress

Audit Timeline

2026 Q1: Trail of Bits (Complete)
2026 Q1: OpenZeppelin (Complete)
2026 Q1: CertiK (In Progress)
2026 Q2: Planned re-audit of new features
2026 Q3: Continuous monitoring program

Security Features

Timelock Protection

24-48 Hour Delay: All critical parameter changes have a mandatory waiting period, giving users time to react.

Protected Operations:

  • Fee rate changes
  • Insurance buffer adjustments
  • Trench parameter updates
  • Contract upgrades

Timelock Flow:

1. Multi-sig proposes change
2. 24-48 hour waiting period begins
3. Users notified via Discord/Twitter
4. Waiting period expires
5. Multi-sig executes change

Upgradeable Proxies

Contracts use the OpenZeppelin proxy pattern:

  • Implementation: Contains logic (can be upgraded)
  • Proxy: Holds state (never changes)
  • Admin: Controls upgrades (timelocked + multi-sig)

Upgrade Process:

1. New implementation deployed

2. Upgrade proposed to timelock

3. 48-hour waiting period

4. Multi-sig executes upgrade

5. Old implementation preserved

Emergency Controls

Circuit Breakers:

FunctionTriggerEffect
Pause DepositsReserve health < 10%New sprays blocked
Pause WithdrawalsSuspicious activityWithdrawals delayed
Emergency ExitCritical vulnerabilityGraceful fund recovery

Multi-sig Requirements:

ActionSignatures RequiredParticipants
Emergency Pause2-of-3Security team
Parameter Change3-of-5Core team + advisors
Contract Upgrade4-of-7Core team + auditors

Code Quality Standards

Development Practices

  • ✅ 100% unit test coverage for financial functions
  • ✅ Formal verification for critical math
  • ✅ Fuzzing tests for edge cases
  • ✅ Slither static analysis
  • ✅ Mythril symbolic execution

Testing Infrastructure

Test TypeCoverageTools
Unit Tests>95%Hardhat, Foundry
Integration TestsFull flowsHardhat Network
FuzzingCritical functionsEchidna
Static AnalysisAll contractsSlither, Mythril

Bug Bounty Program

Rewards

We partner with Immunefi for bug bounty management.

SeverityReward Range
CriticalUp to $100,000
HighUp to $50,000
MediumUp to $10,000
LowUp to $2,000

Scope

In Scope:

  • All deployed smart contracts
  • Contract upgrade mechanisms
  • Admin functions and timelock

Out of Scope:

  • Frontend code
  • Third-party dependencies
  • Already disclosed audit findings

How to Report

1. Visit Immunefi - Spray and Play

2. Submit detailed report

3. Allow 48 hours for response

4. Responsible disclosure required

Contract Verification Tools

Recommended Tools

ToolPurposeLink
EtherscanContract verificationetherscan.io
TenderlyTransaction simulationtenderly.co
DefiSafetyProtocol safety scoresdefisafety.com
ExponentialDeFi risk assessmentexponential.fi

Simulation Before Signing

Use Tenderly to simulate transactions before signing:

1. Connect your wallet

2. Initiate the transaction (don't sign)

3. Copy the transaction data

4. Paste into Tenderly Simulator

5. Review exact state changes

6. Sign only if simulation looks correct

GitHub Repository

All contract source code is open source:

Verify on Chain: While we maintain open source code, always verify the deployed contract matches the GitHub source before interacting.

Documentation

Technical Docs

Developer Resources

Security Contacts

---

Contracts last updated: February 2026

Next audit scheduled: Q2 2026