addLiquiditycalls the external function
addLiquidityETH. Since this function can be called during
_transfer, it may cause
_transferto fail unnecessarily.
swapTokensForEthcalls external function
swapExactTokensForETHSupportingFeeOnTransferTokens, and is called during
_transfer, which can cause the same issues as specified in issue 01.
approvecould be called once (with max int), and then check if it is needed again using
_excludedarray can grow indefinitely.
getCurrentSupplyfunction which iterates over
_excludedarray. Iterating over an unbounded array can exceed the block gas limit which will make the token untradable.
includeInRewardwhich removes an element from the _excluded array.
includeInReward_rOwned is not updated. _rOwned should be updated and be calculated according to the current rate.
includeInRewardbased on its _tOwned amount
require(_isExcluded[account], "Account is already excluded");
existarray can grow indefinitely proportionally to the number of all-time holders.
minTokensBeforeSwapis set to a very small value which will likely always be less than the contract's token balance. Therefore,
swapAndLiquifywill take place in almost every sell, there is a chance that users will pay the gas cost for a small swap transaction. On BSC the gas fees are reasonable, but this may be a critical issue if considering deploying the contract to ETH.
myRewardsvariable is unused
SwapAndLiquifytakes place only on sell transactions. There is a chance that the contract will accrue a significant amount of tokens. The consequence is a pretty significant price drop because of the large number of tokens that would enter the pool. The team should be aware of this issue.
swapAndLiquify.We recommend limiting it based on a percentage of the pair balance.