Prize Security
Contract Level
Measure
Detail
Randomness & Fairness
Prize Distribution
// ⚠️ Simplified example
function _distribute(
PrizeType prizeType,
address recipient,
uint256 amount,
address erc20Token,
address nftAddress,
uint256 tokenId
) internal nonReentrant {
if (prizeType == PrizeType.CURRENCY) {
Address.sendValue(payable(recipient), amount);
} else if (prizeType == PrizeType.ERC20) {
SafeERC20.safeTransfer(IERC20(erc20Token), recipient, amount);
} else {
IERC721(nftAddress).safeTransferFrom(address(this), recipient, tokenId);
}
}Ongoing Monitoring
Last updated