Inherits: IVault, Ownable
Manages USDC deposits, withdrawals, and game rewards
All deposits and withdrawals happen through this contract
State Variables
Address of ETH, used for events
address public constant ETH = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
Address of the MONT token
IMONT public immutable mont;
Address of the USDC token
IERC20 public immutable usdc;
Address of the Burner contract
Address of the GameFactory contract
montRewardManager
Address of the MontRewardManager contract
Maximum total bet amount in percentage. Default is 200, means 2%
minimumBetAmount
Minimum bet amount. Default is 1000000, means 1 USDC
Constructor to set initial values
Parameters
Address of the Dumont token contract
Address of the USDC token contract
Address of the burner contract used to sell USDC and burn MONT tokens
Address of the GameFactory contract
Address of the RewardManager contract
Minimum amount of USDC that a player can place as a bet
Changes the address of the Burner contract
Emits BurnerChanged event
Parameters
The new address of the Burner contract
Changes the address of the GameFactory contract
Emits GameFactoryChanged event
Parameters
The new address of the GameFactory contract
setMontRewardManager
Changes the address of the MontRewardManager contract
Emits RewardManagerChanged event
Parameters
The address of the new MontRewardManager contract
Allows admins to deposit USDC into the contract
Emits Deposited event
Parameters
The amount of USDC to deposit
Allows the owner to withdraw a specified amount of tokens
Emits Withdrawn event
Parameters
The address of the ERC20 token to withdraw
The amount of tokens to withdraw
The address to receive the withdrawn tokens
Allows the owner to withdraw ETH from the contract
Emits Withdrawn event
Parameters
The address to receive the withdrawn ETH
transferPlayerRewards
Notifies the Vault contract that a player lost a bet and sends USDC if player is the winner
Emits PlayerRewardsTransferred event
Parameters
Amount of the bet in USDC
Amount of the bet multiplied by the odds
The house edge amount reducted from the total amount if the player wins
Whether or not the player won or not
setMinimumBetAmount
Changes the minimum bet amount of USDC
Emits MinimumBetAmountChanged event
Parameters
The new minimum bet amount
setMaximumBetRate
Changes the percentage of USDC in the Vault that can be sent as the reward
Emits MaximumBetRateChanged event
Parameters
getMaximumBetAmount
Returns the maximum bet amount a player can place
getMinimumBetAmount
Returns the minimum bet amount a player can place