Pitano

Smart Contract Audit Report

Audit Summary

Pitano is a new BEP-20 token on the Binance Smart Chain with an elastic supply that performs automatic liquidity adds.

For this audit, we reviewed the project team's Pitano contract at 0xE833CF71263F79cF95E22bD74c60A6706e4651e3 on the Binance Smart Chain Mainnet.

Audit Findings

Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: April 3rd, 2022.

Finding #1 - Pitano - Informational

Description: Several functions are declared public, but are never called internally.
updateBlacklist, addMinter, removeMinter, rescueToken
Recommendation: These functions should be declared external for additional gas savings on each call.

Finding #2 - Pitano - Informational

Description: The DEAD and ZERO state variables can never be modified, but are not declared constant.
Recommendation: These state variables should be declared constant for additional gas savings on each call.

Contract Overview

  • The initial supply of the token is set to 4 billion $PITANO [4,000,000,000].
  • The maximum allowed supply of $PITANO is 340,282,366,920,938,463,463,374,607,431,768,211,455 tokens.
  • The contract utilizes a Minter role. The assigned addresses can mint any number of tokens up to the maximum supply to any address at any time.
  • The owner can manually trigger a positive or negative rebase at any time. This serves as a frictionless token redistribution which automatically adds or removes tokens for all token holders proportionally at the time of each total supply change.
  • The rebase function calls sync() on the Pancakeswap Pair contract to prevent theft-of-liquidity attacks that have occurred with other rebase tokens.
  • No burn functions are present though the circulating supply can be decreased by sending tokens to the 0x..dead address.
  • At the time of writing this report, 100% of the total supply belongs to the owner.

  • The initial distribution period of the contract must be manually disabled by the owner in order for all trading to take place on the platform. Only users that are excluded can transfer tokens while the initial distribution period is enabled.
  • There is a Liquidity fee, Treasury fee, and Risk-Free Value fee on all transfers via Pancakeswap where neither the sender nor the recipient is excluded from fees.
  • There is an additional Sell fee added on all sell transactions via Pancakeswap.
  • Blacklisted accounts are not permitted to transfer tokens.
  • The fees charged during transfers are stored in the contract address. The tokens are swapped for BNB for the purpose of funding Pancakeswap liquidity when the following conditions are met:
    • The automatic liquidity add functionality is enabled by the team.
    • The threshold number of tokens in the contract address (determined by the owner) has been reached.
    • The caller is not initiating a buy transaction via Pancakeswap.
    • The contract is not currently performing an automatic liquidity add.
  • If the Liquidity during the swap is greater than the target value set by the team, no liquidity will be added. Otherwise, the Liquidity fee is used for an automatic Liquidity-add.
  • Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
  • The LP tokens received through this process are sent to the Liquidity wallet controlled by the team. We recommend that the team lock these newly acquired LP tokens.
  • The tokens collected from the Treasury fee and Risk-Free Value fee are swapped for BNB and sent to the team's Treasury wallet and Risk-Free Value wallet respectively.
  • The contract utilizes SafeMath libraries to prevent any overflows/underflows.

  • The owner can set each fee to any value as long as the total fee percentage combined does not exceed 25%.
  • The owner can set the additional fee on sell transactions to any value at any time.
  • The owner can exclude accounts from transfer fees.
  • The owner can add/remove accounts from the transfer blacklist at any time.
  • The owner can enable/disable automatic liquidity adds at any time.
  • The owner can update the threshold number of tokens that triggers an automatic liquidity add to any value at any time.
  • The owner can add/remove accounts from the Minter role at any time.
  • The owner can update the target liquidity to any value at any time.
  • The owner can airdrop any number of tokens to any addresses at any time.
  • The owner can withdraw any BNB or tokens from the contract at any time.
  • The owner can update the Pancakeswap Pair address, Treasury wallet, Liquidity wallet, and Risk-Free Value wallets at any time.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of Control
  • The LP tokens generated through automatic liquidity adds are sent to the team's Liquidity wallet.
  • The owner can set the additional fee on sell transactions to any percentage.
  • The owner can manually trigger a positive or negative rebase.
  • The owner can manually add/remove accounts from the transfer blacklist.
  • The owner can withdraw any tokens and BNB from the contract.
