Ecotrader

QuillAuditsFiles named in the report

Audit · firm’s term: audit report

QuillAudits reviewed Ecotrader on 9 Apr 2024: 21 findings, 0 critical; 13 marked fixed, 8 open.

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

Report hosted on quillaudits.com.

Trustblock does not review code.

Findings21

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium007
Low806
LowFloating pragmaOpen

InvestmentToken does not use fixed solidity versions. The contract is using unfixed pragma (^0.8.0), Contract should be deployed with the same compiler version and flags that they have been tested thoroughly. Using floating pragma does not ensure that the contracts will be deployed with the same version. The most recent compiler version may get selected while deploying a contract which has a higher chance of having bugs in it.

LowIncorrect event argumentOpen

setAdmin2() function emits the AdminUpdated() event but for the second isAdmin1 parameter it passes argument as false while setting the _admin2 address as a new admin.

LowRemove redundant logicOpen

Currently _withdraw() contains logic to handle (token == address(this)) in if{}. Because the withdrawMintedTokens() is removed, The redundant code needs to be removed from _withdraw().

LowRemove redundant require check in _withdraw()Open

Currently _withdraw() is getting used in withdrawUSDC() and withdrawWeth() , in these two functions its checking that the amount that admin is trying to withdraw is less than or equal to what this contract address holds, the similar thing is getting checked in _withdraw() on L256. This redundant check can be removed.

LowThe contract has no start and end time to invest.Open

Currently, users can invest directly after the contract gets deployed. There’s no start and end period for calling invest().

LowThe contract has two pausing mechanismOpen

This should be noted that the contract has two pausing mechanisms.The pauseInvestment() and unpauseInvestment() functions set the value for investmentPaused. And pause() and unpause() which calls inherited _pause() and _unpause() from the Pausable contract respectively. whenNotPaused() modifier from the inherited functionality is getting used for the invest() function and investmentPaused value is getting used for the invest() function on the L102.

LowThe maximum investment limit can be trickedOpen

The maximum investment limit check on the L119 can be tricked by users by using multiple addresses by one user to invest more amount than the maximumInvestment limit.The issue doesn’t create any direct security risk and is getting highlighted only for providing more information.

LowUsers can claim for elapsed months without waiting if already investedOpen

Users would be able to claim some percentage of the amount for the elapsed month directly after investing.This is because in the _calculateClaimableTokens() function, the claimablePercentage gets calculated with monthsPassed (already elapsed time) let’s say that is 19 months already. So now when the user invests again after 19 months the claimableTokens will be calculated according to the elapsed time. So the user can claim the amount for 19 months without waiting for 19 months. Additionally, the user can perform this action in a way where the already invested user will invest after 19 month and after 1 month ( when 20 months will complete) will take 100 percent claim amount. In another case, an already invested user can invest and claim both after 20 months have elapsed, so in this case user would be able to directly claim the amount without waiting. Our recommendation is to consider checking that it matches the business logic.

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 (4)

  • openzeppelin/contracts/security/Pausable.sol
  • openzeppelin/contracts/security/ReentrancyGuard.sol
  • openzeppelin/contracts/utils/ReentrancyGuard.sol
  • openzeppelin/contracts/utils/Pausable.sol

Part of Ecotrader’s security record

Ecotrader
Audits1 audit by 1 firmLast audit Apr 2024, by QuillAudits.
Critical findingsNo open critical findingsIn 1 report.
Open Ecotrader’s security record

Security firm

QuillAudits

350 projects reviewed · 459 reports · latest Apr 2025

See QuillAudits’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