addLiquidty
addLiquidity
calls the external function addLiquidityETH
. Since this function can be called during _transfer
, it may cause _transfer
to fail unnecessarily. _transfer
swapTokensForEth
swapTokensForEth
calls external function swapExactTokensForETHSupportingFeeOnTransferTokens
, and is called during _transfer
, which can cause the same issues as specified in issue 01._approve
approve
could be called once (with max int), and then check if it is needed again using allowance
addLiquidity
_getCurrentSupply
_excluded
array can grow indefinitely. _transfer
calls getCurrentSupply
function which iterates over _excluded
array. Iterating over an unbounded array can exceed the block gas limit which will make the token untradable. includeInReward
which removes an element from the _excluded array. includeInReward
includeInReward
_rOwned is not updated. _rOwned should be updated and be calculated according to the current rate.includeInReward
based on its _tOwned amountincludeInReward
require(_isExcluded[account], "Account is already excluded");
exist
array can grow indefinitely proportionally to the number of all-time holders. minTokensBeforeSwap
is set to a very small value which will likely always be less than the contract's token balance. Therefore, swapAndLiquify
will 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.myRewards
variable is unusedswapAndLiquify
SwapAndLiquify
takes 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.