Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IHousePool

Git Source

Two-tranche USDC pool that acts as counterparty to CFD traders. Senior tranche earns fixed yield; junior absorbs first-loss and excess profit.

Functions

seniorPrincipal

Total USDC attributed to the senior tranche (6 decimals)

function seniorPrincipal() external view returns (uint256);

juniorPrincipal

Total USDC attributed to the junior tranche (6 decimals)

function juniorPrincipal() external view returns (uint256);

seniorHighWaterMark

Senior high-water mark used to block dilutive recapitalizing deposits.

function seniorHighWaterMark() external view returns (uint256);

unassignedAssets

Accounted LP assets currently quarantined pending explicit bootstrap / assignment (6 decimals)

function unassignedAssets() external view returns (uint256);

depositSenior

function depositSenior(
    uint256 amount
) external;

withdrawSenior

function withdrawSenior(
    uint256 amount,
    address receiver
) external;

depositJunior

function depositJunior(
    uint256 amount
) external;

withdrawJunior

function withdrawJunior(
    uint256 amount,
    address receiver
) external;

assignUnassignedAssets

Explicitly bootstraps quarantined LP assets into a tranche and mints matching shares.

function assignUnassignedAssets(
    bool toSenior,
    address receiver
) external;

initializeSeedPosition

Seeds a tranche with permanent share-backed minimum ownership using real USDC.

Canonical deployment should initialize both tranche seeds before enabling ordinary LP lifecycle.

function initializeSeedPosition(
    bool toSenior,
    uint256 amount,
    address receiver
) external;

getMaxSeniorWithdraw

Max withdrawable by senior, capped by free USDC

function getMaxSeniorWithdraw() external view returns (uint256);

getMaxJuniorWithdraw

Max withdrawable by junior, subordinated behind senior

function getMaxJuniorWithdraw() external view returns (uint256);

getPendingTrancheState

Read-only tranche state as if reconcile() ran immediately with current inputs.

function getPendingTrancheState()
    external
    view
    returns (
        uint256 seniorPrincipalUsdc,
        uint256 juniorPrincipalUsdc,
        uint256 maxSeniorWithdrawUsdc,
        uint256 maxJuniorWithdrawUsdc
    );

Returns

NameTypeDescription
seniorPrincipalUsdcuint256Simulated senior principal after reconcile (6 decimals)
juniorPrincipalUsdcuint256Simulated junior principal after reconcile (6 decimals)
maxSeniorWithdrawUsdcuint256Simulated senior withdrawal cap after reconcile (6 decimals)
maxJuniorWithdrawUsdcuint256Simulated junior withdrawal cap after reconcile (6 decimals)

reconcile

Settles revenue/loss waterfall between tranches

function reconcile() external;

isWithdrawalLive

Whether withdrawals are currently possible (not degraded, mark is fresh)

function isWithdrawalLive() external view returns (bool);

hasSeedLifecycleStarted

function hasSeedLifecycleStarted() external view returns (bool);

canAcceptOrdinaryDeposits

function canAcceptOrdinaryDeposits() external view returns (bool);

canAcceptTrancheDeposits

function canAcceptTrancheDeposits(
    bool isSenior
) external view returns (bool);

canIncreaseRisk

function canIncreaseRisk() external view returns (bool);

isTradingActive

function isTradingActive() external view returns (bool);