PRIV ProtocolPRIV Docs
Contracts

FounderPerformanceBond

Locks founder tokens against TVL milestones with M-of-N oracle consensus, ensuring accountability through on-chain performance verification.

Overview

FounderPerformanceBond holds founder PRIV tokens in escrow and releases them only when the protocol reaches verified TVL milestones. TVL is reported via M-of-N oracle consensus with a 24-hour heartbeat requirement. Milestone parameters can only be changed through a 7-day timelock.

PropertyValue
ContractFounderPerformanceBond
Address (Base Sepolia)0xb54b34BaA906C8C6895430c07b3942E349cfeE8E
Bond Amount5,000,000 PRIV
Min Oracle Confirmations2
Oracle Heartbeat24 hours
Milestone Update Timelock7 days
Max Milestones10
NetworkBase (Chain ID: 8453)

Milestones

#TVL TargetCumulative ReleaseTokens Unlocked
1$1M10%500,000 PRIV
2$5M30%1,500,000 PRIV
3$10M60%3,000,000 PRIV
4$25M100%5,000,000 PRIV

Release percentages are cumulative. Reaching milestone 2 unlocks 30% of the total bond minus any previously claimed amount.


How It Works

Oracles report TVL  -->  Consensus reached (2-of-N)  -->  TVL confirmed on-chain
                                                                |
                                                                v
Founder calls claimMilestones()  -->  All reached milestones paid out in single tx

TVL Reporting

Multiple oracles independently submit TVL values. When a value receives the required number of confirmations (minOracleConfirmations), it becomes the confirmed TVL. Oracles must maintain activity via a 24-hour heartbeat or their reports are rejected as stale.

Claiming

The founder calls claimMilestones() to claim all milestones where confirmedTVL >= tvlTarget. Multiple milestones can be claimed in a single transaction. Milestones are processed in order and each can only be claimed once.


Key Functions

reportTVL

Submit a TVL observation. Oracle-only. Automatically confirms when consensus is reached.

function reportTVL(uint256 tvl) external

claimMilestones

Claim all reached milestones. Founder-only. Transfers released tokens to the founder address.

function claimMilestones() external

depositBond

Deposit PRIV tokens into the performance bond. Anyone can call (requires prior token approval).

function depositBond(uint256 amount) external

View Functions

function getNextMilestone() external view returns (uint256 index, uint256 tvlTarget, uint256 releasePercent)
function getClaimableAmount() external view returns (uint256)
function getRemainingLocked() external view returns (uint256)
function isOracleActive(address oracle) external view returns (bool)

Admin Functions

FunctionDescription
addOracle(address) / removeOracle(address)Manage the oracle set
setMinOracleConfirmations(uint8)Adjust consensus requirement
proposeMilestoneUpdate(uint256, uint256)Propose a TVL target change (7-day timelock)
executeMilestoneUpdate() / cancelMilestoneUpdate()Execute or cancel pending update
pause() / unpause()Circuit breaker
emergencyWithdraw(address)Recovery after all milestones claimed

Security

  • Oracle consensus: No single oracle can confirm TVL. M-of-N agreement is required.
  • Heartbeat enforcement: Stale oracles (no heartbeat within 24 hours) cannot submit reports.
  • Timelocked milestone changes: Milestone TVL targets can only be changed after a 7-day delay.
  • One-way claims: Each milestone can be claimed exactly once. Re-claiming is blocked.
  • Reentrancy protection: All token-transferring functions use nonReentrant.
  • Emergency withdraw restricted: Only available after all milestones have been claimed.

Source Code

View on GitHub