Matchain

QuillAuditsFiles named in the report

Audit · firm’s term: audit report

QuillAudits reviewed Matchain on 26 Aug 2024: 7 findings, 0 critical; none marked fixed.

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

Report hosted on quillaudits.com.

Trustblock does not review code.

Findings7

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

SeverityOpenAcknowledgedFixed
Critical000
High000
Medium300
Low400
MediumA malicious user can grief and DOS a user while he is trying to remove LiquidityOpen

The removeLiquidityWithPermit() and removeLiquidityETHWithPermit() use permit function to give approve to router contract for the LP tokens and removal of liquidity in the same transaction rather than approving the LP token manually from contract address.• User signs their LP tokens and provides the signature(v,r,s) to contract as part of approving token using permit. • When a user calls removeLiquidityWithPermit or removeLiquidityETHWithPermit function the malicious user see's the transaction in mempool and take the signature of user and calls the permit function himself before the user's transaction gets executed. • Since the signature provided by malicious user is correct the transaction get's successful and increases the nonce. • However, when user's transaction gets executed it would fail due to increase of nonce.

MediumDifferent solidity versions used may cause vulnerabilityOpen

The contract specifies multiple conflicting Solidity versions in its pragma statements. This is contradictory and will cause compilation errors, as a contract can only be compiled with one specific version of Solidity. Using different Solidity versions may introduce vulnerabilities.

MediumUsing payable.transfer might be problematicOpen

The usage of transfer so send msg.value is not recommended due to it’s strict dependency upon gas i.e. 2300 gas. If gas costs are subject to change, then smart contracts can’t depend on any particular gas costs. Moreover, the function might fail mid-execution is it requires more than 2300 gas.

LowInconsistent version specifiersOpen

You're using both strict (=) and caret (^) version specifiers. The caret allows any version from 0.4.18 up to, but not including, 0.5.0, which could lead to unexpected behavior if the contract is compiled with different minor versions.

LowLow test coverageOpen

Unit tests are used to ensure that the code functions as expected by passing in varying user input and setting up various parameters to test the boundaries of the protocol. There are no unit test cases associated with the codebase provided, hereby increasing the probability of bugs being present and reducing quality assurance.

LowProtocol's structure might be confusingOpen

Readability and Maintainability: Combining all interfaces and libraries into a single contract can make the contract difficult to read and maintain. It’s usually better to separate concerns by having distinct contracts for different functionalities.• Complexity: A single contract handling all aspects of a protocol can become overly complex, making it harder to debug and test individual components. • Gas Costs: Large contracts can be more expensive to deploy and interact with due to higher gas costs.

LowUse an outdated version of the solidityOpen

Versions 0.5.16 and especially 0.4.18 are quite old and lack important security features and optimizations present in newer versions. Using outdated compiler versions can lead to security vulnerabilities.

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

  • WBNB.sol
  • Router.sol
  • Factory.sol

Part of Matchain’s security record

Matchain
Audits1 audit by 1 firmLast audit Aug 2024, by QuillAudits.
Critical findingsNo open critical findingsIn 1 report.
Open Matchain’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