Skip to content

Conversation

@ChanachonReal
Copy link

Dice Party Demo Project for Monad Blitz Hackathon.
It's smart contract project use in Dice Party Game on WebGL.

GameReward is a Solidity smart contract designed for distributing native MON rewards directly to players, without relying on an external vault or GameBank.
It can be funded with MON (the native token on Monad) and allows players to claim rewards based on their rank after a game session.

Key Features
• Native MON Rewards – Rewards are distributed directly from the contract’s balance.
• Configurable Reward Table – Owner can set or update reward amounts for each rank.
• Multiple Funding Options – Fund the contract by sending MON directly or calling the fund() function with msg.value.
• Secure Claims – Players call claim(rank) to receive rewards; protected by ReentrancyGuard.
• Admin Tools – Owner can update rewards, set max rank, or withdraw excess MON (rescue).
• Events – Transparent logging for all claims, funding, and configuration changes.

Default Reward Table
• Rank 1 → 150 MON
• Rank 2 → 50 MON
• Rank 3 → 25 MON

Example Flow
1. Owner deploys the contract and funds it with MON.
2. Players call claim(rank) after a game ends, receiving their reward directly.
3. The contract emits RewardClaimed events for on-chain transparency.

Commit with new Readme
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​nomiclabs/​hardhat-ethers@​2.2.310010010078100
Addedts-node@​10.9.29710010080100
Added@​types/​node@​24.4.01001008196100
Addedethers@​5.8.09910010084100
Addedhardhat@​2.26.394100919780
Added@​openzeppelin/​contracts@​5.4.010010010089100
Addedtypescript@​5.9.210010090100100
Addeddotenv@​17.2.29910010092100

View full report

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
[email protected] has Obfuscated code.

Confidence: 0.94

Location: Package overview

From: projects/package-lock.jsonnpm/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant