Labrado - Audit

CertiKFiles named in the report

CertiK reviewed Labrado (Labrado - Audit) on 17 Oct 2022: 11 findings, 1 critical; 4 marked fixed, 1 acknowledged, 6 open.

1 critical finding, fixed
Open the reportOpen Labrado’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical001
High010
Medium000
Low603
CriticalLack of Access ControlFixed

The function `burn()` is used to burn the NFT of the given `tokenId`. However, the function `burn()` lacks access control and there is also no access check in the invoked function `_burn()` in OpenZeppelin's contract `ERC721`. ```solidity //OpenZeppelin's contract ERC721.sol function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } ``` As a result, anyone can call the function `burn()` to burn others' NFT. Reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/8d908fe2c20503b05f888dd9f702e3fa6fa65840/contracts/token/ERC721/ERC721.sol#L321

LowDivide by ZeroFixed

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

LowIncorrect use of variable `feeSwap`Fixed

According to the codes in the project, the fee used in the contract is calculated by the variable `feeSwap`. However, in the function `computeProfitMaximizingTrade`, 0.3% is used directly instead of calculated by the variable `feeSwap`.

LowMissing Error MessagesFixed

The **require** can be used to check for conditions and throw an exception if the condition is not met. It is better to provide a string message containing details about the error that will be passed back to the caller.

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

  • contracts/Excalibur.sol
  • contracts/DEX/swap-core/LabradoFactory.sol
  • contracts/DEX/swap-core/interfaces/ILabradoCallee.sol
  • contracts/DEX/periphery/libraries/BitMath.sol
  • contracts/DEX/periphery/libraries/LabradoLiquidityMathLibrary.sol
  • contracts/LabradoOperator.sol
  • contracts/DEX/swap-core/interfaces/ILabradoLP.sol
  • contracts/DEX/periphery/interfaces/ILabradoRouter02.sol
  • contracts/DEX/swap-core/interfaces/ILabradoPair.sol
  • contracts/DEX/periphery/LabradoRouter02.sol
  • contracts/DEX/periphery/libraries/Babylonian.sol
  • contracts/DEX/periphery/libraries/SafeMath.sol
  • contracts/DEX/periphery/interfaces/ILabradoRouter01.sol
  • contracts/DEX/swap-core/libraries/Math.sol
  • contracts/DEX/swap-core/libraries/UQ112x112.sol
  • contracts/LabradoToken.sol
  • contracts/DEX/periphery/interfaces/IERC20.sol
  • contracts/DEX/periphery/libraries/LabradoOracleLibrary.sol
  • contracts/DEX/swap-core/LabradoPair.sol
  • contracts/DEX/periphery/libraries/LabradoLibrary.sol
  • contracts/DEX/swap-core/libraries/SafeMath.sol
  • contracts/LabradoBaseNFT.sol
  • contracts/DEX/periphery/libraries/FixedPoint.sol
  • contracts/DEX/periphery/libraries/TransferHelper.sol
  • contracts/DEX/periphery/interfaces/IWETH.sol
  • contracts/DEX/swap-core/interfaces/ILabradoFactory.sol
  • contracts/DEX/swap-core/interfaces/IERC20.sol
  • contracts/DEX/periphery/libraries/FullMath.sol
  • contracts/DEX/swap-core/LabradoLP.sol

Part of Labrado’s security record

Labrado
Audits1 audit by 1 firmLast audit Oct 2022, by CertiK.
Critical findingsNo open critical findingsIn that report, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open Labrado’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