WARNING
Compiler IssuesN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Ether/Token TheftN/APASS
Flash LoansN/APASS
Front RunningN/APASS
Improper EventsN/APASS
Improper Authorization SchemeN/APASS
Integer Over/UnderflowN/APASS
Logical IssuesN/APASS
Oracle IssuesN/APASS
Outdated Compiler VersionN/APASS
Race ConditionsN/APASS
ReentrancyN/APASS
Signature IssuesN/APASS
Unbounded LoopsN/APASS
Unused CodeN/APASS
Overall Contract Safety PASS

Inheritance Chart

Smart Contract Audit - Inheritance

Function Graph

Smart Contract Audit - Graph

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Lib] SafeMathInt 
    - [Int] mul
    - [Int] div
    - [Int] sub
    - [Int] add
    - [Int] abs

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

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

 + [Int] InterfaceLP 
    - [Ext] sync #

 + [Lib] Roles 
    - [Int] add #
    - [Int] remove #
    - [Int] has

 +  MinterRole 
    - [Pub]  #
    - [Pub] isMinter
    - [Pub] renounceMinter #
    - [Int] _addMinter #
    - [Int] _removeMinter #

 +  ERC20Detailed (IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals

 + [Int] IDEXRouter 
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 + [Int] IDEXFactory 
    - [Ext] createPair #

 +  Ownable 
    - [Pub]  #
    - [Pub] owner
    - [Pub] isOwner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner
    - [Int] _transferOwnership #

 +  Pitano (ERC20Detailed, Ownable, MinterRole)
    - [Pub]  #
       - modifiers: ERC20Detailed
    - [Pub] updateBlacklist #
       - modifiers: onlyOwner
    - [Ext] rebase #
       - modifiers: onlyOwner
    - [Ext] totalSupply
    - [Ext] transfer #
       - modifiers: validRecipient,initialDistributionLock
    - [Ext] setLP #
       - modifiers: onlyOwner
    - [Ext] allowance
    - [Ext] balanceOf
    - [Int] _basicTransfer #
    - [Int] _transferFrom #
    - [Ext] transferFrom #
       - modifiers: validRecipient
    - [Int] swapBack #
       - modifiers: swapping
    - [Int] takeFee #
    - [Ext] decreaseAllowance #
       - modifiers: initialDistributionLock
    - [Ext] increaseAllowance #
       - modifiers: initialDistributionLock
    - [Ext] approve #
       - modifiers: initialDistributionLock
    - [Ext] checkFeeExempt
    - [Ext] setInitialDistributionFinished #
       - modifiers: onlyOwner
    - [Ext] enableTransfer #
       - modifiers: onlyOwner
    - [Ext] setFeeExempt #
       - modifiers: onlyOwner
    - [Int] shouldTakeFee
    - [Ext] mint #
       - modifiers: onlyMinter
    - [Ext] setSwapBackSettings #
       - modifiers: onlyOwner
    - [Int] shouldSwapBack
    - [Pub] getCirculatingSupply
    - [Ext] setTargetLiquidity #
       - modifiers: onlyOwner
    - [Pub] addMinter #
       - modifiers: onlyOwner
    - [Pub] removeMinter #
       - modifiers: onlyOwner
    - [Ext] isNotInSwap
    - [Ext] sendPresaleToken #
       - modifiers: onlyOwner
    - [Ext] checkSwapThreshold
    - [Ext] manualSync #
    - [Ext] setFeeReceivers #
       - modifiers: onlyOwner
    - [Ext] setFees #
       - modifiers: onlyOwner
    - [Ext] clearStuckBalance #
       - modifiers: onlyOwner
    - [Pub] rescueToken #
       - modifiers: onlyOwner
    - [Prv] transferToAddressETH #
    - [Pub] getLiquidityBacking
    - [Pub] isOverLiquified
    - [Ext]  ($)

About Solidity Finance

Solidity Finance was founded in 2020 and quickly grew to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1000+ solidity smart contract audits covering all major project types and protocols, securing a total of over $10 billion U.S. dollars in on-chain value.
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!

Contact us today to get a free quote for a smart contract audit of your project!

What is a Solidity Audit?

Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.

How Do I Interpret the Findings?

Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:

  • High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
  • Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
  • Low severity issues have a relatively minor risk association; these issues have a low probability of occurring or may have a minimal impact.
  • Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.