What actually changes hands?
The core ticket is an immutable on-chain position. It has no owner-transfer function: winnings and cancellation refunds go only to the beneficiary chosen at placement.
Third-party ticket entitlements can be resold where the seller’s system or a wrapper supports a change of entitlement. That system must handle delivery and the eventual allocation of proceeds. Buying an off-chain receipt or transferring bankroll shares does not update the Luckotto beneficiary.
A direct wallet ticket cannot be made transferable after placement by changing a field. A wrapper or seller-managed beneficiary must be chosen at placement if that product relies on it. Luckotto does not provide a resale marketplace, an NFT ticket standard, or escrow.
Keep ticket pricing separate from protocol edge
Direct pool-only play has 0% protocol edge on a settled ticket, before gas and integer rounding. Bankroll-backed payout targets may carry an edge, bounded by the ticket’s encoded maximum.
A reseller can charge a spread or fee. Those costs are separate from protocol edge and can change a buyer’s effective expected return. Show the buyer the sale price, net ETH stake, requested target, maximum edge, fixed beneficiary, and exactly how proceeds will reach them.
Start with one position per player
Use the configured Ethereum deployment and placeBet with the intended payout address. This example assumes a configured viem wallet client and validated values. Amounts are integer wei; encode a percentage edge cap as floor(percent × 2^32 / 100). For pool-only play, use a zero target and zero cap.
Pass a zero-filled bytes32 commitment when none is needed. Validate the beneficiary’s identity and ability to receive native ETH; neither a payout nor a refund can be redirected. Quote against the pool including the proposed stake and read the latest round before submitting.
const hash = await walletClient.writeContract({
address: luckottoAddress,
abi: luckottoAbi,
functionName: "placeBet",
args: [roundId, targetPayoutWei, maxEdgeQ32,
beneficiary, positionCommitment],
value: stakeWei,
});
// Record the canonical BetPlaced event:
// roundId, positionIndex, beneficiary, stake,
// targetPayout, maxEdgeQ32, positionCommitment.
// Retain blockHash, transactionHash and logIndex.Download the ABI → · Read quoting and settlement interfaces →
Optional batching
One position can represent a batch of tickets. Commit the exact CSV bytes through positionCommitment, archive the file, and make ticket weights sum to the on-chain stake. This hash is opaque event data: the contract neither validates the manifest nor pays individual rows.
The seller or wrapper must enforce ticket ownership and distribute any proceeds. Its own resale records must preserve the committed allocation and remain verifiable. Never put customer personal data in a public manifest.
Follow the ticket through settlement
Read the current pool and bankroll before quoting. Index canonical events, handle reorgs, and keep a funded settlement path. Rounds must finalize chronologically with a complete proof by the randomness block plus 8,191 blocks.
After a winning settlement, submit claimWinner separately. The ETH goes to the fixed beneficiary. When that address belongs to a seller or wrapper, delivery to its customers is that system’s responsibility; Luckotto does not enforce the customer credit.
Make the boundaries visible
A payout target is variable until settlement. Missed proof deadlines forfeit stakes. Freeze cancels eligible open rounds for refunds to their fixed beneficiaries. After 365 days, the owner can drain all remaining contract cash, including backing for unpaid winnings, refunds, and bankroll shares. Complete claims and withdrawals before recovery becomes available.
A third-party ticket product adds its own custody, delivery, pricing, and availability assumptions. Publish those terms, along with the rules for resale, before accepting a purchase. Review the protocol controls and dependencies →
Your ticket product, your operations
Sellers manage their own customer accounts, eligibility, payment processing, customer data, support, and applicable obligations. The contract supplies an ETH position and a public draw; it does not operate the surrounding ticket business.