DevelopersSmart Contract

Smart Contract

Deployed contract

NetworkAddress
Monad Mainnet0x[MAINNET ADDRESS]

The contract is fully verified on MonadVision. Source code, ABI, and constructor arguments are publicly readable.


Constructor parameters

constructor(
 uint96 _ticketPriceMON,
 uint32 _commitDelayBlocks,
 uint32 _roundDurationSec,
 address _shmon
)
ParameterDescription
_ticketPriceMONPrice per ticket in MON (wei)
_commitDelayBlocksBlocks between commitment and draw
_roundDurationSecDuration of the sales window in seconds
_shmonShMON contract address

Key read functions

// Current round ID
function currentRoundId() external view returns (uint256)
 
// Full round data
function getRoundInfo(uint256 rid) external view returns (
 uint8 state, // 0=Open 1=Committed 2=Finalizing 3=Settled
 uint64 salesEndTime,
 uint32 totalTickets,
 uint256 totalPrincipalMON,
 uint256 totalShmonShares,
 uint256 targetBlockNumber,
 address winner,
 uint32 winningTicket,
 uint64 unstakeCompletionEpoch,
 uint256 monReceived,
 uint256 yieldMON,
 uint256 lossRatio,
 bool prizeClaimed
)
 
// What the keeper should do nextand what anyone can call
function nextExecutable() external view returns (uint256 rid, uint8 action)
 
// Advance the round lifecycle (publicanyone can call)
function executeNext() external
 
// User's principal in a given round
function principalMON(uint256 rid, address user) external view returns (uint256)

Key write functions

// Purchase tickets (payable — send MON equal to ticketPriceMON * ticketCount)
function buyTickets(uint32 ticketCount) external payable
 
// Claim prize (winner only)
function claimPrize(uint256 rid) external
 
// Withdraw principal (all participants after settlement)
function withdrawPrincipal(uint256 rid) external

Events

event TicketsBought(uint256 indexed roundId, address indexed buyer, uint32 ticketCount, uint256 monPaid)
event DrawCommitted(uint256 indexed roundId, uint256 targetBlockNumber)
event ExecuteNext(uint256 indexed roundId, NextAction action)
event Paused(address indexed by)
event Unpaused(address indexed by)
event OwnershipTransferred(address indexed newOwner)

Round states

ValueStateDescription
0OpenSales window active
1CommittedRandomness source locked, waiting for target block
2FinalizingWinner drawn, ShMON unstaking in progress
3SettledFunds available for claim/withdraw