CertiK reviewed MAP Protocol on 5 Jan 2023: 73 findings, 4 critical; 67 marked fixed, 3 acknowledged, 3 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 4 |
| High | 0 | 3 | 4 |
| Medium | 0 | 0 | 5 |
| Low | 3 | 0 | 54 |
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.
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.
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.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (48)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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