IProofRegistry.sol solidity interface IProofRegistry {
struct Trade {
bytes32 commitHash;
uint64 committedAt;
uint64 revealedAt;
bool verified;
int256 pnlUsd; // 1e6 precision, from the fill receipt
}
/// Store a commitment. Reverts if tradeId already exists. Only the desk committer.
function commit(bytes32 tradeId, bytes32 commitHash) external;
/// Publish the preimage + signed fill receipt. Re-hashes on-chain and records the result.
function reveal(
bytes32 tradeId,
string calldata thesisJson,
string calldata pair,
uint8 side, // 0 = LONG, 1 = SHORT
uint256 sizeUsd, // 1e6
uint256 entryTarget, // 1e8
bytes32 salt,
bytes calldata fillReceipt
) external;
/// keccak256(abi.encode(tradeId, thesisJson, pair, side, sizeUsd, entryTarget, salt))
function computeCommit(
bytes32 tradeId,
string calldata thesisJson,
string calldata pair,
uint8 side,
uint256 sizeUsd,
uint256 entryTarget,
bytes32 salt
) external pure returns (bytes32);
function getTrade(bytes32 tradeId) external view returns (Trade memory);
event TradeCommitted(bytes32 indexed tradeId, bytes32 commitHash, uint64 timestamp);
event TradeRevealed(bytes32 indexed tradeId, bool verified, int256 pnlUsd);
}Function Access Reverts when commit committer role tradeId exists · commitHash is zero reveal committer role no commit · already revealed · side > 1 computeCommit anyone (pure) side > 1 getTrade anyone (view) never; returns zeroed struct if unknown
A reveal that hashes to something else does not revert. It is stored with verified = false so a bad reveal cannot be retried until it passes.
IBuybackVault.sol solidity interface IBuybackVault {
/// Authorised reporter posts desk equity (USD, 1e6). Triggers sweep accounting if above HWM.
function reportEquity(uint256 equityUsd) external;
/// Send swept profit (HYPE) into the vault; splits 70/20/10 by constant bps.
function sweepProfit() external payable;
/// Swap `amountIn` from the buyback reserve for $QUIET, send output to 0x…dEaD.
/// Reverts if output < minOut. Recipient is not a parameter.
function executeBuybackBurn(uint256 amountIn, uint256 minOut) external;
function highWaterMark() external view returns (uint256);
function buybackReserve() external view returns (uint256);
event ProfitSwept(uint256 profitUsd, uint256 burnAmount, uint256 compoundAmount, uint256 opsAmount);
event BuybackBurned(uint256 amountIn, uint256 tokensBurned);
event HighWaterMarkRaised(uint256 previousHwm, uint256 newHwm);
}Function Access Notes reportEquity reporter role Monotonic HWM; ignores equity ≤ HWM sweepProfit anyone (payable) Splits msg.value by 7000/2000/1000 bps executeBuybackBurn keeper role Recipient fixed to 0x…dEaD; minOut slippage floor highWaterMark view USD, 1e6 buybackReserve view Native HYPE wei awaiting burn
Event Emitted by Indexed TradeCommitted(bytes32 tradeId, bytes32 commitHash, uint64 timestamp) commit tradeId TradeRevealed(bytes32 tradeId, bool verified, int256 pnlUsd) reveal tradeId ProfitSwept(…) sweepProfit / reportEquity — BuybackBurned(uint256 amountIn, uint256 tokensBurned) executeBuybackBurn — HighWaterMarkRaised(uint256 previousHwm, uint256 newHwm) reportEquity —
Name Value Chain Elysium · 99901 · gas HYPE ProofRegistry NEXT_PUBLIC_PROOF_REGISTRY (set at deploy) BuybackVault NEXT_PUBLIC_BUYBACK_VAULT (set at deploy) $QUIET token NEXT_PUBLIC_TOKEN_ADDRESS (set at launch) Burn sink 0x000000000000000000000000000000000000dEaD Company ops wallet 0x106342ec570e207afda9fda63125d7a9071127f2
Read state with Foundry bash cast call $PROOF_REGISTRY "getTrade(bytes32)((bytes32,uint64,uint64,bool,int256))" 0xa41c…3d \
--rpc-url https://rpc.elysium.kinetiq.xyz
cast call $BUYBACK_VAULT "highWaterMark()(uint256)" --rpc-url https://rpc.elysium.kinetiq.xyz
cast call $BUYBACK_VAULT "buybackReserve()(uint256)" --rpc-url https://rpc.elysium.kinetiq.xyz← Previous Buyback vault Next → Transparency