Polkadog - Smart Contract Audit Report

Summary

Polkadog Audit Report Polkadog ($PDOG) is a new DeFi project that automatically provides rewards to users who hold the token via frictionless fee redistribution.

Polkadog is deployed at 0xb16e967ff83de3f1e9fceafbc2c28c1c5c56ef91 on the Ethereum mainnet.

Notes on the Contract:
  • Polkadog's code implements and builds upon the fee-redistribution features pioneered by Reflect Finance.
  • The total supply of the token is 100,000,000 $PDOG.
  • There is a burn function that will allow holders to send tokens to the burn address. If the owner does not exclude the burn address after deploying, it will participate in the reward distribution (as a regular holder) and increase proportionally to the rewards it receives. This is often used as a deflationary mechanism.
  • There is a fee on all transactions for any "non-excluded" address that participates in a transfer. The owner has the ability to modify the fees to any percentage at any time.
  • A portion of the fee is redistributed to existing token holders instantly and automatically at the time of each transaction.
  • A portion of the fee is burned automatically at the time of each transaction.
  • A portion of the fee is automatically added to the liquidity pool.
  • The portions mentioned above can be changed by the owner to any percentage at any time.
  • Liquidity-adds are funded by selling half of the tokens collected as fees, pairing the received ETH with the token, and adding it as liquidity to the ETH pair.
  • The recipient of the newly created LP tokens is the owner.
  • The owner of the contract can exclude and include accounts from transfer fees.
  • The owner of the contract can exclude and include accounts from the reward distribution.
  • The owner of the contract can exclude and include accounts from the maximum transaction amount.
  • The owner has the ability to pause and unpause the contract at any time, and doing so will prevent any transfers from occurring.
  • The owner has the ability to pause and unpause addresses at any time, and doing so will prevent participation in any transaction. (Serving a similar purpose to having a blacklist).
  • Ownership has not been renounced.
  • The contract utilizes SafeMath libraries along with following the ERC20 standard.
  • As the project is implemented with solidity version ^0.8.0, it is protected from overflows.
Audit Findings Summary
  • No external threats were identified.
  • We strongly recommend that the team renounces ownership.
  • There are 5 addresses whose holdings represent over 50% of the total token supply. This is typically considered an to be an unhealthy token allocation.
  • As with any token, please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
  • Date: June 12th, 2021

Audit Results

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
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
 
 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  Ownable (Context)
    - [Pub]  #
    - [Pub] owner

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

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

 + [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] IUniswapV2Factory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #

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

 +  Polkadog (Context, IERC20, IERC20Metadata, Ownable, Pausable)
    - [Pub]  #
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Pub] balanceOf
    - [Ext] transfer #
    - [Ext] transferToDistributors #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] increaseAllowance #
    - [Ext] decreaseAllowance #
    - [Ext] pauseContract #
       - modifiers: onlyOwner
    - [Ext] unPauseContract #
       - modifiers: onlyOwner
    - [Ext] pauseAddress #
       - modifiers: onlyOwner
    - [Ext] unPauseAddress #
       - modifiers: onlyOwner
    - [Ext] isAddressPaused
    - [Int] _setDeployDate #
    - [Ext] isExcludedFromReward
    - [Ext] isExcludedFromMaxTx
    - [Ext] totalFees
    - [Ext] reflectionFromToken
    - [Pub] tokenFromReflection
    - [Pub] excludeFromReward #
       - modifiers: onlyOwner
    - [Pub] includeInReward #
       - modifiers: onlyOwner
    - [Ext] excludeFromFee #
       - modifiers: onlyOwner
    - [Pub] includeInFee #
       - modifiers: onlyOwner
    - [Ext] excludeFromMaxTx #
       - modifiers: onlyOwner
    - [Ext] includeInMaxTx #
       - modifiers: onlyOwner
    - [Ext] setTaxFeePercent #
       - modifiers: onlyOwner
    - [Ext] setLiquidityFeePercent #
       - modifiers: onlyOwner
    - [Ext] setBurnPercent #
       - modifiers: onlyOwner
    - [Ext] setMaxTxPercent #
       - modifiers: onlyOwner
    - [Ext] setSwapAndLiquifyEnabled #
       - modifiers: onlyOwner
    - [Ext] enableFee #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Prv] _reflectFee #
    - [Prv] _getValues
    - [Prv] _getTValues
    - [Prv] _getRValues
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Prv] _takeLiquidity #
    - [Prv] calculateTaxFee
    - [Prv] calculateLiquidityFee
    - [Prv] calculateTransactionBurn
    - [Prv] removeAllFee #
    - [Prv] restoreAllFee #
    - [Ext] isIncludedInFee
    - [Int] _approve #
    - [Prv] _transfer #
    - [Prv] swapAndLiquify #
       - modifiers: lockTheSwap
    - [Prv] swapTokensForEth #
    - [Prv] addLiquidity #
    - [Prv] _tokenTransfer #
    - [Prv] _swapAndLiquify #
    - [Prv] _transferStandard #
    - [Prv] _transferBothExcluded #
    - [Prv] _transferToExcluded #
    - [Prv] _transferFromExcluded #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] __beforeTokenTransfer #
    - [Int] _beforeTokenTransfer #