Elvish Magic audit reports

Elvish Magic has 4 public audit reports from SolidProof and CertiK; the latest is CertiK, 12 Sep 2023; no critical findings reported. It also holds 2 deployed contracts on 1 chain.

Critical and high findings
No open critical findings; 2 high acknowledged in the firms’ reports
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.

Audits4

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
ElvishmagicSecurity firm: CertiKDate: Scope: Files listedNone openFindings: 2 high · 6 low
2 acknowledged · 6 open
skynet.certik.com ↗
Elvish Magic-Security firm: SolidProofDate: Scope: Not recorded; see the reportNone openFindings: 5 low
5 open
IPFS ↗
ElvishmagicSecurity firm: SolidProofDate: Scope: 1 address on BNB ChainNone openFindings: 4 low
4 open
IPFS ↗
Elvish MagicSecurity firm: SolidProofDate: Scope: 1 address on BNB ChainNone openFindings: 2 low
2 open
IPFS ↗

Open findings across every firm19

Statuses are the security firms’ own

19 findings are still open or acknowledged in the firms’ reports: 2 high, 17 low (17 open, 2 acknowledged).

High
2
Low
17
  • High Acknowledged

    Centralization Related Risks

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • High Acknowledged

    Initial Token Distribution

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Hardcoded addresses

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Potential Sandwich Attack / Flashloan Attacks

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Third-Party Dependency Usage

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Unchecked ERC-20 `transfer()`/`transferFrom()` Ca

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Usage of `transfer`/`send` for Sending Native Tok

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    Variables That Could Be Declared as Immutable

    Elvishmagic · CertiK · 12 Sep 2023 · Report ↗

  • Low Open

    #1: Floating pragma

    Elvish Magic- · SolidProof · 15 Mar 2023 · Report ↗

  • Low Open

    #1: Staking issue

    Elvish Magic- · SolidProof · 15 Mar 2023 · Report ↗

All 19 open and acknowledged findings

Findings21

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

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium000
Low1700
LowHardcoded addressesElvishmagic · CertiK · 12 Sep 2023Open

The `ElvishMagic2` contracts have various address fields with hardcoded addresses. This design is risky as it prevents the dynamic assignment of addresses and uses a predefined address, which may not always be desirable or secure. This needs to be handled especially carefully in this case since many of the addresses refer to testnet addresses.

Open the report
LowPotential Sandwich Attack / Flashloan AttacksElvishmagic · CertiK · 12 Sep 2023Open

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: - `swap()` ```solidity=555 uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp); ``` Furthermore, the attacker could also take advatange of this issue to launch a flashloan attack. For example, supposed currently, the contract's balance is close to threshold for a `swap()`. - The attacker flashloaned EMAGIC tokens and swap for WETH - The attacker triggers the swap by transferring some EMAGIC tokens - The attacker swap back WETH for more EMAGIC tokens.

Open the report
LowThird-Party Dependency UsageElvishmagic · CertiK · 12 Sep 2023Open

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 assumes 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=377 IUniswapV2Router02 public uniswapV2Router; ``` - The contract `ElvishMagic2` interacts with third party contract with `IUniswapV2Router02` interface via `uniswapV2Router`.

Open the report
LowUnchecked ERC-20 `transfer()`/`transferFrom()` CaElvishmagic · CertiK · 12 Sep 2023Open

The return values of the `transfer()` and `transferFrom()` calls in the smart contract are not checked. Some ERC-20 tokens' transfer functions return no values, while others return a bool value, they should be handled with care. If a function returns `false` instead of reverting upon failure, an unchecked failed transfer could be mistakenly considered successful in the contract. ```solidity=450 ERC20token.transfer(msg.sender, balance); ```

Open the report
LowUsage of `transfer`/`send` for Sending Native TokElvishmagic · CertiK · 12 Sep 2023Open

It is not recommended to use Solidity's `transfer()` and `send()` functions for transferring native tokens, since some contracts may not be able to receive the funds. Those functions forward only a fixed amount of gas (2300 specifically) and the receiving contracts may run out of gas before finishing the transfer. Also, EVM instructions' gas costs may increase in the future. Thus, some contracts that can receive now may stop working in the future due to the gas limitation. ```solidity=562 bool success = payable(marketingWallet).send(newBalance); ``` - `ElvishMagic2.swap` uses `send()`.

Open the report
LowVariables That Could Be Declared as ImmutableElvishmagic · CertiK · 12 Sep 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
Low#1: Floating pragmaElvish Magic- · SolidProof · 15 Mar 2023Open

The report gives no description here.

Open the report
Low#1: Staking issueElvish Magic- · SolidProof · 15 Mar 2023Open

The report gives no description here.

Open the report
Low#2: Unused ERC1155 Receiver contract and unimplemented functionElvish Magic- · SolidProof · 15 Mar 2023Open

The report gives no description here.

Open the report
Low#3: Snapshot of stakingElvish Magic- · SolidProof · 15 Mar 2023Open

The report gives no description here.

Open the report
Show 7 more
Low#4: Penalty not usedElvish Magic- · SolidProof · 15 Mar 2023Open

The report gives no description here.

Open the report
Low#1: Contract doesn’t import npm packages from source (like OpenZeppelin etc.)Elvish Magic · SolidProof · 16 Jan 2023Open

The report gives no description here.

Open the report
Low#3: Directly setElvish Magic · SolidProof · 16 Jan 2023Open

The report gives no description here.

Open the report
LowUntitled findingElvishmagic · SolidProof · 16 Jan 2023Open

No description was provided.

Open the report
LowUntitled findingElvishmagic · SolidProof · 16 Jan 2023Open

No description was provided.

Open the report
LowUntitled findingElvishmagic · SolidProof · 16 Jan 2023Open

No description was provided.

Open the report
LowUntitled findingElvishmagic · SolidProof · 16 Jan 2023Open

No description was provided.

Open the report

Contracts2

AddressChainSource code
0xaf55e53cfa099a59aa30554fe106f33c47564a25Chain: BNB ChainSource code: Verified source
0x947fe50c2ae24d5ff56f0e4e7c9043eb6ee1abe7Chain: BNB ChainSource code: Verified source

All 2 addresses and the files the reports name

Elvish Magic: questions

Is Elvish Magic audited?

Trustblock holds 4 public audit reports for Elvish Magic, dated 16 Jan 2023 to 12 Sep 2023. The latest is by CertiK (“Elvishmagic”).

Who audited Elvish Magic?

2 security firms wrote the reports Trustblock holds for Elvish Magic: SolidProof and CertiK.

Are there open findings in Elvish Magic’s audits?

19 findings are still open or acknowledged in the firms’ reports: 2 high, 17 low (17 open, 2 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="elvishmagic"
></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