-
Notifications
You must be signed in to change notification settings - Fork 24
remove raffle tickets from prize pool, replace with pp #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,7 +17,6 @@ contract Spin is | |||||||||||
| PausableUpgradeable, | ||||||||||||
| ReentrancyGuardUpgradeable | ||||||||||||
| { | ||||||||||||
|
|
||||||||||||
| // Storage | ||||||||||||
| struct UserData { | ||||||||||||
| uint256 jackpotWins; | ||||||||||||
|
|
@@ -129,9 +128,10 @@ contract Spin is | |||||||||||
| // Note: Jackpot probability is handled by jackpotProbabilities based on dayOfWeek | ||||||||||||
| rewardProbabilities = RewardProbabilities({ | ||||||||||||
| plumeTokenThreshold: 200_000, // Up to 200,000 (Approx 20%) | ||||||||||||
| raffleTicketThreshold: 600_000, // Up to 600,000 (Approx 40%) | ||||||||||||
| ppThreshold: 900_000 // Up to 900,000 (Approx 30%) | ||||||||||||
| }); | ||||||||||||
| raffleTicketThreshold: 200_000, // Used to be up to 600,000 (Approx 40%). We have discontinued this tier by | ||||||||||||
| // setting it equivalent to plumeTokenThreshold. | ||||||||||||
|
Comment on lines
+131
to
+132
|
||||||||||||
| raffleTicketThreshold: 200_000, // Used to be up to 600,000 (Approx 40%). We have discontinued this tier by | |
| // setting it equivalent to plumeTokenThreshold. | |
| raffleTicketThreshold: 200_001, // Previously up to 600,000 (Approx 40%). We have effectively discontinued | |
| // this tier by setting it just above plumeTokenThreshold to satisfy validation while leaving the | |
| // practical raffle range empty. |
Copilot
AI
Feb 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states PP threshold is "Up to 900,000 (Approx 70%)" but this calculation appears incorrect. If the raffle ticket threshold is effectively discontinued by setting it equal to plumeTokenThreshold at 200_000, then the PP range would be from 200_001 to 900_000, which is 700_000 out of 1_000_000, or exactly 70%. However, the jackpot probabilities also consume part of the range (varying by day from 1 to 20 based on jackpotProbabilities). The actual PP probability would be approximately (700_000 - avg_jackpot_threshold) / 1_000_000. Consider clarifying this comment to account for the dynamic jackpot threshold.
Copilot
AI
Feb 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spacing in the call syntax has been changed from "call{ value: _amount }" to "call{value: _amount}". This is inconsistent with the codebase convention where other files use a space after the opening brace (e.g., PlumeStakingRewardTreasury.sol:179, ManagementFacet.sol:156, StakingFacet.sol:416, AddressUtils.sol:27, MockPUSD.sol:101). For consistency, this should remain as "call{ value: _amount }".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ungaro do i have to change my forge version or something? whe ni run forget fmt it changes the existing format of the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing tests in Spin.t.sol expect raffle ticket rewards to be awarded for probability values in the range 200_001 to 600_000 (see testRaffleTicketReward at line 719-739 and testBrokenStreakRaffleReward at line 598-640). With raffleTicketThreshold now set equal to plumeTokenThreshold, these tests will fail because the raffle ticket reward path is unreachable. The tests need to be updated to reflect the new probability distribution, either by removing raffle ticket test cases or updating them to test PP rewards instead.