Quantstamp reviewed MCDEX Arbitrum Integration (MCDEX) on 11 Apr 2021: 19 findings, 0 critical; 11 marked fixed, 6 acknowledged, 2 open.
Report hosted on certificate.quantstamp.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 1 |
| Medium | 0 | 1 | 2 |
| Low | 2 | 5 | 8 |
The function `callFunction`, can be called by any user to call any external contracts. This enables a user to have privilege of the `Broker.sol` contract and could be used as a tool to conduct a complex attack.
Within the function `validatePrice`, the trade price can be set to zero. This could lead to devastating results.
The sequence of the arguments in `isAuthorized` for calling `IAccessControl.isGranted` on `L814` is incorrect. The sequence of `grantee` and `grantor` is switched.
As in the title, `rebalance` does not have a return value; this may lead to undesirable results or wasted computation.
Within the function `setLiquidityPoolOwnership`, there is a permission check so that it can only be called by a liquidity pool instance. However, there seems to be a difference in being the "owner" of a liquidity pool vs the "operator" of a liquidity pool. The operator privilege is transfered via `transferOperator` and `transferOperator`, but this does not automatically transfer liquidity pool ownership.
There is an error in `L759-761` of `validateBaseParameters`: `INDEX_OPEN_SLIPPAGE_FACTOR` is used instead of `INDEX_MAINTENANCE_MARGIN_RATE` to validate the liquidation penalty parameter. Having said that, both constants are set to 1 so the result is the same.
There is a difference in the representation of `int256 deltaPosition` between `liquidateByAMM` and `liquidateByTrader`, which may cause confusion in the future. Specifically, `deltaPosition` in `liquidateByAMM` represents the position to be taken on by the AMM, which is the trader’s current position. In contrast, `deltaPosition` represents the change in the trader’s position in `liquidateByTrader`.
`OperatorCheckIn` event should contain `address indexed operator` as an argument.
Several functions do not validate that input arguments are values are trivially incorrect, such as addresses possibly being zero. The following list may be incomplete. 1. `Governance.sol`: `transferOperator` does not check that input address is non-zero. 0. `Broker.sol`: `_transfer`, `callFunction` do not check that input addresses are non-zero. 0. `PoolCreator.sol`: Constructor, `_createLiquidityPoolWith` do not check that addresses are non-zero. 0. `SymbolService.sol`: `isWhitelistedFactory` does not check if input address is non-zero.
`SetOracle` event from `module/PerpetualModule.sol` is not included.
In `L759-762`: the revert message is inconsistent with the revert condition.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (74)
236 projects reviewed · 332 reports · latest Oct 2026
See Quantstamp’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