01 Parameters enforced on chain# Parameter Value Tiers Ember 25% · Flame 50% · Sun 75% Windows 24 h · 72 h · 168 h Activation delay 15 min Challenge window 60 min Max payout per cover min($5,000, 2% of Nest) Max open payouts 50% of Nest Max open payouts per coin 25% of Nest Withdrawal delay 72 h Premium split 80% Nest · 20% buyback & burn Phoenix Pass 1,000,000 $PHNX → 10% off
02 Function & event reference# Generated from the contracts' ABI (src/lib/contracts/abi.ts, exported from the Foundry build). Selectors and event topics are exact. Units: HYPE in wei (1e18), USD in 1e6, position size in 1e8, times in unix seconds, coins as bytes32 ASCII right-padded.
PhoenixCover# Write Returns Access · selector buyCover (Quote q, bytes sig)uint256 idanyone · payable 0x17a4aa2aexpire (uint256 id)—anyone 0xbf81bf43markPending (uint256 id, uint256 amount)—oracle only 0x2a89a8c8markVetoed (uint256 id)—oracle only 0x7ccb01d0pause ()—owner 0x8456cb59payClaim (uint256 id)—oracle only 0xd70356ccsetOracle (address oracle_)—owner 0x7adbf973setQuoter (address quoter_)—owner 0xf912c64bunpause ()—owner 0x3f4ba83a
Read Returns Access · selector buyback ()addressread 0xf8ec6911coverKey (address holder, bytes32 coin)bytes32read 0x562582bddomainSeparator ()bytes32read 0xf698da25getCover (uint256 id)Coverread 0xfd7b68a2hashQuote (Quote q)bytes32read 0xa7aaf565isWindowAllowed (uint32 w)boolread 0x9c540d62nest ()addressread 0xf2c7fb05nextCoverId ()uint256read 0x5e58b949nonceUsed (address holder, uint256 nonce)boolread 0x1647795eopenCoverOf (bytes32 key)uint256 idread 0xb580a542oracle ()addressread 0x7dc0d1d0paused ()boolread 0x5c975abbquoter ()addressread 0xc6bbd5a7tierBps (uint8 tier)uint256read 0x3955b56d
Constants ACTIVATION_DELAYBPSFLOOR_BPSMAX_PAYOUT_USDMAX_PREMIUM_BPSNEST_SHARE_BPSPASS_DISCOUNT_BPSPASS_MIN_TOKENSPROOF_GRACEQUOTE_TYPEHASHTIER0_BPSTIER1_BPSTIER2_BPSWINDOW_24HWINDOW_72HWINDOW_7D
Event topic0 CoverBought (uint256 indexed id, address indexed holder, bytes32 indexed coin, bool isLong, uint8 tier, uint256 size, uint256 payoutUsd, uint256 payoutHype, uint256 premiumHype, uint64 start, uint64 end, bool pass, uint256 nonce)0x4bcde796…CoverExpired (uint256 indexed id)0xc2d76cad…CoverPaid (uint256 indexed id, address indexed holder, uint256 amount)0x06b618be…CoverPending (uint256 indexed id, uint256 claimHype)0xe6ec4984…CoverVetoed (uint256 indexed id)0x56f20574…OracleSet (address indexed oracle)0x3f32684a…Paused (address account)0x62e78cea…PremiumSplit (uint256 indexed id, uint256 toNest, uint256 toBuyback)0xcab45e8e…QuoterSet (address indexed quoter)0xd49e613d…Unpaused (address account)0x5db9ee0a…
Errors BadSignatureBadStatus(uint8 status)BadTierBadWindowClaimAboveCoverCoverAlreadyOpen(uint256 id)ECDSAInvalidSignatureECDSAInvalidSignatureLength(uint256 length)ECDSAInvalidSignatureS(bytes32 s)EnforcedPauseExpectedPauseFailedCallInsufficientBalance(uint256 balance, uint256 needed)InvalidShortStringNonceUsedNotExpirable(uint256 at)NotHolderOnlyOracleOracleAlreadySetOwnableInvalidOwner(address owner)OwnableUnauthorizedAccount(address account)PayoutAboveTierPayoutCapExceededPremiumTooHighPremiumTooLowQuoteExpiredReentrancyGuardReentrantCallStringTooLong(string str)WrongPremiumZeroAddressZeroValue
ClaimsOracle# Write Returns Access · selector postProof (uint256 coverId, bytes32 fillHash, uint64 tid, uint64 liqTime, uint256 sizeAtLiq)—keeper 0xc9591632setGuardian (address guardian_)—owner 0x8a0dac4asetKeeper (address keeper_)—owner 0x748747e6settle (uint256 coverId)—owner 0x8df82800veto (uint256 coverId, bytes32 reason)—guardian 0xc0555a0a
Read Returns Access · selector challengeEndsAt (uint256 coverId)uint256read 0x91aad96ccover ()addressread 0xe7d931e4fillUsedBy (bytes32 fillHash)uint256 coverIdread 0xdc695746growthPayout (uint256 payoutHype, uint256 size, uint256 sizeAtLiq)uint256read 0xaf060fe6guardian ()addressread 0x452a9320keeper ()addressread 0xaced1661proofs (uint256 coverId)bytes32 fillHash, uint64 tid, uint64 liqTime, uint64 postedAt, uint256 sizeAtLiq, uint256 payoutread 0x9ddaf5aa
Constants CHALLENGE_WINDOW
Event topic0 GuardianSet (address indexed guardian)0xe6c09ffe…KeeperSet (address indexed keeper)0xdc3dba1d…ProofPosted (uint256 indexed coverId, bytes32 indexed fillHash, uint64 tid, uint64 liqTime, uint256 sizeAtLiq, uint256 payout, uint256 challengeEndsAt)0x22054774…ProofVetoed (uint256 indexed coverId, bytes32 indexed fillHash, bytes32 reason)0xf7f292eb…Settled (uint256 indexed coverId, address indexed holder, uint256 payout)0x2c35d68f…
Errors ChallengeOpen(uint256 endsAt)ChallengeOverFillAlreadyUsed(uint256 coverId)LiqInFutureLiqOutsideWindowNoProofNotActiveOnlyGuardianOnlyKeeperOwnableInvalidOwner(address owner)OwnableUnauthorizedAccount(address account)ProofTooLateReentrancyGuardReentrantCallZeroAddressZeroSize
Nest# Write Returns Access · selector cancelWithdraw (uint256 id)—anyone 0x9f01f7baclaimWithdraw (uint256 id)uint256 assetsanyone 0xb13acedddeposit ()uint256 sharesanyone · payable 0xd0e30db0lockClaim (uint256 amount)—cover only 0x3dc2083cpause ()—owner 0x8456cb59pay (address to, uint256 amount, bytes32 coin, uint256 reservedAmount)—cover only 0xf764099creceivePremium ()—cover only 0x915fc94drelease (bytes32 coin, uint256 amount)—cover only 0x66afd8efrequestWithdraw (uint256 shares)uint256 idanyone 0x745400c9reserve (bytes32 coin, uint256 amount)—cover only 0xe7168ef1setCover (address cover_)—owner 0x7c366cc6unlockClaim (uint256 amount)—cover only 0x774f307dunpause ()—owner 0x3f4ba83awithdrawOwed ()—anyone 0x39a72c5c
Read Returns Access · selector balanceOf (address account)uint256read 0x70a08231coinReserved (bytes32 coin)uint256read 0x731a19b9convertToAssets (uint256 shares)uint256read 0x07a2d13aconvertToShares (uint256 assets)uint256read 0xc6e6f592cover ()addressread 0xe7d931e4decimals ()uint8read 0x313ce567escrowedShares ()uint256read 0x704743eemaxNewCover (bytes32 coin)uint256read 0xeaf0fe6dname ()stringread 0x06fdde03nextWithdrawalId ()uint256read 0x4a9122e3owed (address)uint256read 0xdf18e047paused ()boolread 0x5c975abbpendingClaims ()uint256read 0x3e6be3d2reserved ()uint256read 0xfe60d12csymbol ()stringread 0x95d89b41totalAssets ()uint256read 0x01e1d114totalOwed ()uint256read 0xe7fa9f7dtotalSupply ()uint256read 0x18160dddutilizationBps ()uint256read 0x975e900ewithdrawableAssets ()uint256read 0x2cdf7401withdrawals (uint256 id)address owner, uint64 unlockAt, bool done, uint256 sharesread 0x5cc07076
Constants BPSDECIMALS_OFFSETMAX_COIN_SHARE_BPSMAX_COVER_BPSMAX_UTILIZATION_BPSPAY_GASWITHDRAW_DELAY
Event topic0 ClaimLocked (uint256 amount, uint256 pendingClaims)0x3d90cff5…ClaimUnlocked (uint256 amount, uint256 pendingClaims)0x31e8c01c…CoverSet (address indexed cover)0x63ebbb94…Deposit (address indexed account, uint256 assets, uint256 shares)0x90890809…OwedWithdrawn (address indexed account, uint256 amount)0x5228fff5…Paid (address indexed to, uint256 amount, bool pushed)0x162f9eb7…Paused (address account)0x62e78cea…PremiumReceived (uint256 amount)0x426fde37…Released (bytes32 indexed coin, uint256 amount, uint256 reserved, uint256 coinReserved)0x54910d21…Reserved (bytes32 indexed coin, uint256 amount, uint256 reserved, uint256 coinReserved)0xb139c86c…Unpaused (address account)0x5db9ee0a…WithdrawCancelled (uint256 indexed id, address indexed owner, uint256 shares)0x769d7210…WithdrawClaimed (uint256 indexed id, address indexed owner, uint256 shares, uint256 assets)0xd3e2da70…WithdrawRequested (uint256 indexed id, address indexed owner, uint256 shares, uint256 unlockAt)0xdb2996fe…
Errors AlreadyDoneCoinShareExceededCoverAlreadySetCoverTooLargeDirectTransferERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed)ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed)ERC20InvalidApprover(address approver)ERC20InvalidReceiver(address receiver)ERC20InvalidSender(address sender)ERC20InvalidSpender(address spender)EnforcedPauseExpectedPauseFailedCallInsufficientBalance(uint256 balance, uint256 needed)InsufficientLiquidityNotRequestOwnerNothingOwedOnlyCoverOwnableInvalidOwner(address owner)OwnableUnauthorizedAccount(address account)PayExceedsReservationReentrancyGuardReentrantCallStillLocked(uint256 unlockAt)UtilizationExceededZeroAddressZeroAmountZeroShares
03 Signed quotes (EIP-712)# buyCover(q, sig) takes a quote signed by the quoter. msg.value must equal q.premiumHype and q.holder must be the sender.
Quote type ts Copy // domain = { name: "Phoenix Cover", version: "1", chainId: 99901, verifyingContract: PhoenixCover }
Quote(
address holder,
bytes32 coin,
bool isLong,
uint256 positionSize,
uint256 coveredMarginUsd,
uint256 payoutUsd,
uint256 payoutHype,
uint256 premiumHype,
uint8 tier,
uint32 windowSeconds,
bool pass,
uint64 deadline,
uint256 nonce
)