The HODL Games - Smart Contract Audit Report
Summary
The HODL Games ($HDL) is a new community-driven DeFi token that performs automatic liquidity adds, features a buyback system for burning supply, and pays static rewards to holders.
Notes on the Contract:Audit Findings Summary
- The total supply of the token is set to 100 billion [100,000,000,000].
- No minting or burn functions are present; though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
- At the time of writing this report, 64% of the total supply has been sent to the 0x..dead address.
- 20% of the total supply belongs to the owner.
- 10% of the total supply has been sent to the 0x..01 address.
- The remaining 6% of the total supply belongs to this holder.
- Trading is initially set to disabled upon deployment. Only accounts that are excluded from fees are able to trade during this time.
- The owner must manually enable trading. Once trading is enabled, it can never be disabled.
- There is a reflection fee, liquidity fee, buyback fee, marketing fee, and operations fee on all transactions for any non-excluded address that participates in a transfer with Pancakeswap. A separate fee structure can be set by the team to apply different fee amounts depending on whether the user is buying or selling during the transfer.
- A transfer tax is charged when transferring to any address other than Pancakeswap.
- Users who hold tokens will automatically benefit from the frictionless fee redistribution at the time of each transaction as the tokens collected through the reflection fee are removed from the circulating supply.
- The tokens collected from the liquidity fee during transfers are stored in the contract address balance. Once the threshold value of tokens (determined by the owner) is met, a swap will occur for the purpose of funding Pancakeswap liquidity.
- Liquidity-adds are funded by selling a portion of the tokens collected as fees (after the threshold number of tokens is met), then pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
- The recipient of the newly created LP tokens is the Burn address.
- On each transfer that occurs while the minimum threshold (determined by the owner) is met, the protocol will spend 1% of its BNB balance toward buying $HDL tokens that will subsequently be burned.
- The tokens collected from the operations fee and marketing fee are swapped for BNB and sent to the team's operations wallet and marketing wallet respectively.
- The tokens collected from the transfer tax are sent to the team's tax wallet.
- As the contract is implemented with Solidity v0.8.x, it is protected from overflows.
Ownership Controls:- The owner can modify the rfi fee, liquidity fee, buyback fee, marketing fee, and operations fee for each fee structure to any percentages at any time.
- The owner can modify the transfer tax to any percentage at any time.
- The owner can exclude and include accounts from transfer fees and reward distribution.
- The owner can set and update a maximum buy/sell amount at any time, which will impose a limit to the number of tokens that can be transferred during any given transaction with Pancakeswap.
- The owner can also enforce a maximum sell amount that only applies to accounts specified by the owner.
- The owner can enable/disable automatic liquidity adds and the buyback mechanism at any time.
- The owner can update the minimum threshold of tokens needed to trigger automatic liquidity adds and the buyback mechanism.
- The owner can withdraw any BNB or BEP20 tokens from the contract address at any time.
- The owner can add accounts to a blacklist which will prevent them from being able to participate in transfers.
- The owner can update the team's marketing wallet, tax wallet, and operations wallet at any time.
- The owner can update the Pancakeswap Router address at any time.
- No external threats were identified.
- Please ensure trust in the team prior to investing as they have substantial control in the ecosystem and control a large portion of the total supply.
- Date: November 23rd, 2021
- Updated: November 26th, 2021 to reflect the contract's mainnet deployment.
Audit 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 | N/A | PASS |
Deprecated Opcodes | N/A | PASS |
Ether Thief | N/A | PASS |
Exceptions | N/A | PASS |
External Calls | N/A | PASS |
Flash Loans | N/A | PASS |
Integer Over/Underflow | N/A | PASS |
Multiple Sends | N/A | PASS |
Oracles | 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 |
Function Graph
Inheritence Chart
Functions Overview
($) = payable function
# = non-constant function
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [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
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] functionDelegateCall #
- [Prv] _verifyCallResult
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
- [Prv] _setOwner #
+ [Int] IFactory
- [Ext] createPair #
- [Ext] getPair
+ [Int] IRouter
- [Ext] factory
- [Ext] WETH
- [Ext] addLiquidityETH ($)
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ HODL (Context, IERC20, Ownable)
- [Pub] #
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Pub] isExcludedFromTransferTax
- [Pub] isExcludedFromReward
- [Pub] isExcludedFromOperations
- [Pub] isExcludedFromBuyback
- [Pub] isExcludedFromMarketing
- [Pub] isExcludedFromBuyFee
- [Pub] isExcludedFromSellFee
- [Pub] deliver #
- [Pub] reflectionFromToken
- [Ext] startTrading #
- modifiers: onlyOwner
- [Pub] tokenFromReflection
- [Pub] excludeFromReward #
- modifiers: onlyOwner
- [Ext] includeInReward #
- modifiers: onlyOwner
- [Ext] setTransferTax #
- modifiers: onlyOwner
- [Ext] setSellCap #
- modifiers: onlyOwner
- [Pub] excludeFromTransferTax #
- modifiers: onlyOwner
- [Pub] includeInTransferTax #
- modifiers: onlyOwner
- [Pub] excludeFromFee #
- modifiers: onlyOwner
- [Pub] includeInFee #
- modifiers: onlyOwner
- [Pub] excludeFromSellFee #
- modifiers: onlyOwner
- [Pub] includeInSellFee #
- modifiers: onlyOwner
- [Pub] excludeFromBuyFee #
- modifiers: onlyOwner
- [Pub] includeInBuyFee #
- modifiers: onlyOwner
- [Pub] excludeFromOperations #
- modifiers: onlyOwner
- [Pub] includeInOperations #
- modifiers: onlyOwner
- [Pub] excludeFromMarketing #
- modifiers: onlyOwner
- [Pub] includeInMarketing #
- modifiers: onlyOwner
- [Pub] excludeFromBuyback #
- modifiers: onlyOwner
- [Pub] includeInBuyback #
- modifiers: onlyOwner
- [Pub] isExcludedFromFee
- [Ext] setFeeRates #
- modifiers: onlyOwner
- [Ext] setSellFeeRates #
- modifiers: onlyOwner
- [Prv] _reflectRfi #
- [Prv] _takeOperations #
- [Prv] _takeTransferTax #
- [Prv] _takeBuyback #
- [Prv] _takeLiquidity #
- [Prv] _takeMarketing #
- [Prv] _getValues
- [Prv] _getTValues
- [Prv] _getRValues
- [Prv] _getRate
- [Prv] _getCurrentSupply
- [Prv] _approve #
- [Prv] _transfer #
- [Prv] _tokenTransfer #
- [Prv] buyBackTokens #
- modifiers: lockTheSwap
- [Prv] swapETHForTokens #
- [Prv] swapAndLiquify #
- modifiers: lockTheSwap
- [Prv] addLiquidity #
- [Prv] swapTokensForBNB #
- [Ext] updateMarketingWallet #
- modifiers: onlyOwner
- [Ext] updateOperationsWallet #
- modifiers: onlyOwner
- [Ext] updateTaxWallet #
- modifiers: onlyOwner
- [Ext] setMaxBuyAndSellAmount #
- modifiers: onlyOwner
- [Ext] updateSwapTokensAtAmount #
- modifiers: onlyOwner
- [Ext] updateSwapEnabled #
- modifiers: onlyOwner
- [Ext] updateBuybackEnabled #
- modifiers: onlyOwner
- [Ext] setAntibot #
- modifiers: onlyOwner
- [Ext] setBuybackUpperLimit #
- modifiers: onlyOwner
- [Pub] isBot
- [Ext] rescueBNB #
- modifiers: onlyOwner
- [Ext] rescueBEP20Tokens #
- modifiers: onlyOwner
- [Ext] setRouterAddress #
- modifiers: onlyOwner
- [Ext] ($)