Quantstamp reviewed Quadrata (Quadrata Lending) on 21 Mar 2023: 11 findings, 0 critical; 5 marked fixed, 6 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 | 3 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 3 | 0 | 5 |
One of the goals of this fork was in protecting protocol interactions (supplying funds, borrowing, repaying) with AML (Anti-Money Laundering) score checks, as performed through the `QuadPassport.sol`-related contracts. However, it is still possible to supply funds to the pools through the `_addReserves()` functions, as exposed through `CErc20.sol` and `CEther.sol` to `CToken.sol`. While internally these funds are treated separately as part of the `totalReserves` from the usable funds and can only be used to be passed through to the `admin` address through `Ctoken._reduceReserves()` by the admin, it is unclear if it remains AML-unchecked on purpose or not.
In order to validate the proper deployment and initialization of the contracts, it is a good practice to emit events. Also, any important state transition can be logged, which is beneficial for monitoring the contract and also tracking any eventual bugs or potential hacks. Below we present a non-exhaustive list of events that could be emitted to improve the application management: 1. `ComptrollerG7._setQuadReader()` does not emit an event reflecting changes made to the state variable `reader`. 1. `UniswapAnchoredViewProxy.setUniswapAnchoredView()` does not emit an event reflecting changes made to the state variable `uav`. 1. `UniswapAnchoredViewProxy.setTargetDecimals()` does not emit an event reflecting changes made to the state variable `targetDecimals`. 1. `UniswapAnchoredViewProxy.setPriceDecimals()` does not emit an event reflecting changes made to the state variable `priceDecimals`.
In function `CToken.getHighestAMLScore()` a call is made to `getAttributesFree()` of the `QuadReader.sol` contract, where the second parameter, `_tokenId`, is provided as a hard coded `1`. However, while currently `1` is the default, there exists functionality for adding/changing eligible IDs, through `QuadGovernance.setEligibleTokenId()`. Therefore making the current setup on the `CToken.sol` side not future-proof.
Integer overflow/underflow occur when an integer hits its bit-size limit. Every integer has a set range; when that range is passed, the value loops back around. A clock is a good analogy: at 11:59, the minute hand goes to 0, not 60, because 59 is the largest possible minute. <br><br> No overflow check for the variable `value` in function `UniswapAnchoredViewProxy.scalePriceInternal(...)`. The code is reproduced below. ```javascript= function scalePriceInternal(uint248 value) internal view returns(uint248) { int256 mantissa = int256(targetDecimals) - int256(priceDecimals); bool signed = mantissa > 0; if(!signed) { mantissa *= -1; } if(signed) { value *= (10 ** uint248(mantissa)); } else { value /= (10 ** uint248(mantissa)); } return uint248(value); } ```
To prevent confusion and potentially introduce vulnerabilities, test code should not be present in production code/should be clearly separated. In this regard, contract `SimplePriceOracle.sol` constitutes an oracle test contract (as prices can be set arbitrarily by anyone manually) and should therefore be moved into a dedicated `test` or `mock` folder.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (88)
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