Valinity Audit

CertiKFiles named in the report

CertiK reviewed Valinity (Valinity Audit) on 7 Feb 2023: 9 findings, 0 critical; 4 marked fixed, 5 open.

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

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings9

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

SeverityOpenAcknowledgedFixed
Critical000
High401
Medium000
Low103
HighCentralization RisksOpen

In the contract `BEP20` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_BEP20-BEP20-_owner.svg) In the contract `MFCToken` the role `_adminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCToken-MFCToken-_adminAgents.svg) In the contract `MFCToken` the role `_backendAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCToken-MFCToken-_backendAgents.svg) In the contract `MFCToken` the role `_mfcExchangeCap` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCToken-MFCToken-_mfcExchangeCap.svg) In the contract `BUSDT` the role `_adminGovAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_BUSDT-BUSDT-_adminGovAgents.svg) In the contract `BUSDT` the role `_governanceAddress` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_BUSDT-BUSDT-_governanceAddress.svg) In the contract `BUSDT` the role `_mfcExchangeFloor` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_BUSDT-BUSDT-_mfcExchangeFloor.svg) In the contract `RegistrarMigrator` the role `_adminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_RegistrarMigrator-RegistrarMigrator-_adminAgents.svg) In the contract `Registrar` the role `_adminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_Registrar-Registrar-_adminAgents.svg) In the contract `MultiSig` the role `executor` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_Multisig-MultiSig-executor.svg) In the contract `Ownable` the role `_owner` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_Ownable-Ownable-_owner.svg) In the contract `AccessControl` the role `account` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_AccessControl-AccessControl-account.svg) In the contract `BackendAgent` the role `_backendAdminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_BackendAgent-BackendAgent-_backendAdminAgents.svg) In the contract `WithdrawAgent` the role `_withdrawAdminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_WithdrawAgent-WithdrawAgent-_withdrawAdminAgents.svg) In the contract `WithdrawAgent` the role `_withdrawAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_WithdrawAgent-WithdrawAgent-_withdrawAgents.svg) Any compromise to the privileged accounts may allow the hacker to take advantage of this authority and switch owners, withdraw tokens, and modify critical configurations of the contracts.

HighCentralization RisksOpen

In the contract `exchange/MFCExchange.sol`, `exchange/MFCExchangeFloor.sol`, `exchange/MFCExchangeCap.sol`, `governance/MFCGovernance.sol`, `MFCCollateralLoan.sol`, `MFCTradingLicense.sol`, `token/MFCToken.sol` and `treasury/BUSDT.sol`, the role `_registrar` has authority over the following functions: - updateAddresses() In the contract `lib/access/AccessControl.sol`, the role `adminRole` has authority over the following functions: - grantRole() - revokeRole() In the contract `token/MFCToken.sol`, the role `MINTER_ROLE` has authority over the following functions: - mint() - grantOwnerRole() - grantMinterRole() - grantWhitelisterRole() - revokeOwnerRole() - revokeMinterRole() - revokeWhitelisterRole() - whitelistUser() - whitelistUserBatch() - whitelistAgent() - revokeWhitelistedUser() - revokeWhitelistedAgent() Any compromise to the privileged accounts may allow the hacker to take advantage of this authority and switch owners, withdraw tokens, and modify critical configurations of the contracts.

HighCentralization RisksOpen

In the contract `MFCCollateralLoan` the role `_adminGovAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCCollateralLoan-MFCCollateralLoan-_adminGovAgents.svg) In the contract `MFCCollateralLoan` the role `_backendAdminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCCollateralLoan-MFCCollateralLoan-_backendAdminAgents.svg) In the contract `MFCCollateralLoan` the role `_backendAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCCollateralLoan-MFCCollateralLoan-_backendAgents.svg) In the contract `MFCCollateralLoan` the role `_deployer` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCCollateralLoan-MFCCollateralLoan-_deployer.svg) In the contract `MFCGovernance` the role `_adminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCGovernance-MFCGovernance-_adminAgents.svg) In the contract `MFCExchange` the role `_backendAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCExchange-MFCExchange-_backendAgents.svg) In the contract `MFCExchangeCap` the role `_adminGovAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCExchangeCap-MFCExchangeCap-_adminGovAgents.svg) In the contract `MFCExchangeCap` the role `_backendAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCExchangeCap-MFCExchangeCap-_backendAgents.svg) In the contract `MFCExchangeCap` the role `_governanceAddress` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCExchangeCap-MFCExchangeCap-_governanceAddress.svg) In the contract `MFCExchangeFloor` the role `_deployer` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/e588ec50856b4c999170c9a14689af50/diagrams/centralization_MFCExchangeFloor-MFCExchangeFloor-_deployer.svg) In the contract `MFCTradingLicense` the role `_adminAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48d3265ae16c4d9590ff1bdba3f272bc/diagrams/centralization_MFCTradingLicense-MFCTradingLicense-_adminAgents.svg) In the contract `MFCTradingLicense` the role `_adminGovAgents` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48d3265ae16c4d9590ff1bdba3f272bc/diagrams/centralization_MFCTradingLicense-MFCTradingLicense-_adminGovAgents.svg) In the contract `MFCTradingLicense` the role `_deployer` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48d3265ae16c4d9590ff1bdba3f272bc/diagrams/centralization_MFCTradingLicense-MFCTradingLicense-_deployer.svg) In the contract `MFCTradingLicense` the role `_governanceAddress` has authority over the functions shown in the diagram below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48d3265ae16c4d9590ff1bdba3f272bc/diagrams/centralization_MFCTradingLicense-MFCTradingLicense-_governanceAddress.svg) Any compromise to the privileged accounts may allow the hacker to take advantage of this authority and switch owners, withdraw tokens, and modify critical configurations of the contracts.

