Gain Protocol Token - Smart Contract Audit Report
Summary
The Gain Protocol is a new token with with an innovative fee distribution and lottery mechanism.
We reviewed Gain Protocol's contracts at commit 54e581d13d47aff036086e18cc8f6788d0990e44 on GitHub.
Notes on the Contracts:
- The total supply of the token is 1 trillion (1,000,000,000,000).
- The team will receive the full supply upon deployment..
- No mint or burn functions exist, though the circulating supply can be decreased by sending tokens to the burn address.
- Multiple fees are changed on each transfer of the token. There are fees allocated towards funding the team's wallet, funding the sweepstakes pool, rewarding long-term holders, liquidity funding, a charity wallet held by the team, and a whale-protection reward pool. The team can update fees at any time up to a maximum of 10% total.
- Liquidity-adds are funded by selling half of the tokens collected as fees, pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
- The SwapAndLiquify logic properly accounts for the possibility of sweepstakes refunds, leaving 5% of the contract's token balance for this purpose before adding liquidity.
- If the number of tokens in the liquidity pools exceeds a threshold set by the team, some liquidity will be removed, and the resulting BNB used to purchase GAIN, thereby increasing the price. The tokens purchased will be redistributed among users.
- Price feeds are used to obtain fair pricing, preventing manipulation by flash loans.
- Any user can call startLottery() to run the sweepstakes logic. The caller of this function will receive the BNB spent if available in the contract.
- When the sweepstakes logic is performed, a series of pseudo-randomly chosen addresses will be elected as sweepstakes winners.
- 7 Winners are chosen on a series of basises; with one winner from each. One sweepstakes is conducted with an equal chance among holders, one with weighting by token allocation, and among other criteria.
- The team can alter nearly all variables used in the sweepstakes, such as altering the odds of winning and entrance requirements.
- The team has implemented recommendations to improve the security and gas effeciency of the contracts.
- The code is well-commented to explain logic.
- Utilization of SafeMath to prevent overflows.
Audit Findings Summary:
- No security issues from outside attackers were identified.
- As with any presale, ensure trust in the team prior to investing.
- Further, ensure trust in the team as they have substantial control in the ecosystem.
- Date: June 18th, 2021.
External Threat Results
Vulnerability Category | Notes | Result |
---|---|---|
Arbitrary Storage Write | N/A | PASS |
Arbitrary Jump | N/A | PASS |
Delegate Call to Untrusted Contract | N/A | PASS |
Dependence on Predictable Variables | Decisions are made based on the block.timestamp environment variable which can be manipulated by a malicious miner. This is extremley unlikely to occur. | Warning |
Deprecated Opcodes | N/A | PASS |
Ether Thief | N/A | PASS |
Exceptions | N/A | PASS |
External Calls | N/A | PASS |
Integer Over/Underflow | N/A | PASS |
Multiple Sends | N/A | PASS |
Suicide | N/A | PASS |
State Change External Calls | N/A | PASS |
Unchecked Retval | N/A | PASS |
User Supplied Assertion | N/A | PASS |
Critical Solidity Compiler | N/A | PASS |
Overall Contract Safety | PASS |
Details: Gain Sweepstakes
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Lib] ReuseableAddressArray
- [Int] push #
- [Int] get
- [Int] reset #
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IRandomGenerator
- [Ext] registerRandom ($)
- [Ext] reveal #
- [Ext] startTime
- [Ext] nextLotteryTime
- [Ext] stepLength
- [Ext] randomSeed
- [Ext] minigameRandom
- [Ext] lastRoundWinners
- [Ext] claimWin #
- [Ext] claimWinOnBehalfOf #
- [Ext] getRandomSeedAndWinners #
- [Ext] setParentERC #
- [Ext] winningAccounts
+ [Lib] ReuseableUintArray
- [Int] push #
- [Int] get
- [Int] reset #
+ [Lib] SafeMath
- [Int] tryAdd
- [Int] trySub
- [Int] tryMul
- [Int] tryDiv
- [Int] tryMod
- [Int] add
- [Int] sub
- [Int] mul
- [Int] div
- [Int] mod
- [Int] sub
- [Int] div
- [Int] mod
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Int] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ RandomGenerator (Ownable, IRandomGenerator)
- [Pub] #
- [Ext] enableDeposit #
- modifiers: onlyOwner
- [Ext] releaseParent #
- modifiers: onlyOwner
- [Ext] disableDeposit #
- modifiers: onlyOwner
- [Ext] setParentERC #
- [Ext] setOpenTime #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] setMinigameRange #
- modifiers: onlyOwner,requireNotInProgress
- [Ext] setStepLength #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] setMinimumBalance #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] nextLotteryTime
- [Ext] stepLength
- [Pub] minigameRandom
- modifiers: requireNotInRegistrationReveal
- [Ext] randomSeed
- modifiers: requireNotInRegistrationReveal
- [Ext] lastRoundWinners
- modifiers: requireNotInProgress
- [Ext] winningAccounts
- modifiers: requireNotInRegistrationReveal
- [Ext] getRandomSeedAndWinners #
- modifiers: requireNotInProgress
- [Ext] registerRandom ($)
- [Ext] reveal #
- [Pub] claimWinOnBehalfOf #
- [Ext] claimWin #
- [Prv] _createNextRequest #
- [Prv] _distance
- [Prv] _deposit
- [Prv] _withdraw #
+ [Lib] AddressUpgradeable
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Prv] _verifyCallResult
+ Initializable
- [Prv] _isConstructor
+ ContextUpgradeable (Initializable)
- [Int] __Context_init #
- modifiers: initializer
- [Int] __Context_init_unchained #
- modifiers: initializer
- [Int] _msgSender
- [Int] _msgData
+ OwnableUpgradeable (Initializable, ContextUpgradeable)
- [Int] __Ownable_init #
- modifiers: initializer
- [Int] __Ownable_init_unchained #
- modifiers: initializer
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Int] IGainProtocol (IERC20)
- [Ext] startLottery #
- [Ext] setAssociate #
- [Ext] dailyTransfersOf
- [Ext] tokenFromReflection
- [Ext] reflectionFromToken
- [Ext] collectedLottery
- [Ext] collectedLiquidity
- [Ext] collectedCharity
- [Ext] collectedWhaleFee
- [Ext] collectedReward
- [Ext] collectedTeamFee
- [Ext] collectedHodlReward
- [Ext] soldLiquidity
- [Ext] availableLottery
- [Ext] availableCharity
- [Ext] availableLiquidity
- [Ext] transferLottery #
- [Ext] calculateFees
- [Ext] lockedBalanceReleaseDate
- [Ext] lockedBalanceOf
- [Ext] giveBack #
- [Ext] giveBackHodl #
- [Ext] lockedTransfer #
- [Ext] lockTokens #
+ [Int] IGainLottery
- [Ext] lotteryCount
- [Ext] setParentERC #
- [Ext] lotteryResult
- [Ext] initialTransfer #
- [Ext] startLottery #
- [Ext] onTransfer #
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] functionDelegateCall #
- [Prv] _verifyCallResult
+ [Int] IUniswapV2Router01
- [Ext] factory
- [Ext] WETH
- [Ext] addLiquidity #
- [Ext] addLiquidityETH ($)
- [Ext] removeLiquidity #
- [Ext] removeLiquidityETH #
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityETHWithPermit #
- [Ext] swapExactTokensForTokens #
- [Ext] swapTokensForExactTokens #
- [Ext] swapExactETHForTokens ($)
- [Ext] swapTokensForExactETH #
- [Ext] swapExactTokensForETH #
- [Ext] swapETHForExactTokens ($)
- [Ext] quote
- [Ext] getAmountOut
- [Ext] getAmountIn
- [Ext] getAmountsOut
- [Ext] getAmountsIn
+ [Int] IUniswapV2Router02 (IUniswapV2Router01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ [Int] IUniswapV2Pair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Int] IUniswapV2Factory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] AggregatorV3Interface
- [Ext] decimals
- [Ext] description
- [Ext] version
- [Ext] getRoundData
- [Ext] latestRoundData
+ GainProtocol (IGainProtocol, Context, Ownable)
- [Ext] collectedLottery
- [Ext] collectedLiquidity
- [Ext] collectedCharity
- [Ext] collectedTeamFee
- [Ext] collectedWhaleFee
- [Ext] collectedHodlReward
- [Ext] collectedReward
- [Ext] soldLiquidity
- [Pub] availableLottery
- [Pub] availableCharity
- [Pub] availableLiquidity
- [Ext] giveBack #
- [Ext] giveBackHodl #
- [Ext] setAssociate #
- [Ext] startLottery #
- modifiers: inLotteryLock
- [Ext] dailyTransfersOf
- [Ext] ($)
- [Ext] lockedTransfer #
- [Ext] lockTokens #
- [Ext] lockedBalanceReleaseDate
- [Ext] lockedBalanceOf
- [Ext] calculateFees
- [Ext] setTeamWallet #
- modifiers: onlyOwner
- [Ext] setNumTokensSellToAddToLiquidity #
- modifiers: onlyOwner
- [Ext] setMaxTxAmount #
- modifiers: onlyOwner
- [Ext] setLotteryLockTime #
- modifiers: onlyOwner
- [Ext] setLiquidityTarget #
- modifiers: onlyOwner
- [Ext] overrideAssociate #
- modifiers: onlyOwner
- [Ext] setCharityLimitUSD #
- modifiers: onlyOwner
- [Ext] setTaxPercentage #
- modifiers: onlyOwner
- [Ext] setWhaleProtectionPercentFromLP #
- modifiers: onlyOwner
- [Ext] setDynamicSwapAndLiquifyEnabled #
- modifiers: onlyOwner
- [Ext] setPriceFeed #
- modifiers: onlyOwner
- [Ext] excludeFromFee #
- modifiers: onlyOwner
- [Ext] includeInFee #
- modifiers: onlyOwner
- [Ext] excludeFromBuyFee #
- modifiers: onlyOwner
- [Ext] includeInBuyFee #
- modifiers: onlyOwner
- [Ext] blackListFromAssociate #
- modifiers: onlyOwner
- [Ext] unblackListFromAssociate #
- modifiers: onlyOwner
- [Ext] excludeFromWhaleProtection #
- modifiers: onlyOwner
- [Ext] includeInWhaleProtection #
- modifiers: onlyOwner
- [Ext] excludeFromSellFee #
- modifiers: onlyOwner
- [Ext] includeInSellFee #
- modifiers: onlyOwner
- [Ext] setLotteryAddress #
- modifiers: onlyOwner
- [Ext] setTaxesEnabled #
- modifiers: onlyOwner
- [Ext] setAssociatesEnabled #
- modifiers: onlyOwner
- [Ext] setSwapAndLiquifyEnabled #
- modifiers: onlyOwner
- [Ext] setWhaleProtectionEnabled #
- modifiers: onlyOwner
- [Ext] excludeFromReward #
- modifiers: onlyOwner
- [Ext] includeInReward #
- modifiers: onlyOwner
- [Ext] withrawCharity #
- modifiers: onlyOwner
- [Pub] tokenFromReflection
- [Pub] reflectionFromToken
- [Ext] transferLottery #
- [Pub] #
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] allowance
- [Ext] approve #
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] transferFrom #
- [Prv] _approve #
- [Prv] _getRate
- [Prv] _getCurrentSupply
- [Prv] _transfer #
- [Prv] _updateDailyData #
- [Prv] _balanceOf
- [Prv] _usdBNBPrice
- [Prv] _gainsForUSD
- [Prv] _handleLiquify #
- [Prv] _getReserves
- [Prv] _swapAndLiquify #
- modifiers: lockTheSwap
- [Prv] _removeFromLiquidityAndReward #
- modifiers: lockTheSwap
- [Prv] _swapTokensForBNB #
- [Prv] _swapBNBforTokens #
- [Prv] _addLiquidity #
- [Prv] _removeLiquidity #
- [Prv] _compareToLP
- [Prv] _getLiquidity
- [Prv] _lockedTransfer #
- [Prv] _lockReflection #
- [Prv] _getLockedReflectionOf
- [Prv] _calculateFees
- [Prv] _tokenTransfer #
- [Prv] _reflectHodlTokens #
- [Prv] _removeTokensFromHodlForBalanceIfNeeded #
- [Prv] _removeTokensFromHodl #
- [Prv] _removeTokensFromHodl #
- [Prv] _onTransfer #
- [Prv] _reflectTeamFee #
- [Prv] _reflectLotteryFee #
- [Prv] _reflectHodlFee #
- [Prv] _reflectLiquidity #
- [Prv] _reflectCharityFee #
- [Prv] _reflectReward #
- [Prv] _min
- [Prv] _percent
- [Prv] _totalBuyerFees
- [Prv] _totalSellerFees
+ GainLottery (IGainLottery, Initializable, ContextUpgradeable, OwnableUpgradeable)
- [Ext] initialize #
- modifiers: initializer
- [Ext] lotteryCount
- [Ext] lotteryResult
- [Ext] seniorityOf
- [Ext] setParentERC #
- [Ext] setLotteryPercentages #
- modifiers: onlyOwner
- [Ext] setMinimumTokensForLottery #
- modifiers: onlyOwner
- [Ext] setMaxTicketsForLottery #
- modifiers: onlyOwner
- [Ext] setMinimumTokensForBigHolderLottery #
- modifiers: onlyOwner
- [Ext] setLotteryMaxAttempts #
- modifiers: onlyOwner
- [Ext] excludeFromLottery #
- modifiers: onlyOwner
- [Ext] includeInLottery #
- modifiers: onlyOwner
- [Ext] allowAnotherLottery #
- modifiers: onlyOwner
- [Ext] releaseParent #
- modifiers: onlyOwner
- [Ext] setRandomGenerator #
- modifiers: onlyOwner
- [Ext] startLottery #
- modifiers: onlyToken
- [Ext] initialTransfer #
- modifiers: onlyToken
- [Ext] onTransfer #
- modifiers: onlyToken
- [Prv] _onTransfer #
- [Prv] _transferLottery #
- [Prv] _getRandom #
- [Prv] _equalChanceLottery #
- [Prv] _byHoldingSizeLottery #
- [Prv] _dailyBuyerLottery #
- [Prv] _bigHolderLottery #
- [Prv] _bySeniorityLottery #
- [Prv] _newHoldersLottery #
- [Prv] _equalLottery #
- [Prv] min
- [Prv] max
- [Prv] _percent
Details: Gain Protocol
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IGainProtocol (IERC20)
- [Ext] startLottery #
- [Ext] setAssociate #
- [Ext] dailyTransfersOf
- [Ext] tokenFromReflection
- [Ext] reflectionFromToken
- [Ext] collectedLottery
- [Ext] collectedLiquidity
- [Ext] collectedCharity
- [Ext] collectedWhaleFee
- [Ext] collectedReward
- [Ext] collectedTeamFee
- [Ext] collectedHodlReward
- [Ext] soldLiquidity
- [Ext] availableLottery
- [Ext] availableCharity
- [Ext] availableLiquidity
- [Ext] transferLottery #
- [Ext] calculateFees
- [Ext] lockedBalanceReleaseDate
- [Ext] lockedBalanceOf
- [Ext] giveBack #
- [Ext] giveBackHodl #
- [Ext] lockedTransfer #
- [Ext] lockTokens #
+ [Int] IGainLottery
- [Ext] lotteryCount
- [Ext] setParentERC #
- [Ext] lotteryResult
- [Ext] initialTransfer #
- [Ext] startLottery #
- [Ext] onTransfer #
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Int] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Lib] SafeMath
- [Int] tryAdd
- [Int] trySub
- [Int] tryMul
- [Int] tryDiv
- [Int] tryMod
- [Int] add
- [Int] sub
- [Int] mul
- [Int] div
- [Int] mod
- [Int] sub
- [Int] div
- [Int] mod
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] functionDelegateCall #
- [Prv] _verifyCallResult
+ [Int] IUniswapV2Router01
- [Ext] factory
- [Ext] WETH
- [Ext] addLiquidity #
- [Ext] addLiquidityETH ($)
- [Ext] removeLiquidity #
- [Ext] removeLiquidityETH #
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityETHWithPermit #
- [Ext] swapExactTokensForTokens #
- [Ext] swapTokensForExactTokens #
- [Ext] swapExactETHForTokens ($)
- [Ext] swapTokensForExactETH #
- [Ext] swapExactTokensForETH #
- [Ext] swapETHForExactTokens ($)
- [Ext] quote
- [Ext] getAmountOut
- [Ext] getAmountIn
- [Ext] getAmountsOut
- [Ext] getAmountsIn
+ [Int] IUniswapV2Router02 (IUniswapV2Router01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ [Int] IUniswapV2Pair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Int] IUniswapV2Factory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] AggregatorV3Interface
- [Ext] decimals
- [Ext] description
- [Ext] version
- [Ext] getRoundData
- [Ext] latestRoundData
+ GainProtocol (IGainProtocol, Context, Ownable)
- [Ext] collectedLottery
- [Ext] collectedLiquidity
- [Ext] collectedCharity
- [Ext] collectedTeamFee
- [Ext] collectedWhaleFee
- [Ext] collectedHodlReward
- [Ext] collectedReward
- [Ext] soldLiquidity
- [Pub] availableLottery
- [Pub] availableCharity
- [Pub] availableLiquidity
- [Ext] giveBack #
- [Ext] giveBackHodl #
- [Ext] setAssociate #
- [Ext] startLottery #
- modifiers: inLotteryLock
- [Ext] dailyTransfersOf
- [Ext] ($)
- [Ext] lockedTransfer #
- [Ext] lockTokens #
- [Ext] lockedBalanceReleaseDate
- [Ext] lockedBalanceOf
- [Ext] calculateFees
- [Ext] setTeamWallet #
- modifiers: onlyOwner
- [Ext] setNumTokensSellToAddToLiquidity #
- modifiers: onlyOwner
- [Ext] setMaxTxAmount #
- modifiers: onlyOwner
- [Ext] setLotteryLockTime #
- modifiers: onlyOwner
- [Ext] setLiquidityTarget #
- modifiers: onlyOwner
- [Ext] overrideAssociate #
- modifiers: onlyOwner
- [Ext] setCharityLimitUSD #
- modifiers: onlyOwner
- [Ext] setTaxPercentage #
- modifiers: onlyOwner
- [Ext] setWhaleProtectionPercentFromLP #
- modifiers: onlyOwner
- [Ext] setDynamicSwapAndLiquifyEnabled #
- modifiers: onlyOwner
- [Ext] setPriceFeed #
- modifiers: onlyOwner
- [Ext] excludeFromFee #
- modifiers: onlyOwner
- [Ext] includeInFee #
- modifiers: onlyOwner
- [Ext] excludeFromBuyFee #
- modifiers: onlyOwner
- [Ext] includeInBuyFee #
- modifiers: onlyOwner
- [Ext] blackListFromAssociate #
- modifiers: onlyOwner
- [Ext] unblackListFromAssociate #
- modifiers: onlyOwner
- [Ext] excludeFromWhaleProtection #
- modifiers: onlyOwner
- [Ext] includeInWhaleProtection #
- modifiers: onlyOwner
- [Ext] excludeFromSellFee #
- modifiers: onlyOwner
- [Ext] includeInSellFee #
- modifiers: onlyOwner
- [Ext] setLotteryAddress #
- modifiers: onlyOwner
- [Ext] setTaxesEnabled #
- modifiers: onlyOwner
- [Ext] setAssociatesEnabled #
- modifiers: onlyOwner
- [Ext] setSwapAndLiquifyEnabled #
- modifiers: onlyOwner
- [Ext] setWhaleProtectionEnabled #
- modifiers: onlyOwner
- [Ext] excludeFromReward #
- modifiers: onlyOwner
- [Ext] includeInReward #
- modifiers: onlyOwner
- [Ext] withrawCharity #
- modifiers: onlyOwner
- [Pub] tokenFromReflection
- [Pub] reflectionFromToken
- [Ext] transferLottery #
- [Pub] #
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] allowance
- [Ext] approve #
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] transferFrom #
- [Prv] _approve #
- [Prv] _getRate
- [Prv] _getCurrentSupply
- [Prv] _transfer #
- [Prv] _updateDailyData #
- [Prv] _balanceOf
- [Prv] _usdBNBPrice
- [Prv] _gainsForUSD
- [Prv] _handleLiquify #
- [Prv] _getReserves
- [Prv] _swapAndLiquify #
- modifiers: lockTheSwap
- [Prv] _removeFromLiquidityAndReward #
- modifiers: lockTheSwap
- [Prv] _swapTokensForBNB #
- [Prv] _swapBNBforTokens #
- [Prv] _addLiquidity #
- [Prv] _removeLiquidity #
- [Prv] _compareToLP
- [Prv] _getLiquidity
- [Prv] _lockedTransfer #
- [Prv] _lockReflection #
- [Prv] _getLockedReflectionOf
- [Prv] _calculateFees
- [Prv] _tokenTransfer #
- [Prv] _reflectHodlTokens #
- [Prv] _removeTokensFromHodlForBalanceIfNeeded #
- [Prv] _removeTokensFromHodl #
- [Prv] _removeTokensFromHodl #
- [Prv] _onTransfer #
- [Prv] _reflectTeamFee #
- [Prv] _reflectLotteryFee #
- [Prv] _reflectHodlFee #
- [Prv] _reflectLiquidity #
- [Prv] _reflectCharityFee #
- [Prv] _reflectReward #
- [Prv] _min
- [Prv] _percent
- [Prv] _totalBuyerFees
- [Prv] _totalSellerFees
Details: RandomGenerator
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IRandomGenerator
- [Ext] registerRandom ($)
- [Ext] reveal #
- [Ext] startTime
- [Ext] nextLotteryTime
- [Ext] stepLength
- [Ext] randomSeed
- [Ext] minigameRandom
- [Ext] lastRoundWinners
- [Ext] claimWin #
- [Ext] claimWinOnBehalfOf #
- [Ext] getRandomSeedAndWinners #
- [Ext] setParentERC #
- [Ext] winningAccounts
+ [Lib] ReuseableUintArray
- [Int] push #
- [Int] get
- [Int] reset #
+ [Lib] SafeMath
- [Int] tryAdd
- [Int] trySub
- [Int] tryMul
- [Int] tryDiv
- [Int] tryMod
- [Int] add
- [Int] sub
- [Int] mul
- [Int] div
- [Int] mod
- [Int] sub
- [Int] div
- [Int] mod
+ Context
- [Int] _msgSender
- [Int] _msgData
+ Ownable (Context)
- [Int] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ RandomGenerator (Ownable, IRandomGenerator)
- [Pub] #
- [Ext] enableDeposit #
- modifiers: onlyOwner
- [Ext] releaseParent #
- modifiers: onlyOwner
- [Ext] disableDeposit #
- modifiers: onlyOwner
- [Ext] setParentERC #
- [Ext] setOpenTime #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] setMinigameRange #
- modifiers: onlyOwner,requireNotInProgress
- [Ext] setStepLength #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] setMinimumBalance #
- modifiers: requireNotInProgress,onlyOwner
- [Ext] nextLotteryTime
- [Ext] stepLength
- [Pub] minigameRandom
- modifiers: requireNotInRegistrationReveal
- [Ext] randomSeed
- modifiers: requireNotInRegistrationReveal
- [Ext] lastRoundWinners
- modifiers: requireNotInProgress
- [Ext] winningAccounts
- modifiers: requireNotInRegistrationReveal
- [Ext] getRandomSeedAndWinners #
- modifiers: requireNotInProgress
- [Ext] registerRandom ($)
- [Ext] reveal #
- [Pub] claimWinOnBehalfOf #
- [Ext] claimWin #
- [Prv] _createNextRequest #
- [Prv] _distance
- [Prv] _deposit
- [Prv] _withdraw #