Leisure Pay Token - Smart Contract Audit Report

Summary

Leisure Pay Token Audit Report Leisure Pay Token ($LPY) is a new BEP20 token that is an automatic liquidity providing protocol that pays out static rewards to holders.

We reviewed the LPY contract at commit a65c7dcafb2c27a8050b2636a2f6372d95632004 on the team's Github repository.

Notes on the Contract:
  • The total supply of the token is set to 10 billion $LPY [10,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.
  • There was no token allocation for our team to analyze as the contract has yet to be deployed to the mainnet.

  • There is a tax fee, liquidity fee, and marketing fee on all transfers where neither the sender nor the recipient are excluded from fees.
  • The tokens collected from the tax fee are removed from the circulating supply; This serves as a frictionless fee redistribution which automatically benefits all token holders at the time of each transaction.
  • 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 owner. We recommend that the team locks these newly acquired LP tokens.
  • The tokens collected from the marketing fee are sent to the team's Marketing wallet.
  • The contract features an anti-dump mechanism which prevents a user from selling more than a certain percentage (determined by the owner) of their token balance every 24 hours.
  • Although the Safemath library is utilized, the contract is implemented with Solidity v0.8.0 which has built-in overflow checks. Safemath could be safely removed to reduce contract size and increase gas savings.
  • Some gas optimizations can be achieved through declaring functions external instead of public, and some variables that could be declared constant.

  • Ownership Controls:
  • Ownership has not been renounced.
  • The owner can modify the tax fee, liquidity fee, and marketing fee to any percentages as long as the total fees combined does not exceed 6%. These percentages can only be updated once every 180 days.
  • The owner can exclude and include accounts from transfer fees and reward distribution.
  • The owner can set and update a maximum transaction amount at any time, which will impose a limit to the number of tokens that can be transferred during any given transaction.
  • The owner can exclude and include accounts from the anti-dump mechanism and set the percentage related to it to any value at any time. The owner must exercise caution when setting this percentage as to not lock users out of selling.
  • The owner can enable/disable automatic liquidity adds at any time and set the threshold value of tokens related to it.
  • The owner can manually add/remove accounts from a blacklist which prevents accounts from being able to participate in transfers.
  • The owner can update the team's Marketing wallet, the Automated Market Maker Pair, and the Pancakeswap Router to any addresses at any time.
Audit Findings Summary
  • No external threats were identified.
  • Please ensure trust in the team prior to investing as they have some control in the ecosystem.
  • Date: December 17th, 2021

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Centralization of ControlThe owner can update the anti-dump sell limit to any percentage at any time.WARNING
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Flash LoansN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
OraclesN/APASS
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

Function Graph

ERC20 Token Graph


Inheritence Chart

Multi-file Token


Functions Overview


 ($) = payable function
 # = non-constant function
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  Ownable (Context)
    - [Pub]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner
    - [Int] _transferOwnership #

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Int] verifyCallResult

 + [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

 + [Int] IPancakeFactory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #
    - [Ext] INIT_CODE_PAIR_HASH

 + [Int] IPancakeRouter01 
    - [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] IPancakeRouter02 (IPancakeRouter01)
    - [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
    - [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 +  LPY (Context, IERC20, Ownable)
    - [Prv] antiDump #
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Ext] updateSwapAmount #
       - modifiers: onlyOwner
    - [Ext] setBlacklisted #
       - modifiers: onlyOwner
    - [Ext] updateMaxPerc #
       - modifiers: onlyOwner
    - [Ext] changeMarketing #
       - modifiers: onlyOwner
    - [Ext] changeRouter #
       - modifiers: onlyOwner
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] isExcludedFromReward
    - [Pub] totalFees
    - [Pub] deliver #
    - [Pub] reflectionFromToken
    - [Pub] tokenFromReflection
    - [Ext] setAutomatedMarketMakerPair #
       - modifiers: onlyOwner
    - [Pub] excludeFromReward #
       - modifiers: onlyOwner
    - [Pub] includeInReward #
       - modifiers: onlyOwner
    - [Prv] _setAutomatedMarketMakerPair #
    - [Prv] _transferBothExcluded #
    - [Pub] excludeFromLimit #
       - modifiers: onlyOwner
    - [Pub] includeInLimit #
       - modifiers: onlyOwner
    - [Pub] excludeFromFee #
       - modifiers: onlyOwner
    - [Pub] includeInFee #
       - modifiers: onlyOwner
    - [Ext] updateFees #
       - modifiers: onlyOwner
    - [Pub] setSwapAndLiquifyEnabled #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Prv] _reflectFee #
    - [Prv] _getValues
    - [Prv] _getTValues
    - [Prv] _getRValues
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Prv] _takeLiquidity #
    - [Prv] _takeMarketing #
    - [Prv] calculateTaxFee
    - [Prv] calculateLiquidityFee
    - [Prv] calculateMarketingFee
    - [Prv] removeAllFee #
    - [Prv] restoreAllFee #
    - [Pub] isExcludedFromFee
    - [Pub] isExcludedFromLimit
    - [Prv] _approve #
    - [Prv] _transfer #
    - [Prv] swapAndLiquify #
       - modifiers: lockTheSwap
    - [Prv] swapTokensForEth #
    - [Prv] addLiquidity #
    - [Prv] _tokenTransfer #
    - [Prv] _transferStandard #
    - [Prv] _transferToExcluded #
    - [Prv] _transferFromExcluded #