LfgSwap Ⅱ

CertiKFiles named in the report

CertiK reviewed LFGSwap (LfgSwap Ⅱ) on 27 Mar 2023: 10 findings, 0 critical; 6 marked fixed, 4 open.

No open critical findings
Open the reportOpen LFGSwap’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings10

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

SeverityOpenAcknowledgedFixed
Critical000
High201
Medium001
Low204
HighState Variables in Upgradeable Contracts are InitFixed

State variables initialized when declared are equivalent to initializing them inside the constructor. Therefore, initializing state variables when declared in an upgradeable contract has no actual effect since the constructor of an upgradeable contract is never called.

MediumLack of Storage Gap in Upgradeable ContractFixed

There is no storage gap preserved in the logic contract. Any logic contract that acts as a base contract that needs to be inherited by other upgradeable child should have a reasonable size of storage gap preserved for the new state variable introduced by the future upgrades.

Lowmint not start from initializeMintFixed

The state variable `lastRewardAt` is initialized in the function `updatePool()`. However, the `updatePool()` is not called in the function `initializeMint()`, which means the mint rewards do not start to accumulate. In the current logic, the first `updatePool()` will be called during the first time of deposit and the mint starts.

LowMissing Input ValidationFixed

`endAt` is the variable that checks if the IFO will be ended, so its value has to be later than the current blockstamp.

LowNot Record Total Transferred `rewardAmount`Fixed

```solidity=355 function _withdrawReferralReward(address user) private { uint256 rewardAmount = userReferralReward(user); if(rewardAmount > 0) { offeringToken.safeTransfer(user, rewardAmount); emit HarvestReferralReward(user, rewardAmount); } } function userReferralReward(address user) public view returns (uint256 rewardAmount) { uint256 point = referralPoint[user]; if(point > 0 && totalRewardPoint > 0 ) { //expect data uint256 offering = totalRewardOffered; rewardAmount = point.mul(offering).div(totalRewardPoint); } } ``` In the above function `_withdrawReferralReward()`, the total number of transferred rewards is not recorded and tracked. Since both `totalRewardPoint` and `totalRewardOffered` may be changed, the number of `rewardAmount` would be also impacted and therefore the total number of transferred `rewardAmount` would be potentially messed up.

LowUnprotected InitializerFixed

One or more logic contracts do not protect their initializers. An attacker can call the initializer and assume ownership of the logic contract, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contract. ```solidity=18 abstract contract IFOInitializableMix is ReentrancyGuardUpgradeable, OwnableUpgradeable { ``` - `IFOInitializableMix` is an upgradeable contract that does not protect its initializer. ```solidity=127 function initialize( ``` - `initialize` is an unprotected initializer function.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (1)

  • contracts/ido/IFOInitializableMix.sol

Part of LFGSwap’s security record

LFGSwap
Audits2 audits by 1 firmLast audit Mar 2023, by CertiK.
Critical findingsNo open critical findingsAcross 2 reports.
Open LFGSwap’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

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