SecurityPoolFactory
Deploys and registers portfolio question ledgers and their shared price feeds. No standalone deployment entry point exists. SecurityPoolFactory source contract
Read surface
Each question derives its start bond as max(1 REP, universe theoretical REP supply / 10,000,000). The factory has no standalone vault or debt minima. Deployment requires the configured operations and accounting delegates. securityPoolDeploymentCount and strict securityPoolDeploymentsRange enumerate canonical question ledgers. portfolioCount and strict portfoliosRange enumerate every caller that configured a portfolio namespace, in registration order; a listed address is not authenticated as a portfolio. getPoolId, getSecurityPool, getSecurityPoolOriginId and getSecurityPoolHasInheritedForkOutcome identify their lineage. getPortfolioOriginId includes the caller portfolio namespace. getSecurityPoolPortfolio authenticates its portfolio; sharedPriceFeeds is indexed by portfolio and universe. getChildPoolDependencies returns a prepared coordinator and a zero per-question auction address. Branch collateral repair auctions are created by the shared fork coordinator. zoltar identifies the protocol root.
State-changing interactions
Each call lists its parameter names in ABI order. The contract index defines the columns.
| Transaction | Caller | Main prerequisites | State or asset effect | Primary signals |
|---|---|---|---|---|
initializePortfolioPriceFeed(universeId, priorityFee) |
Anyone, within their own caller-address namespace | The universe has a REP token and has not forked. A repeated call must match the first call’s REP token and priority fee. The feed starts without an accepted price. This call neither registers a question nor allocates REP, and registration does not authenticate the caller as a portfolio. | The first call creates the caller namespace’s oracle configuration from the universe’s REP token and the priority fee, and appends the caller to the portfolio registry. Each call creates the namespace’s feed for that universe or returns the existing one. Portfolio setup calls this in its last stage, before any question is admitted. | PortfolioRegistered on the first call from a namespace; returns the canonical feed address. No question-deployment event. |
initializePortfolioPriceFeedForUniverse(universeId) |
A portfolio, within its own caller-address namespace | The caller has configured its namespace; the caller’s portfolio clock recognizes the target universe; the target REP token exists. | Creates or retrieves the caller namespace’s feed for an already registered child universe, using the oracle configuration from the namespace’s first initializePortfolioPriceFeed call. No question needs to be deployed first. |
Returns the canonical feed address; no question-deployment event. |
preparePortfolioPriceFeed(source, targetUniverse) |
Anyone | Canonical portfolio source; the portfolio clock recognizes the target; the target REP token exists. | Creates or retrieves a target universe feed in the canonical source pool’s portfolio namespace without moving provider capital. | Returns the canonical feed address. |
deployPortfolioSecurityPool(universeId, questionId, statoblastSecurityMultiplierBps, initialReportPriorityFeeAttoEthPerGas) |
Anyone, within their own caller-address namespace | The ordinary origin deployment checks apply; no lineage for this question/configuration has been claimed in the caller namespace. The namespace is derived from msg.sender and cannot be supplied on behalf of another pool. | Creates a separate origin ledger and share token in the caller namespace, attaching its coordinator to the namespace/universe shared REP/ETH feed. Portfolio admission calls this from the portfolio contract, after its immutable admission policy allows the question; it then enforces the question horizon, with failure reverting deployment. | SharedPriceFeedSet, feed CoordinatorRegistered, SecurityPoolRegistered, and DeploySecurityPool |
preparePortfolioChildPriceFeed(parent, outcomeIndex) |
Anyone | The parent is a canonical portfolio ledger in PoolForked state. Its namespace and oracle configuration determine the feed; Zoltar determines the selected child universe and its REP token. | Prepares the child universe’s REP token and shared feed in a separate transaction before creating a portfolio child ledger. Repeated preparation returns the same feed without moving capital or selecting any owner’s migration. | Returns the canonical child feed address; child REP deployment may emit Zoltar events. |
prepareChildPoolDependencies(parent, outcomeIndex) |
Anyone | The parent is a canonical ledger in PoolForked state. A portfolio must first prepare its child feed. Missing child REP is deployed through Zoltar. The authenticated factory chain exclusively controls subsequent coordinator binding. | Predeploys the canonical child coordinator separately from the question ledger. Repeated calls return the same coordinator; the auction result is zero because collateral repair auctions belong to shared portfolio branches. | Returns coordinator and auction addresses; no DeploySecurityPool until the child ledger is deployed. |
deployChildSecurityPool(parent, shareToken, universeId, questionId, statoblastSecurityMultiplierBps, currentRetentionRate, settlementCollateralAttoEth) |
SecurityPoolForker only (Only security pool forker) |
Parent is the canonical pool for its lineage; supplied share token equals the parent share token; no pool has already been claimed for the parent origin in the target universe; a portfolio child feed has already been prepared; deployment arguments satisfy downstream constructors and wiring. | Creates and registers a canonical child question ledger with the parent share token and a coordinator attached to its portfolio branch feed. It creates no per-question auction. | SecurityPoolRegistered, then DeploySecurityPool |