MontRewardManager
MontRewardManager
Inherits: IMontRewardManager, Ownable
Manages the distribution of MONT rewards to players based on game outcomes
State Variables
mont
Address of the MONT token
usdc
Address of the USDC token
vault
Address of the Vault contract
poolFee
Fee of the Uniswap V3 pool for MONT-USDC
uniswapPool
Address of the Uniswap V3 pool for MONT-USDC
gameFactory
Address of the GameFactory contract
twapInterval
TWAP interval in seconds for getting the price from Uniswap Oracle
balances
Claimable balances of players in MONT token
Functions
constructor
Constructor to initialize contract state variables
Parameters
_vault
address
Address of the Vault contract
_mont
IMONT
Address of the MONT token contract
_usdc
IERC20
Address of the USDC token contract
_gameFactory
GameFactory
Address of the GameFactory contract
_uniswapFactory
address
Address of the UniswapV3Factory
_poolFee
uint24
Uniswap pool fee tier
_twapInterval
uint32
TWAP interval in seconds
setTwapInterval
Changes the TWAP interval in seconds
Emits TwapIntervalChanged event
Parameters
_twapInterval
uint32
The new TWAP interval in seconds
claim
Claims MONT tokens of the caller (player)
Emits MontClaimed event
Returns
amount
uint256
Amount of MONT tokens transferred to caller
transferPlayerRewards
Transfers MONT rewards to the player based on game outcome
Emits MontRewardAssigned event
Parameters
_betAmount
uint256
Amount of the bet
_totalAmount
uint256
Total amount of the bet multiplied by the odds
_houseEdgeAmount
uint256
The house edge amount reducted from the total amount if the player wins
_player
address
Address of the player
_isPlayerWinner
bool
Flag indicating whether the player won the bet
Returns
reward
uint256
Amount of MONT rewards transferred to the player
Last updated