Wildcard
Smart Contract Audit Report
Audit Summary
Wildcard is a new BEP-20 token that is an automatic liquidity providing protocol.
For this audit, we reviewed the WCTEST2 contract provided to us by the project team.
Audit Findings
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: April 8th, 2022.Finding #1 - WCTEST2 - Informational
Description: In the _swapContractToken() function, the totalTax denominator does not include the _devTax.Risk/Impact: Miscalculations will occur in the _swapContractToken() function as the fee denominator will not be accurate.uint16 totalTax=_liquidityTax+_marketingTax; ... uint256 tokenForLiquidity=(tokenToSwap*_liquidityTax)/totalTax; uint256 tokenForMarketing= (tokenToSwap*_marketingTax)/totalTax; uint256 tokenFordev= (tokenToSwap*_devTax)/totalTax;
Recommendation: _devTax should be included in the totalTax calculation.Finding #2 - WCTEST2 - Informational
Description: The following state variables and functions are redundant in the contract.Recommendation: These functions and state variables should either be removed or utilized in a way that fits the project team's intended functionality.State variables: _liquidityTokenAddress, isTokenSwapManual Functions: Settings_LiquidityTokenAddress() Control_setContractTokenSwapManual() destroy()Finding #3 - WCTEST2 - Informational
Description: Several 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.BalanceLimitDivider, BuyLimitDivider, InitialSupply, MaxSellLockTime, SellLimitDivider, _isTokenSwaping, antisniper, totalPayouts, totalTokenSwapGenerated
Contract Overview
Ownership Controls:
- The initial supply of the token is set to 5 billion [5,000,000,000].
- The owner can mint any number of tokens to the contract address up to the maximum supply of 10 billion tokens.
- No burn functions are accessible, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
- There was no token allocation for our team to analyze as the contract has yet to be deployed to the Mainnet.
- Trading must be enabled by the owner before all transfers can take place on the platform. Only the owner can participate in transfers when trading is disabled.
- The contract enforces a maximum sell amount and a maximum buy amount (both determined by the owner) that imposes a limit to the number of tokens that can be transferred via Pancakeswap in a single transaction.
- The contract features an Anti-bot mechanism that is triggered on sell transactions and peer-to-peer transfers that prevents a transfer from occurring if the cool-down period (determined by the owner) has not passed since the caller's last sell.
- The contract enforces a maximum wallet amount that prevents a transfer from occurring if the recipient's token balance will exceed the limit number of tokens (determined by the owner) after the transfer occurs.
- There is a Liquidity fee, Marketing fee, and Dev fee on all transfers where neither the sender nor the recipient is excluded from fees.
- The owner can manually assign a unique buy fee, sell fee, and transfer fee to any specified accounts.
- 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 contract is not currently performing an automatic liquidity add.
- The caller is not initiating a buy transaction via Pancakeswap.
- The contract address balance is greater than the number of tokens being transferred.
- 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 contract. The team can withdraw any tokens from the contract at any time. We recommend the team lock these newly acquired LP tokens.
- The tokens collected from the Marketing fee and Dev fee are swapped for BNB and split between the team's Marketing wallet and Dev wallet respectively.
- The contract utilizes the SafeMath library to protect against overflows/underflows.
- The contract complies with the BEP-20 token standard.
- The contract utilizes an Authorized Team role. The assigned addresses have access to specific functions in the contract.
- Authorized addresses can add/remove accounts from the Team role at any time.
- Authorized addresses can include and exclude accounts from fees at any time.
- Authorized addresses can enable/disable the Anti-bot mechanism at any time.
- Authorized addresses can include and exclude accounts from the Anti-bot mechanism at any time.
- Authorized addresses can set the Anti-bot cool-down period to any value at any time.
- Authorized addresses can toggle whether the number of tokens used for swapping is equal to the number of tokens being transferred or the swap-limit value.
- Authorized addresses can update the swap-limit to any value at any time.
- Authorized addresses can send all of the BNB collected from fees to the team's Marketing wallet and Dev wallet at any time.
- Authorized addresses can set percentages of BNB that is split between the Marketing wallet and Dev wallet to any values at any time.
- Authorized addresses can enable/disable the automatic token swapping functionality at any time.
- Authorized addresses can manually trigger the token swapping functionality at any time.
- Authorized addresses can set total fees on buys, sells, and peer-to-peer transfers to any values up to 15%.
- Authorized addresses can set percentage of tokens that are allocated to each fund (Liquidity, Dev, Marketing) to any values as long as the combined percentage equals 100%.
- Authorized addresses can set the maximum buy amount, sell amount, and wallet amount to any values at any time.
- Authorized addresses can withdraw any tokens from the contract at any time.
- The owner can add/remove accounts from the transfer blacklist at any time.
- The owner can view accounts that are currently on the transfer blacklist at any time.
- The owner can include/exclude accounts from the maximum wallet amount at any time.
- The owner can view accounts that are currently excluded from the maximum wallet amount at any time.
- The owner can disable all transfer fees at any time.
External Threat Results
| Vulnerability Category | Notes | Result |
|---|---|---|
| Arbitrary Storage Write | N/A | PASS |
| Arbitrary Jump | N/A | PASS |
| Centralization of Control |
| WARNING |
| Compiler Issues | N/A | PASS |
| Delegate Call to Untrusted Contract | N/A | PASS |
| Dependence on Predictable Variables | N/A | PASS |
| Ether/Token Theft | N/A | PASS |
| Flash Loans | N/A | PASS |
| Front Running | N/A | PASS |
| Improper Events | N/A | PASS |
| Improper Authorization Scheme | N/A | PASS |
| Integer Over/Underflow | N/A | PASS |
| Logical Issues | N/A | PASS |
| Oracle Issues | N/A | PASS |
| Outdated Compiler Version | N/A | PASS |
| Race Conditions | N/A | PASS |
| Reentrancy | N/A | PASS |
| Signature Issues | N/A | PASS |
| Unbounded Loops | N/A | PASS |
| Unused Code | Several functions and state variables are unused as reflected in Finding #2. | PASS |
| Overall Contract Safety | PASS |
Inheritance Chart
Function Graph

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] decimals
- [Ext] symbol
- [Ext] name
- [Ext] getOwner
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IUniswapERC20
- [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 #
+ [Int] IUniswapFactory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] IUniswapRouter01
- [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] factory
- [Ext] WETH
- [Ext] quote
- [Ext] getamountOut
- [Ext] getamountIn
- [Ext] getamountsOut
- [Ext] getamountsIn
+ [Int] IUniswapRouter02 (IUniswapRouter01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ Ownable
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] functionDelegateCall #
- [Prv] _verifyCallResult
+ [Lib] EnumerableSet
- [Prv] _add #
- [Prv] _remove #
- [Prv] _contains
- [Prv] _length
- [Prv] _at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
+ WCTEST2 (IERC20, Ownable)
- [Prv] _isTeam
- [Pub] #
- [Prv] _transfer #
- [Prv] _taxedTransfer #
- [Prv] _feelessTransfer #
- [Prv] _calculateFee
- [Prv] _addToken #
- [Prv] _removeToken #
- [Prv] _distributeFeesETH #
- [Prv] _swapContractToken #
- modifiers: lockTheSwap
- [Prv] _swapTokenForETH #
- [Prv] _addLiquidity #
- [Prv] destroy #
- [Pub] Control_getLimits
- [Pub] Control_getTaxes
- [Pub] Control_getAddressSellLockTimeInSeconds
- [Pub] Control_getSellLockTimeInSeconds
- [Pub] Control_SetPeggedSwap #
- modifiers: onlyTeam
- [Pub] Control_SetMaxSwap #
- modifiers: onlyTeam
- [Pub] Access_SetTeam #
- modifiers: onlyTeam
- [Pub] Access_ExcludeAccountFromFees #
- modifiers: onlyTeam
- [Pub] Access_IncludeAccountToFees #
- modifiers: onlyTeam
- [Pub] Access_ExcludeAccountFromSellLock #
- modifiers: onlyTeam
- [Pub] Access_IncludeAccountToSellLock #
- modifiers: onlyTeam
- [Pub] Team_WithdrawMarketingETH #
- modifiers: onlyTeam
- [Pub] Team_WithdrawdevETH #
- modifiers: onlyTeam
- [Pub] Control_SwitchManualETHConversion #
- modifiers: onlyTeam
- [Pub] Control_DisableSellLock #
- modifiers: onlyTeam
- [Pub] UTILIY_SetSellLockTime #
- modifiers: onlyTeam
- [Pub] UTILITY_MintContract #
- modifiers: onlyOwner
- [Pub] Control_SetTaxes #
- modifiers: onlyTeam
- [Pub] Control_ChangeMarketingShare #
- modifiers: onlyTeam
- [Pub] Control_ChangedevShare #
- modifiers: onlyTeam
- [Pub] Control_ManualGenerateTokenSwapBalance #
- modifiers: onlyTeam
- [Pub] Control_UpdateLimits #
- modifiers: onlyTeam
- [Pub] Settings_EnableTrading #
- modifiers: onlyTeam
- [Pub] Settings_LiquidityTokenAddress #
- modifiers: onlyTeam
- [Pub] UTILITY_RescueTokens #
- modifiers: onlyTeam
- [Pub] Control_setContractTokenSwapManual #
- modifiers: onlyTeam
- [Pub] CONTROL_blacklistAddress #
- modifiers: onlyOwner
- [Pub] CONTROL_unBlacklistAddress #
- modifiers: onlyOwner
- [Pub] UTILITY_checkBlacklist
- modifiers: onlyOwner
- [Pub] CONTROL_setFree #
- modifiers: onlyOwner
- [Pub] CONTROL_unSetFree #
- modifiers: onlyOwner
- [Pub] CONTROL_removeAllTaxes #
- modifiers: onlyTeam
- [Pub] UTILITY_checkFree
- modifiers: onlyOwner
- [Pub] setAddressFee #
- modifiers: onlyOwner
- [Ext] ($)
- [Ext] ($)
- [Ext] getOwner
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Prv] _approve #
- [Ext] transferFrom #
- [Ext] increaseAllowance #
- [Ext] decreaseAllowance # About SourceHat
SourceHat has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1800+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 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 SourceHat Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat 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.