POP Coin audit reports

BNB Chainpopcoin.cash

POP Coin has 1 public audit report from CertiK; dated 7 Jun 2023; no critical findings reported. It also holds 1 deployed contract on 1 chain.

Critical findings
No open critical findings
In 1 report.
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Open findings across every firm15

Statuses are the security firms’ own

15 findings are still open or acknowledged in the firms’ reports: 1 high, 2 medium, 12 low (12 open, 3 acknowledged).

High
1
Medium
2
Low
12
  • High Acknowledged

    Initial Token Distribution

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Medium Acknowledged

    No Liquidity Supplying Mechanism

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Medium Acknowledged

    Variable `_rOwned[account]` Not Updated in Functi

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Check-effect-interaction Pattern Violation

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Improper management of fee exclusions

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Inefficient Memory Parameter

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Missing Emit Events

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Missing Zero Address Validation

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Potential `Out-of-Gas` Issue

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

  • Low Open

    Potential Removal of Reflection Mechanism

    POP Coin - Audit · CertiK · 7 Jun 2023 · Report ↗

All 15 open and acknowledged findings

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
POP Coin - AuditSecurity firm: CertiKDate: Scope: 1 address on BNB ChainNone openFindings: 2 high · 2 medium · 12 low
1 fixed · 3 acknowledged · 12 open
skynet.certik.com ↗

Findings16

Statuses are the security firm’s own, from each report.

SeverityOpenAcknowledgedFixed
Critical000
High011
Medium020
Low1200
LowCheck-effect-interaction Pattern ViolationPOP Coin - Audit · CertiK · 7 Jun 2023Open

In function `transferFrom()`, the `_transfer()` function is executed before checks and updates to the allowance are processed. ```solidity=230 function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "BEP20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } ``` This violates the check-effect-interaction pattern and should follow the checks and updates of the allowances. An added benefit is that having the allowance check `require(currentAllowance >= amount, "BEP20: transfer amount exceeds allowance")` before the execution of the `_transfer()` function (or any checks in general before such external function calls) will save gas since all remaining gas will be returned after the function reverts immediately due to insufficient gas.

Open the report
LowImproper management of fee exclusionsPOP Coin - Audit · CertiK · 7 Jun 2023Open

Currently the `owner()` and `marketingWallet` are excluded from fees but there is no mechanism in place to handle these privileges when ownership is transferred or renounced. ```solidity constructor(address routerAddress) { IRouter _router = IRouter(routerAddress); address _pair = IFactory(_router.factory()).createPair(address(this), _router.WETH()); router = _router; pair = _pair; excludeFromReward(pair); excludeFromReward(deadWallet); _rOwned[owner()] = _rTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[owner()] = true; // Issue: Owner account is excluded from fees _isExcludedFromFee[marketingWallet] = true; // Issue: Marketing wallet is excluded from fees _isExcludedFromFee[deadWallet] = true; emit Transfer(address(0), owner(), _tTotal); } ``` Proper changes to the exclusion of fees can still be managed when ownership is transferred, however an issue arises especially in the case of the renouncing of ownership. There is no way to remove the privilege of exclusion from fees for the previous owner if he/she does not remove the exclusion prior to renouncing of ownership.

Open the report
LowInefficient Memory ParameterPOP Coin - Audit · CertiK · 7 Jun 2023Open

One or more parameters with `memory` data location are never modified in their functions and those functions are never called internally within the contract. Thus, their data location can be changed to `calldata` to avoid the gas consumption copying from calldata to memory. ```solidity=530 function changeFee(Taxes memory _taxes) public onlyOwner { ``` `changeFee` has memory location parameters: `_taxes`.

Open the report
LowMissing Emit EventsPOP Coin - Audit · CertiK · 7 Jun 2023Open

There should always be events emitted in the sensitive functions that are controlled by centralized roles.

Open the report
LowMissing Zero Address ValidationPOP Coin - Audit · CertiK · 7 Jun 2023Open

Addresses are not validated before assignment or external calls, potentially allowing the use of zero addresses and leading to unexpected behavior or vulnerabilities. For example, transferring tokens to a zero address can result in a permanent loss of those tokens. --- ```solidity=536 marketingWallet = _marketWallet; ``` - `_marketWallet` is not zero-checked before being used.

Open the report
LowPotential `Out-of-Gas` IssuePOP Coin - Audit · CertiK · 7 Jun 2023Open

