LOTDOG - Smart Contract Audit Report

Summary

 LOTDOG Audit Report The LOTDOG Token is a new token with frictionless fee redistribution, liquidity adds, and a lottery mechanism.

We reviewed LOTDOG Token's contract using code at 0x29f920ddc62Fe53711a5c8B8FF16Fa5c75cA12A3 on the Binance Smart Chain mainnet.

Features of the Contract:
  • The total supply of the token is 1 quadrillion.
  • No mint or burn functions exist, though the circulating supply can be decreased by sending tokens to the burn address.
  • 27% of the token's supply has been sent to the burn address.
  • 14.3% of the supply is held as liquidity in the Pancakeswap pool.
  • The team holds 9.2% of the token's supply.
  • The next largest holder has 1.4%.

  • There is a fee on transfers of the token.
  • 4% of each transfer will be distributed among all token holders.
  • 4% will be used to add liquidity via swapAndLiquify logic.
  • 2% of each transaction will be used to fund the lottery pool.
  • Each user will be considered to have bought a ticket in the lottery by making a purchase of the token worth at least 0.05 BNB.
  • There is a threshold value in both the number of raffle tickets and amount of BNB held for the jackpot. If either is not reached in the 8-hour time window, collection of funds and tickets shall continue.
  • Chainlink is used to get random data securely from off-chain for the lottery.
  • A portion of the BNB collected in the contract will be sold for LINK tokens to fund the randomness requests for the lottery.

  • The owner can exclude any address from the fee mechanism and can recover any ERC20 tokens erroneously sent to the contract.
  • The owner can also set the tax fees and variables used in the lottery to any value at any time.
  • Some gas optimizations could be achieved, but as this is already deployed this is merely informational.
  • SafeMath is utilized to prevent overflow issues.
Audit Findings Summary:
  • No security issues from outside attackers were identified.
  • Ensure trust in the team as they have substantial control in the ecosystem.
  • Date: May 21st, 2021.

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
SuicideN/APASS
State Change External CallsN/APass
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

Smart Contract Graph

