CertiK reviewed DollarMoon (Dollarmoon - Audit 1) on 30 May 2023: 15 findings, 0 critical; 5 acknowledged, 10 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 4 | 0 |
| Medium | 0 | 1 | 0 |
| Low | 10 | 0 | 0 |
The `uniswapV2Router` is excluded from receiving dividend at contract deployment, but will start receiving dividend when `uniswapV2Router` is updated.
The `DEAD` address is not excluded from dividends. In this case, the burned tokens still sharing dividends, and the dividends will be left over to the `DividendTracker` contract.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.
A sandwich attack may happen when an attacker observes a transaction swapping tokens or adding liquidity without setting restrictions on slippage or minimum output amount. The attacker can manipulate the exchange rate by frontrunning (executing before the target) a transaction to purchase one of the assets and make profits by backrunning (executing after the target) 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: - `swapTokensForEth()` - `swapAndSendMarketingBNB()`
State variables that never change should be declared as `constant` to save gas. ```solidity=1232 address public deadAddress = 0x000000000000000000000000000000000000dEaD; ``` - `deadAddress` should be declared `constant`.
The contract is serving as the underlying entity to interact with one or more third party protocols. The scope of the audit treats third party entities as black boxes and assume their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=1219 IUniswapV2Router02 public uniswapV2Router; ``` - The contract `DollarMoon` interacts with third party contract with `IUniswapV2Router02` interface via `uniswapV2Router`.
The return value of an external call is not stored in a local or state variable. ```solidity=1592 dividendTracker.processAccount(msg.sender, false); ``` --- ```solidity=1813 uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable liquidityWallet, block.timestamp ); ```
One or more state variables are never used in the codebase. Variable `MAX_INT256` in `SafeMathInt` is never used in `SafeMathInt`. ```solidity=408 int256 private constant MAX_INT256 = ~(int256(1) << 255); ``` ```solidity=406 library SafeMathInt { ```
The linked functions are equivalent to the compiler-generated getter functions for the respective variables.
| Address | Chain | Source code |
|---|---|---|
| 0x7d18…2cc40x7d18f3fe6e638fad0adacc5db1a47f871a2c2cc4 | Chain: BNB Chain | Source code: Verified source |
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething 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