Map Protocol

CertiKFiles named in the report

CertiK reviewed MAP Protocol on 5 Jan 2023: 73 findings, 4 critical; 67 marked fixed, 3 acknowledged, 3 open.

4 critical findings, fixed
Open the reportOpen MAP Protocol’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings73

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

SeverityOpenAcknowledgedFixed
Critical004
High034
Medium005
Low3054
LowIncompatibility with Deflationary TokensOpen

When transferring standard ERC20 deflationary tokens, the input amount may not be equal to the received amount due to the charged transaction fee. As a result, an inconsistency in the amount will occur and the transaction may fail due to the validation checks. For example, if a user sends 100 deflationary tokens (with a 10% transaction fee) to the target contract, only 90 tokens actually arrived in the contract.

LowInefficient Usage of Function `burn()`Open

**mcs/evm/contracts/MAPCrossChainServiceRelay.sol** ```solidity function _transferInOtherChain(transferOutEvent memory outEvent, uint256 outAmount, bytes memory toChainToken) internal checkOrder(outEvent.order_id) nonReentrant whenNotPaused { //... uint256 outMap = getToChainAmount(mapToken, outEvent.to_chain, selfChainId, outAmount); uint256 feeMap = getChainFee(outEvent.to_chain, mapTokenAddress, outMap); uint256 fee = getToChainAmount(mapToken, selfChainId, outEvent.to_chain, feeMap); outAmount = outAmount.sub(fee); if (checkAuthToken(mapTokenAddress)) { IMAPToken(mapTokenAddress).mint(address(this), outMap); IMAPToken(mapTokenAddress).burn(outMap.sub(feeMap)); } //... } ``` In the function `_transferInOtherChain()`, if `mapTokenAddress` is an `AuthToken`, the function `mint()` of `IMAPToken` will be called first to increase the balance of the contract, followed by the function `burn()` to decrease the balance of the contract. If it only mints the difference in the number of tokens to the contract, the `burn()` function could be removed.

LowNon-standard RLP FormattingOpen

There is the risk that problems will arise because of RLP encoding compatibility issues. Recursive Length Prefix (RLP) serialization is used extensively in Ethereum's execution clients. RLP standardizes the transfer of data between nodes in a space-efficient format. The purpose of RLP is to encode arbitrarily nested arrays of binary data. RLP is the primary encoding method used to serialize objects in Ethereum's execution layer. The main purpose of RLP is to encode structures. The current RLP encoder and decoder are not in compliance with Ethereum RLP guidelines (https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp#definition) and implementations.

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

  • mcs/evm/contracts/utils/TransparentUpgradeableProxy.sol
  • mapclients/eth/contracts/lib/MPT.sol
  • mcs/evm/contracts/vault/VERC20.sol
  • lightclients/near/contracts/lib/Ed25519Verify.sol
  • mapclients/eth/contracts/interface/ILightNodePoint.sol
  • mcs/evm/contracts/interface/IFeeCenter.sol
  • mapclients/eth/contracts/interface/ILightNode.sol
  • mcs/evm/contracts/interface/ILightClientManager.sol
  • mcs/evm/contracts/MapCrossChainService.sol
  • lightclients/near/contracts/LightNodeProxy.sol
  • mcs/evm/contracts/interface/IVault.sol
  • lightclients/near/contracts/lib/ProofDecoder.sol
  • mapclients/eth/contracts/lib/MPTTest.sol
  • mcs/evm/contracts/utils/TransferHelper.sol
  • mcs/evm/contracts/interface/IMCSRelay.sol
  • lightclients/near/contracts/LightNode.sol
  • mapclients/eth/contracts/interface/IVerifyTool.sol
  • mcs/evm/contracts/interface/IRelayer.sol
  • mapclients/eth/contracts/bls/BGLS.sol
  • mcs/evm/contracts/interface/IWToken.sol
  • lightclients/near/contracts/lib/RLPEncode.sol
  • mcs/evm/contracts/interface/ILightNode.sol
  • mcs/evm/contracts/utils/Role.sol
  • mapclients/eth/contracts/bls/BlsCode.sol
  • mcs/evm/contracts/TokenRegister.sol
  • mcs/evm/contracts/interface/ITokenRegister.sol
  • mapclients/eth/contracts/interface/IWeightedMultiSig.sol
  • mcs/evm/contracts/MAPCrossChainServiceRelay.sol
  • mcs/evm/contracts/token/StandardToken.sol
  • mapclients/eth/contracts/LightNode.sol
  • mapclients/eth/contracts/lib/RLPReader.sol
  • mapclients/eth/contracts/interface/IBLSPoint.sol
  • lightclients/near/contracts/lib/NearDecoder.sol
  • mcs/evm/contracts/utils/ProxyAdmin.sol
  • mcs/evm/contracts/interface/IMAPToken.sol
  • mcs/evm/contracts/vault/MAPVaultToken.sol
  • lightclients/near/contracts/interface/ILightNode.sol
  • mcs/evm/contracts/interface/ILogs.sol
  • mcs/evm/contracts/interface/IMCSReceiveData.sol
  • mapclients/eth/contracts/VerifyTool.sol
  • mapclients/eth/contracts/LightNodeProxy.sol
  • mcs/evm/contracts/FeeCenter.sol
  • mcs/evm/contracts/interface/IFeeNFT.sol
  • mapclients/eth/contracts/lib/RLPEncode.sol
  • mcs/evm/contracts/utils/RLPReader.sol
  • lightclients/near/contracts/lib/Utils.sol
  • mcs/evm/contracts/interface/IMCS.sol
  • lightclients/near/contracts/lib/Borsh.sol

Part of MAP Protocol’s security record

MAP Protocol
Audits2 audits by 1 firmLast audit Jan 2023, by CertiK.
Critical findingsNo open critical findingsAcross the 2 reports, 5 critical findings were reported. Each is marked fixed by the firm that reported it.
Open MAP Protocol’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