Contract Inheritance


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _clean #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] clean #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] clean #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] clean #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] SafeMathChainlink 
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod

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

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

 +  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

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

 +  ERC20 (Context, IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _setupDecimals #
    - [Int] _beforeTokenTransfer #

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

 + [Int] LinkTokenInterface 
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] balanceOf
    - [Ext] decimals
    - [Ext] decreaseApproval #
    - [Ext] increaseApproval #
    - [Ext] name
    - [Ext] symbol
    - [Ext] totalSupply
    - [Ext] transfer #
    - [Ext] transferAndCall #
    - [Ext] transferFrom #

 +  VRFRequestIDBase 
    - [Int] makeVRFInputSeed
    - [Int] makeRequestId

 +  VRFConsumerBase (VRFRequestIDBase)
    - [Int] fulfillRandomness #
    - [Int] requestRandomness #
    - [Pub]  #
    - [Ext] rawFulfillRandomness #

 +  Owned 
    - [Pub]  #
    - [Ext] transferOwnership #
       - modifiers: onlyOwner
    - [Ext] acceptOwnership #

 +  ReentrancyGuard 
    - [Int]  #

 +  ERC677Receiver 
    - [Pub] onTokenTransfer #

 +  PegSwap (Owned, ReentrancyGuard)
    - [Ext]  #
    - [Ext] addLiquidity #
    - [Ext] removeLiquidity #
       - modifiers: onlyOwner
    - [Ext] swap #
       - modifiers: nonReentrant
    - [Ext] recoverStuckTokens #
       - modifiers: onlyOwner
    - [Ext] onTokenTransfer #
    - [Pub] getSwappableAmount
    - [Prv] _addLiquidity #
    - [Prv] _removeLiquidity #
    - [Prv] _hasLiquidity #

 +  LOTDOG (Context, IERC20, Ownable, VRFConsumerBase)
    - [Pub]  #
       - modifiers: VRFConsumerBase
    - [Prv] _modifyRaffleEligibility #
    - [Ext] recoverERC20 #
       - modifiers: onlyOwner
    - [Prv] startNextRaffleIfExpired #
    - [Prv] swapBnbForLink #
    - [Prv] getBnbPriceOfToken
    - [Prv] getTokenPriceInBnb
    - [Prv] isContract
    - [Prv] startRaffleProcedure #
    - [Int] fulfillRandomness #
    - [Prv] payWinner #
    - [Prv] scheduleNextRaffle #
    - [Prv] _cleanUpPreviousParticipantSets #
    - [Pub] cleanUpPreviousParticipantSets #
       - modifiers: onlyOwner
    - [Prv] getNextNonEmptyParticipantSet
    - [Prv] getNextRaffleParticipantSet
    - [Prv] nextRaffleParticipantSet #
    - [Prv] addRaffleParticipant #
    - [Prv] removeRaffleParticipant #
    - [Pub] containsRaffleParticipant
    - [Prv] garbageCollectRaffleParticipants #
    - [Pub] lengthRaffleParticipants
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] isExcludedFromReward
    - [Pub] totalFees
    - [Pub] deliver #
    - [Pub] reflectionFromToken
    - [Pub] tokenFromReflection
    - [Pub] excludeFromReward #
       - modifiers: onlyOwner
    - [Ext] includeInReward #
       - modifiers: onlyOwner
    - [Prv] _transferBothExcluded #
    - [Pub] excludeFromFee #
       - modifiers: onlyOwner
    - [Pub] includeInFee #
       - modifiers: onlyOwner
    - [Ext] setTaxFeePercent #
       - modifiers: onlyOwner
    - [Ext] setTokenBnbEntryPriceSlippage #
       - modifiers: onlyOwner
    - [Ext] setNumTokensSellToAddToLiquidity #
       - modifiers: onlyOwner
    - [Ext] setNumTokensSellForLottery #
       - modifiers: onlyOwner
    - [Ext] setMinRaffleEntryAmount #
       - modifiers: onlyOwner
    - [Ext] setLotteryFeePercent #
       - modifiers: onlyOwner
    - [Ext] setRaffleNextTime #
       - modifiers: onlyOwner
    - [Ext] setRaffleThresholdHugeBuySell #
       - modifiers: onlyOwner
    - [Ext] setLiquidityFeePercent #
       - modifiers: onlyOwner
    - [Ext] setLinkFee #
       - modifiers: onlyOwner
    - [Ext] setMaxTxPercent #
       - modifiers: onlyOwner
    - [Ext] setSwapLinkSlippageFactor #
       - modifiers: onlyOwner
    - [Pub] setSwapAndLiquifyEnabled #
       - modifiers: onlyOwner
    - [Pub] setSwapForRaffleEnabled #
       - modifiers: onlyOwner
    - [Pub] setRaffleInterval #
       - modifiers: onlyOwner
    - [Pub] setCleanUpFactor #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Prv] _reflectFee #
    - [Prv] _getValues
    - [Prv] _getTValues
    - [Prv] _getRValues
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Prv] _takeLiquidity #
    - [Prv] _takeForRaffle #
    - [Prv] calculateTaxFee
    - [Prv] calculateLiquidityFee
    - [Prv] calculateLotteryFee
    - [Prv] removeAllFee #
    - [Prv] restoreAllFee #
    - [Pub] isExcludedFromFee
    - [Prv] _approve #
    - [Prv] _transfer #
    - [Prv] swapAndLiquify #
       - modifiers: lockTheSwap
    - [Prv] _swapForRaffle #
       - modifiers: lockTheSwap
    - [Prv] swapTokensForEth #
    - [Prv] addLiquidity #
    - [Prv] _tokenTransfer #
    - [Prv] _transferStandard #
    - [Prv] _transferToExcluded #
    - [Prv] _transferFromExcluded #