LFGSwap audit reports

LFGSwap has 2 public audit reports from CertiK; the latest is CertiK, 27 Mar 2023; no critical findings reported. It also holds 1 deployed contract on 1 chain.

Critical and high findings
No open critical findings; 5 high open 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.

Audits2

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
LfgSwap ⅡSecurity firm: CertiKDate: Scope: Files listedNone openFindings: 3 high · 1 medium · 6 low
6 fixed · 4 open
skynet.certik.com ↗
LFGswapSecurity firm: CertiKDate: Scope: Files listedNone openFindings: 3 high · 15 low
18 open
skynet.certik.com ↗

Findings28

28 findings in 2 reports: 6 fixed, 22 open.

SeverityOpenFixed
Critical00
High51
Medium01
Low174

Not fixed (22)

HighOpenCentralization Risk in function finalWithdrawLfgSwap Ⅱ · CertiK · 27 Mar 2023

The owner can withdraw users' raiseToken via the function `finalWithdraw()` without the consensus of the community. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and all the users will suffer the loss of their investment funds.

Report ↗
HighOpenLack of reasonable boundariesLfgSwap Ⅱ · CertiK · 27 Mar 2023

In the function `calculateOfferingAndRefundingAmountsPool()`, the `userRefundingAmount` will deduct the user's share of raisingAmountPool. We would like to confirm whether this implementation aligns with the original project design. Meanwhile, the `raisingAmountPool` is set by the owner without any reasonable upper boundaries.

Report ↗
HighOpenCentralization Risks in LfgSwapFactory.solLFGswap · CertiK · 21 Oct 2022

In the contract `LfgSwapFactory` the role `feeToSetter` has authority over the functions shown in the diagram below. Any compromise to the `feeToSetter` account may allow the hacker to take advantage of this authority and set `feeTo`. ![](https://accelerator-tasks-prod.acc.corp.certik.com/5adfd784746b4b2e82b19c4277593033/diagrams/centralization_LfgSwapFactory-LfgSwapFactory-feeToSetter.svg)

Report ↗
HighOpenCentralization Risks in LfgToken.solLFGswap · CertiK · 21 Oct 2022

In the contract `LfgToken` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and add or delete `Minter` role. ![](https://accelerator-tasks-prod.acc.corp.certik.com/5adfd784746b4b2e82b19c4277593033/diagrams/centralization_LfgToken-LfgToken-_owner.svg) In the contract `LfgToken`, the role `_minters` has authority over the `mint()` function. Any compromise to the `_minters` account may allow a hacker to take advantage of this authority and mint new tokens.

Report ↗
HighOpenInitial Token DistributionLFGswap · CertiK · 21 Oct 2022

Tokens are sent to `msg.sender` when deploying the contract. This could be a centralization risk as the `msg.sender` can distribute tokens without obtaining the consensus of the community.

Report ↗
LowOpenInaccurate CommentLfgSwap Ⅱ · CertiK · 27 Mar 2023

In function `calculateOfferingAndRefundingAmountsPool()`, the comment for the following `userOfferingAmount` calculation is inaccurate for the scenario of when `raisingAmountPool` <= `totalAmountStake` ```solidity=628 // userInfo[_user] / (raisingAmount / offeringAmount) userOfferingAmount = userInfo[_user].amount.mul(offeringAmountPool).div( raisingAmountPool ); ```

Report ↗
LowOpenTo Be Implemented FunctionLfgSwap Ⅱ · CertiK · 27 Mar 2023

`beforeHarvest()` function is not implemented in the `IFOInitializableMix.sol` contract

Report ↗
LowOpenCommented Out CodeLFGswap · CertiK · 21 Oct 2022

Commented out code is redundant.

Report ↗
LowOpenDivide by ZeroLFGswap · CertiK · 21 Oct 2022

The call to `burn()` function will fail if the value of `_totalSupply` is 0.

Report ↗
LowOpenFunction Should Be Declared ExternalLFGswap · CertiK · 21 Oct 2022

The functions which are never called internally within the contract should have external visibility for gas optimization.

Report ↗
Show all 22
LowOpenIncorrect CommentLFGswap · CertiK · 21 Oct 2022

Based on the coefficient `mul(2)` and based on the formula at 2.4 of https://uniswap.org/whitepaper.pdf, the correct fee is equivalent to 1/3th.

Report ↗
LowOpenMissing Input ValidationLFGswap · CertiK · 21 Oct 2022

In function `_burn()`, `_approve()` and `_transfer()`, addresses should be checked before assigning to make sure they are not zero addresses.

Report ↗
LowOpenMissing Zero Address ValidationLFGswap · CertiK · 21 Oct 2022

Addresses should be checked before assignment or external call to make sure they are not zero addresses.

Report ↗
LowOpenPotential Integer UnderflowLFGswap · CertiK · 21 Oct 2022

In the function `LfgToken.getMinter()`, the input `_index` is checked to ensure the index is valid. However, it is possible that `getMinterLength() == 0` which might lead to integer underflow in the calculation: ```solidity=43 require(_index <= getMinterLength() - 1, "JfToken: index out of bounds"); ```

Report ↗
LowOpenRedundant CheckLFGswap · CertiK · 21 Oct 2022

In the `swap` function, the `require(amount0Out > 0 || amount1Out > 0, 'LfgSwap: INSUFFICIENT_OUTPUT_AMOUNT');` will always be satisfied due to the condition `if( amount0Out > 0 || amount1Out > 0 )`.

Report ↗
LowOpenRedundant Interfaces `IMigrator` and `ISwapMiningLFGswap · CertiK · 21 Oct 2022

The `IMigrator` and `ISwapMining` interfaces are not used by other code.

Report ↗
LowOpenTypo in File Name `SafaMath.sol`LFGswap · CertiK · 21 Oct 2022

There is a typo in the file name `SafaMath.sol`.

Report ↗
LowOpenTypos in `require()` Check Error MessagesLFGswap · CertiK · 21 Oct 2022

There is a typos in `require` messages: - `UniswapV2Library` expected `LfgSwapLibrary`; - `UniswapV2` expected `LfgSwap`. - `JfToken` expected `LfgToken`

Report ↗
LowOpenUnused Import FileLFGswap · CertiK · 21 Oct 2022

The following import file is not used in the audit files: ````Solidity=3 import "@openzeppelin/contracts/access/Ownable.sol"; ````

Report ↗
LowOpenUnused Library `FixedPoint`LFGswap · CertiK · 21 Oct 2022

The library `FixedPoint` is never used within the project and thus can be removed.

Report ↗
LowOpenUser-Defined GettersLFGswap · CertiK · 21 Oct 2022

The linked functions are equivalent to the compiler-generated getter functions for the respective variables.

Report ↗
LowOpenVariables That Could Be Declared as ImmutableLFGswap · CertiK · 21 Oct 2022

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.

Report ↗

Contracts1

AddressChainSource code
0xf7a0b80681ec935d6dd9f3af9826e68b99897d6dChain: ArbitrumSource code: Verified source

All 1 address and the files the reports name

LFGSwap: questions

Is LFGSwap audited?

Trustblock holds 2 public audit reports for LFGSwap, dated 21 Oct 2022 to 27 Mar 2023. The latest is by CertiK (“LfgSwap Ⅱ”).

Who audited LFGSwap?

CertiK wrote the 2 reports Trustblock holds for LFGSwap.

Are there open findings in LFGSwap’s audits?

22 findings are still open or acknowledged in the firms’ reports: 5 high, 17 low (all open). No critical finding is reported. Statuses are the security firms’ own.

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