SecurityPool
Question ledger for one shared portfolio, question and universe. Shares and reporting are question-specific; provider capital, settlement cash and fees are accounted centrally. SecurityPool source contract
Read surface
Read portfolio owner positions from the capital ledger and question fee streams from the settlement book. After portfolio binding, question storage mirrors settlement cash, share supply and lastSettlementPortfolioTime, the portfolio time of its last checkpoint. Fee stream deadlines use native time; question storage does not enumerate owners. getTotalPoolHeldAttoRep is always zero because provider capital is central. getCurrentMintingCapacityAttoEth is zero after reporting starts; otherwise it includes current question collateral and available shared capacity. attoSharesToAttoEth, attoSharesToAttoRep and attoEthToAttoShares quote central settlement including fork recovery rights. isEscalationResolved recognizes inherited final outcomes and locally finalized reports. getFeeEpochEndTime is the native fee cutoff, bounded by the universe fork time. Additional validated configuration and accounting getters: questionId, universeId, initialEscalationGameDepositAttoRep, zoltar, parent, shareToken, repToken, openOraclePriceCoordinator, openOracle, escalationGameFactory, eventEmitter, escalationGame, questionData, securityPoolForker, collateralRepairAuction, securityPoolFactory, settlementCollateralAttoEth, statoblastSecurityMultiplierBps, shareTokenSupplyAttoShares, awaitingForkContinuation, systemState, portfolioCustody.
Security assumptions
Price-sensitive withdrawal, commitment-increase, and liquidation calls depend on A16 timely inclusion, A21 genesis REP and WETH behavior, A19 observable correctable price, and A06 lifecycle executors. User-initiated pool calls additionally depend on A28 account authority.
State-changing interactions
Each call lists its parameter names in ABI order. The contract index defines the columns. All deployed question ledgers belong to a portfolio. Providers use its capital ledger for deposits, commitments, health targets, retirement and liquidation. Reporters fund separate reporter custody with wallet REP. Purchases use the registered portfolio route; traders redeem through the question ledger. There is no standalone vault, tick auction or operation queue.
| Transaction | Caller | Main prerequisites | State or asset effect | Primary signals |
|---|---|---|---|---|
setPortfolioCustody(custody) |
The canonical portfolio | Nonzero custody; not already bound; caller matches factory registration. | Binds its central capital ledger once and registers the question fee stream. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
creditEscalationSurplus(amountAttoRep) |
The active escalation game | Caller matches the configured game; REP has already been transferred. | Transfers irrevocable surplus REP to the portfolio for vested provider earnings. Reporter principal remains separate. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
refreshPortfolioFees() |
Anyone | Central accounting is bound. | Refreshes the question linear stream and settlement mirrors. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
burnEscalationWinnerHaircut(amountAttoRep) |
The active escalation game | Caller matches the configured game; REP has already been transferred. | Burns the winning settlement haircut through Zoltar. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
createCompleteSet() with ETH |
The registered portfolio purchase route | Operational unforked universe, reporting not started, question not ended, authenticated purchase and sufficient healthy backing. | Mints question complete sets using central settlement cash and shared backing. The portfolio transfers the resulting shares to the buyer. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
redeemCompleteSet(amountAttoShares) |
A complete-set holder | Operational unforked universe; holder has all outcome shares. | Burns complete sets and pays their current ETH and recovery REP entitlement. Released exposure becomes available to the portfolio. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
redeemShares() |
A winning-share holder | Operational question with a final outcome; finalized claims retain their protected settlement path. | Burns winning shares and pays their central ETH and recovery REP entitlement. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
depositWalletRepToEscalationGame(outcome, maximumDepositAttoRep) |
Any reporter | Valid outcome, wallet allowance and balance, operational reporting window; no inherited fixed outcome. | Transfers accepted wallet REP into separate reporter custody and records the chosen outcome; creates the game if needed. | EscalationGameSet when the game is created, followed by reporter deposit and REP transfer events. |
withdrawFromEscalationGame(outcome, depositIndexes) |
Anyone, for one recorded depositor | Operational question and final outcome; unresolved parent claims follow the child settlement path. | Settles the supplied local deposit indexes. Payout goes to the recorded owner; losing claims receive no REP. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
withdrawForkedEscalationDeposits(outcome, proofs) |
Anyone, for one recorded depositor | Operational finalized question, valid unconsumed proofs, one depositor per batch. | Settles authenticated inherited leaves without migrating every reporter. Bounded checkpoints prepare deep history; payouts go to the recorded owner. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
updateSettlementCollateral() |
Anyone | Central accounting is bound. | Checkpoints central question fees and updates the local settlement mirror. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
updateRetentionRate() |
Anyone | Central accounting is bound. | Refreshes the central linear fee stream. No standalone retention curve is maintained. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
setStartingParams(currentRetentionRate, initialCollateral) |
The factory | Factory authentication; deployment initialization. | Initializes the question fee clock and settlement mirror. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
activateForkMode() |
The canonical forker | No inherited fixed outcome; the central fork checks apply. | Freezes shared portfolio accounting and marks the question forked. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
initializeForkedEscalationGame(startBondAttoRep, nonDecisionThresholdAttoRep, elapsedAtFork, fixedQuestionOutcome) |
The canonical forker | No existing game. | Deploys a continuation game with the inherited bond, threshold, elapsed time and outcome. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
initializeForkCarryOutcome(sourceGame, snapshotId, peaks, leafCount, carryTotalAttoRep, resolutionBalanceAttoRep, nullifierRoot) |
SecurityPoolForker only |
A game is configured; it is a fork continuation with fewer than three initialized outcomes; leaf counts fit the MMR; every call supplies the same source and nonzero snapshot ID, with the next outcome’s data; the third call verifies the full commitment. | Installs the next outcome of the continuation game’s canonical snapshot. Three calls complete its immutable carry peaks, counts, totals, resolution balances, and normalized nullifier roots. | ForkCarryCheckpoint on completion of the third outcome |
resumeForkedEscalationGame() |
Anyone | Complete authenticated carry snapshot and funded central reporter custody. | Resumes a prepared continuation at its fixed portfolio time anchor. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
setAwaitingForkContinuation(shouldAwait) |
SecurityPoolForker only |
No lifecycle or value-change guard. | Stores whether complete-set minting must wait for continuation initialization, then refreshes bound portfolio fee accounting. | AwaitingForkContinuationSet, including for a repeated value; bound pools then emit central checkpoints and stream replacement when applicable |
setSystemState(newState) |
SecurityPoolForker only |
No transition or value-change guard. | Replaces the pool lifecycle state directly, then refreshes bound portfolio fee accounting. | SystemStateSet, including for a repeated state; bound pools then emit central checkpoints and stream replacement when applicable |
setShareTokenSupplyAttoShares(newShareTokenSupplyAttoShares) |
The canonical forker | Caller is the immutable forker. | Initializes the child question share-supply mirror. | Relevant share, reporting or central accounting events; no standalone vault accounting. |
authorizeChildPool(pool) |
SecurityPoolForker only |
This parent pool is already authorized; candidate reports this share token; candidate universe has no different canonical pool. No pool-lifecycle guard. | Asks the lineage share token to establish pool as the canonical authorized pool for its universe; reauthorizing the same pool is a no-op. |
AuthorizationUpdated only on first authorization; no event when already authorized |
Direct ETH transfer to receive() |
Portfolio transfers and permitted initialization senders | Bound portfolio, or the configured parent, forker or auction sender before binding. | Accepts ETH; unsolicited ETH creates no settlement or provider claim. | Relevant share, reporting or central accounting events; no standalone vault accounting. |