There is a potential `out-of-gas` issue in function `includeInReward()` since it uses a loop to iterate over `_excluded`, which could potentially result in a high amount of gas consumption. If `_excluded` contains a large number of elements, the loop may consume more gas than is available in a single block. This would cause the transaction to fail with the "out-of-gas" error. ```solidity=303 for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } ```

Open the report
LowPotential Removal of Reflection MechanismPOP Coin - Audit · CertiK · 7 Jun 2023Open

In a reflection mechanism, users are charged a fee every time they make a trade. This fee is used to reward users who hold tokens, but it does not trigger a transfer of tokens. Instead, it only modifies a coefficient. In this mechanism, the user possesses two types of token amounts: `tAmount` and `rAmount`. `tAmount` represents the actual amount of tokens, while `rAmount` denotes the number of tokens after reflection. The rate between the two is calculated as $$$\frac{rTotal}{tTotal}$$$. The `balanceOf()` function returns the `tAmount` or `rAmount` depending on whether the address is participating in the reflection. ```solidity=216 function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } ``` The function `tokenFromReflection()` returns the token amount after the rate of reflection is taken into account. ```solidity=285 function tokenFromReflection(uint256 rAmount) public view returns (uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount / currentRate; } ``` In the `PopCoin` contract, the `rfi` fee is used for the reflection mechanism, which is utilized to decrease the `_rTotal` and subsequently reduce the `rate`. This results in the inflation of the holders' balances through the distribution of rewards. ```solidity=326 function _reflectRfi(uint256 rRfi, uint256 tRfi) private { _rTotal -= rRfi; totFeesPaid.rfi += tRfi; } ``` However, the `rfi` fee can be updated by the owner and set to any value less than 15%. If it is set to zero, then `_rTotal` will not be decreased anymore, and in this case, there will be no reflection mechanism. ```solidity=530 function changeFee(Taxes memory _taxes) public onlyOwner { require((_taxes.rfi + _taxes.marketing) <= 15, "Tax must lower than 15%"); taxes = _taxes; } ```

Open the report
LowPotential Sandwich AttacksPOP Coin - Audit · CertiK · 7 Jun 2023Open

A sandwich attack might happen when an attacker observes a transaction swapping tokens or adding liquidity without set restrictions on the slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (executing a transaction before the transaction being attacked) a transaction to purchase one of the assets and make profits by backrunning (executing a transaction after the transaction being attacked) a transaction to sell the asset. The following functions are called without setting restrictions on slippage or minimum output amount, so transactions triggering these functions are vulnerable to sandwich attacks, especially when the input amount is large: * `router.swapExactTokensForETHSupportingFeeOnTransferTokens()` ```solidity=515 router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); ```

Open the report
LowState Variable Should Be Declared ConstantPOP Coin - Audit · CertiK · 7 Jun 2023Open

State variables that never change should be declared as `constant` to save gas. ```solidity=139 uint256 private _tTotal = 210000000000000000 * 10**_decimals; ``` - `_tTotal` should be declared `constant`. --- ```solidity=144 address public deadWallet = 0x000000000000000000000000000000000000dEaD; ``` - `deadWallet` should be declared `constant`.

Open the report
LowToo Many DigitsPOP Coin - Audit · CertiK · 7 Jun 2023Open

Literals with many digits are difficult to read and review. ```solidity=139 uint256 private _tTotal = 210000000000000000 * 10**_decimals; ```

Open the report
Show 2 more
LowUnlocked Compiler VersionPOP Coin - Audit · CertiK · 7 Jun 2023Open

The contract cited has an unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to ambiguity when debugging, as compiler specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one.

Open the report
LowVariables That Could Be Declared as ImmutablePOP Coin - Audit · CertiK · 7 Jun 2023Open

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

Open the report

Contracts1

AddressChainSource code
0xebdba914eb214fbf7ab1acd02563da43831ad0a4Chain: BNB ChainSource code: Verified source

POP Coin: questions

Is POP Coin audited?

Trustblock holds 1 public audit report for POP Coin, dated 7 Jun 2023. The latest is by CertiK (“POP Coin - Audit”).

Who audited POP Coin?

CertiK wrote the report Trustblock holds for POP Coin.

Are there open findings in POP Coin’s audits?

15 findings are still open or acknowledged in the firms’ reports: 1 high, 2 medium, 12 low (12 open, 3 acknowledged). No critical finding is reported. Statuses are the security firms’ own.

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="pop-coin"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us