MontRewardManager
Inherits: IMontRewardManager, Ownable
Manages the distribution of MONT rewards to players based on game outcomes
State Variables
Address of the MONT token
IMONT public immutable mont;
Address of the USDC token
IERC20 public immutable usdc;
Address of the Vault contract
address public immutable vault;
Fee of the Uniswap V3 pool for MONT-USDC
Address of the Uniswap V3 pool for MONT-USDC
Address of the GameFactory contract
TWAP interval in seconds for getting the price from Uniswap Oracle
Claimable balances of players in MONT token
Constructor to initialize contract state variables
Parameters
Address of the Vault contract
Address of the MONT token contract
Address of the USDC token contract
Address of the GameFactory contract
Address of the UniswapV3Factory
setTwapInterval
Changes the TWAP interval in seconds
Emits TwapIntervalChanged event
Parameters
The new TWAP interval in seconds
Claims MONT tokens of the caller (player)
Emits MontClaimed event
Returns
Amount of MONT tokens transferred to caller
transferPlayerRewards
Transfers MONT rewards to the player based on game outcome
Emits MontRewardAssigned event
Parameters
Total amount of the bet multiplied by the odds
The house edge amount reducted from the total amount if the player wins
Flag indicating whether the player won the bet
Returns
Amount of MONT rewards transferred to the player