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
HighCentralization Risks in MapClients ModuleAcknowledged

The following issues highlight the various privileged roles that have significant control over operations and transfer of funds. #### LightNode.sol *Owner* In the contract `LightNode.sol` (mapclients/eth/contracts/LightNode.sol) the role `_owner` has authority over the function: - `function changeAdmin(address _admin) public` Any compromise to the `_owner` account may allow the hacker to take advantage of this authority to update the `_admin` role used for contract upgrades. *Admin* `LightNode.sol` is an upgradeable contract where the `_admin` role can upgrade the contract without the community's consent. If an attacker compromises the account, he/she can change the implementation of the contract and drain tokens from the contract.

HighCentralization Risks in MCS/MOS ModuleAcknowledged

The following issues highlight the various privileged roles that have significant control over operations and transfer of funds. #### MapVaultToken.sol In the contract `MAPVaultToken`, the role `manager` has authority over the following function: - `function stakingTo(uint amount, address to)` #### TokenRegister.sol In the contract `TokenRegister`, the role `manager` has authority over the following functions: - `function regToken(uint256 sourceChain, bytes memory sourceMapToken, bytes memory mapToken) external` - `function regTokenSource(bytes memory sourceToken, bytes memory sourceMapToken) external` Any compromise to the `manager` account may allow a hacker to take advantage of this authority to: - Register an arbitrary token relationship. - Overwrite existing token relation with malicious data. #### MAPCrossChainServiceRelay.sol *wToken* In the contract `MAPCrossChainServiceRelay` the role `wToken` has authority over the function: - `function receive() external payable` Any compromise to the `wToken` contract may allow the hacker to take advantage of this authority and influence transfers into `MAPCrossChainServiceRelay`. *Manager* In the contract `MapCrossChainService` the role `manager` has authority over the function: - `function setVaultBalance(uint256 tochain, address token, uint256 amount) external` - `function setTokenRegister(address _register) external` - `function setLightClientManager(address _managerAddress) external` - `function setBridageAddress(uint256 _chainId, bytes memory _addr) external` - `function setIdTable(uint256 _chainId, uint256 _id) external` - `function setNearHash(bytes32 _hash) external` - `function setPause() external` - `function setUnpause() external` - `function setTokenOtherChainDecimals(bytes memory selfToken, uint256 chainId, uint256 decimals) external` - `function setFeeCenter(address fee) external` - `function addAuthToken(address[] memory token) external` - `function removeAuthToken(address[] memory token) external` - `function withdraw(address token, address payable receiver, uint256 amount) public` Any compromise to the `manager` account may allow the hacker to take advantage of this authority to: - Update token vault balances. - Pause/unpause cross chain service. - Set and update global registers including the `tokenRegister`, `lightClientManager`, `bridgeAddress`, `ChainIdTable`, `nearTransferOut`, `tokenOtherChainDecimals`, `feeCenter`, & `authToken`. - Withdraw tokens to a predetermined wallet address. #### MAPCrossChainService.sol In the contract `MapCrossChainService` the role `manager` has authority over the function: - `function setPause() external` - `function setUnpause() external` - `function addAuthToken(address[] memory token) external` - `function removeAuthToken(address[] memory token) external` - `function setBridge(address _bridge, uint256 _num) public` - `function setCanBridgeToken(address token, uint chainId, bool canBridge) public` - `function withdraw(address token, address payable receiver, uint256 amount) public` Any compromise to the `manager` account may allow the hacker to take advantage of this authority to: - Pause/unpause cross chain service. - Control register of `authToken`. - Setting and controlling access to token bridges. - Withdraw tokens to a predetermined wallet address. #### FeeCenter.sol In the contract `FeeCenter`, the role `manager` has authority over the following functions: - `function setChainTokenGasFee(uint to, address token, uint lowest, uint highest,uint proportion) external` - `function setTokenVault(address token,address tVault) external` - `function setDistributeRate(uint id, address to, uint rate) external` Any compromise to the `manager` account may allow a hacker to take advantage of this authority to: - Update the token fee in different chains. - Set the vault address of a token. - Set distribute rate. **[Update, 11/29/2022]**: In the commit [`057e54b2a633f82717e918b9ee44c7da1ea02b1c`](https://github.com/mapprotocol/map-contracts/tree/057e54b2a633f82717e918b9ee44c7da1ea02b1c), there are other functions introduced that the role `manager` has authority over. #### MapVaultToken.sol In the contract `MAPVaultToken`, the role `manager` has authority over the following function: - `function stakingTo(uint amount, address to) external` - `function addFee(uint amount) external` - `function withdraw(uint amount, address to) external` Any compromise to the `manager` account may allow a hacker to take advantage of this authority to stake correspond tokens, add correspond tokens as fees and withdraw correspond tokens to any account with Vtoken.

HighCentralization Risks in Near LightClients ModuleAcknowledged

The following issues highlight the various privileged roles that have significant control over operations and transfer of funds. #### LightNode.sol *Owner* In the contract `LightNode.sol` (lightclients/near/contracts/LightNode.sol) the role `_owner` has authority over the functions: - `function trigglePause(bool flag) public` - `function initWithValidators(bytes memory data)` - `function initWithBlock(bytes memory data)` - `function changeAdmin(address _admin) public` Any compromise to the `_owner` account may allow the hacker to take advantage of this authority to set administrative accounts, validators, and proof producers. *Admin* The `_admin` role is able to upgrade the contract without the community's consent. If an attacker compromises the account, he/she can change the implementation of the contract and drain tokens from the contract.

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