HighPotential Price Manipulation by Privilege RolesOpen

```solidity=115 function _getPrice() private view returns (uint256) { uint256 mfcCirculation = _mfc.getMfcCirculation(); uint256 busdBalance = _busdt.getBusdtValue(); if (busdBalance == 0) { return 0; } if (mfcCirculation > 0) { return MULTIPLIER * mfcCirculation / busdBalance; } else { return _initialPrice; } } ``` In contract `MFCExchangeFloor`, function `_getPrice()` returns the price of MFC that equals `MULTIPLIER * mfcCirculation / busdBalance` (when `mfcCirculation` > 0). Which means MFC is backed by BUSD in the treasury. So the following functions in contract `MFCToken` can be used to manipulate the price of MFC by changing `mfcCirculation`: - `setMfcCirculation()` - `airdropTokens()` The role `_adminAgents` can call `setMfcCirculation()` and set `_mfcCirculation` to any value. The role `_bankendAgents` can call `airdropTokens()` and mint tokens to addresses without increasing MFC's circulation by setting `updateCirculation` to false.

LowMissing Zero Address ValidationOpen

Addresses should be checked before assignment or external call to make sure they are not zero addresses. ```solidity=163 _busdComptrollerAddress = busdComptrollerAddress_; ``` - `busdComptrollerAddress_` is not zero-checked before being used. --- ```solidity=70 _busdAddress = busdAddress_; ``` - `busdAddress_` is not zero-checked before being used. --- ```solidity=71 _busdComptrollerAddress = busdComptrollerAddress_; ``` - `busdComptrollerAddress_` is not zero-checked before being used. --- ```solidity=56 _busdComptrollerAddress = busdComptrollerAddress_; ``` - `busdComptrollerAddress_` is not zero-checked before being used.

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

  • contracts/treasury/BUSDT.sol
  • contracts/MFCMembership.sol
  • contracts/lib/utils/introspection/IERC165.sol
  • contracts/lib/access/AccessControl.sol
  • contracts/lib/utils/Strings.sol
  • contracts/lib/utils/Context.sol
  • contracts/lib/access/IAccessControl.sol
  • contracts/Registrar.sol
  • contracts/governance/Governable.sol
  • contracts/MFCCollateralLoan.sol
  • contracts/RegistrarClient.sol
  • contracts/treasury/Treasury.sol
  • contracts/MFCTradingLicense.sol
  • contracts/lib/utils/Multisig.sol
  • contracts/token/MFCToken.sol
  • contracts/lib/utils/introspection/ERC165.sol
  • contracts/exchange/MFCExchangeCap.sol
  • contracts/access/AdminAgent.sol
  • contracts/access/AdminGovernanceAgent.sol
  • contracts/lib/token/BEP20/BEP20.sol
  • contracts/lib/token/BEP20/IBEP20.sol
  • contracts/exchange/MFCExchange.sol
  • contracts/governance/MFCGovernance.sol
  • contracts/access/WithdrawAgent.sol
  • contracts/lib/access/Ownable.sol
  • contracts/exchange/ExchangeCheck.sol
  • contracts/RegistrarMigrator.sol
  • contracts/lib/token/BEP20/MFCBEP20.sol
  • contracts/access/BackendAgent.sol
  • contracts/exchange/MFCExchangeFloor.sol

Part of Valinity’s security record

Valinity
Audits4 audits by 1 firmLast audit Oct 2023, by CertiK.
Critical findingsNo open critical findingsAcross 4 reports.
Open Valinity’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