Quadrata Lending

QuantstampFiles named in the report

Quantstamp reviewed Quadrata (Quadrata Lending) on 21 Mar 2023: 11 findings, 0 critical; 5 marked fixed, 6 open.

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

Report hosted on certificate.quantstamp.com.

Trustblock does not review code.

Findings11

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

SeverityOpenAcknowledgedFixed
Critical000
High300
Medium000
Low305
High`Maximillion.setCEther()` Callable Multiple Times By AnyoneOpen

One of the custom changes to the Compound code base was changing the constructors to publicly callable normal functions. The `Maximillion` constructor changed to a publicly callable function `setCEther()`. As it is no longer a constructor, or has an `initializer` modifier as i.e. known from [OpenZeppelin's `Initializable` library](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializers), or any other way of preventing multiple calls and is public, anyone can call said contract and re-initialize it and thereby modify the `cEther` state variable.

HighBurnt Passports And Increased AML Scores May Lead To Locked FundsOpen

If a user has their passport burnt, no actions can be taken on their `CToken`s or any accumulated debt. This is because `getHighestAMLScore()` makes a call to `reader.getAttributesFree()`, which requires the user to have a passport. Not only will `CToken`'s be locked with the user being unable to call `redeem()`, but their collateral cannot be liquidated either, as `repayBorrowFresh()` requires a passport for both the `borrower` and the `payer`. <br><br> Additionally, a borrower below their collateral requirements cannot be liquidated if their AML score becomes greater than 8 after they've already borrowed funds.

HighUnresolved Vulnerabilities From Old Compound CodeOpen

The code base is a modified fork of the [Compound project](https://compound.finance/), based on commit hash [eb7a6c9831198a19736bc4c1f8f66d41b98f4eaf](https://github.com/compound-finance/compound-protocol/tree/eb7a6c9831198a19736bc4c1f8f66d41b98f4eaf). As that commit hash is from 10th August 2021 it is missing many changes. For example, it is missing critical security fixes, like the ERC777-based re-entrancy fix introduced in [078356d5e2e37e1032e61cf1ff586b5b51b5725b](https://github.com/compound-finance/compound-protocol/pull/153/commits/078356d5e2e37e1032e61cf1ff586b5b51b5725b).

LowMissing Input ValidationOpen

It is important to validate inputs, even if they only come from trusted addresses, to avoid human error. Specifically, in the following functions arguments of type `address` may be initialized with value `0x0`: 1. `BaseJumpRateModelV2.sol`: Validate `_owner` in the constructor. 2. `CDaiDelegate.sol`: Validate the addresses passed to `_becomeImplementation()`. 3. `CDaiDelegate.sol`: `accrueInterest()` should confirm that `potAddress` is set. 4. `CErc20Delegator.sol`: `underlying_`, `comptroller_`, `interestRateModel_`, `admin_`, and `implementation_` should be checked in the constructor. Any setter functions for the variables should confirm they aren't the zero address as well. 5. `CErc20Immutable.sol`: `underlying_`, `comptroller_`, `interestRateModel_`, and `admin_` should be checked in the constructor. 6. `CEther.sol`: `comptroller_`, `interestRateModel_`, and `admin_` should be checked in the constructor. 7. `ComptrollerG7.sol`: Check the address passed into `_setPriceOracle()`. 8. `Maximillion.sol`: Check the value of `cEther_` in `setCEther()`. 9. `Resevoir.sol`: Validate `token_` and `target_` in the constructor. 10. `Timelock.sol`: Validate `admin` in the constructor and `setPendingAdmin()`. 1. `UniswapAnchoredViewProxy.setWhitelistedMethods()` does not check that `_uav` is different from `address(0)`. 1. `UniswapAnchoredViewProxy.setTargetDecimals()` does not check that `_target` is smaller than `type(int256).max` (Alternatively use [SafeCast's](https://docs.openzeppelin.com/contracts/3.x/api/utils#SafeCast) `.toInt256()` in `scalePriceInternal()`). 1. `UniswapAnchoredViewProxy.setPriceDecimals()` does not check that `_priceDecimals` is smaller than `type(int256).max` (Alternatively use [SafeCast's](https://docs.openzeppelin.com/contracts/3.x/api/utils#SafeCast) `.toInt256()` in `scalePriceInternal()`).

LowOld Solidity Version (< 0.8)Open

As security standards develop, so does the Solidity language. In order to stay up to date with current practices, it's important to use a recent version of Solidity and recent conventions. Apart from syntax changes, new solidity versions introduce important security fixes, [like implicit integer overflow/underflow checks](https://docs.soliditylang.org/en/v0.8.13/080-breaking-changes.html#silent-changes-of-the-semantics), and features and it is therefore recommended to use the latest version if possible.

LowUnlocked PragmaOpen

Every Solidity file specifies in the header a version number of the format `pragma solidity (^)0.8.*`. The caret (`^`) before the version number implies an unlocked pragma, meaning that the compiler will use the specified version _and above_, hence the term "unlocked".

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

  • contracts/test-contracts/ComptrollerScenario.sol
  • contracts/SafeMath248.sol
  • contracts/CErc20Delegator.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerG3.sol
  • contracts/test-contracts/FixedPriceOracle.sol
  • contracts/CEther.sol
  • contracts/test-contracts/FaucetToken.sol
  • contracts/test-contracts/Passport/ERC1155/IERC1155ReceiverUpgradeable.sol
  • contracts/test-contracts/Passport/ERC1155/presets/ERC1155PresetMinterPauserUpgradeable.sol
  • contracts/Exponential.sol
  • contracts/LegacyJumpRateModelV2.sol
  • contracts/test-contracts/Passport/ERC1155/extensions/ERC1155BurnableUpgradeable.sol
  • contracts/test-contracts/Passport/storage/QuadPassportStore.sol
  • contracts/WhitePaperInterestRateModel.sol
  • contracts/UniswapAnchoredViewProxy.sol
  • contracts/UniswapAnchoredViewInterface.sol
  • contracts/test-contracts/Const.sol
  • contracts/test-contracts/Structs.sol
  • contracts/test-contracts/Passport/ERC1155/extensions/ERC1155PausableUpgradeable.sol
  • contracts/test-contracts/Passport/ERC1155/IERC1155Upgradeable.sol
  • contracts/Reservoir.sol
  • contracts/Unitroller.sol
  • contracts/test-contracts/Passport/UAVMock/UniswapAnchoredViewV2Mock.sol
  • contracts/test-contracts/Fauceteer.sol
  • contracts/test-contracts/CEtherV2Test.sol
  • contracts/test-contracts/Passport/interfaces/IQuadPassport.sol
  • contracts/test-contracts/Passport/ERC1155/utils/ERC1155ReceiverUpgradeable.sol
  • contracts/CToken.sol
  • contracts/ExponentialNoError.sol
  • contracts/test-contracts/Passport/interfaces/IQuadGovernance.sol
  • contracts/CErc20Delegate.sol
  • contracts/test-contracts/Counter.sol
  • contracts/test-contracts/Passport/QuadPassport.sol
  • contracts/test-contracts/PriceOracleProxy.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerScenarioG3.sol
  • contracts/ComptrollerStorage.sol
  • contracts/test-contracts/Passport/QuadGovernance.sol
  • contracts/test-contracts/Passport/interfaces/IUniswapAnchoredView.sol
  • contracts/test-contracts/ComptrollerHarness.sol
  • contracts/test-contracts/Passport/ERC1155/ERC1155Upgradeable.sol
  • contracts/JumpRateModelV2.sol
  • contracts/test-contracts/UniswapAnchoredViewProxyHarness.sol
  • contracts/test-contracts/upgradability-tests/Comptroller.sol
  • contracts/test-contracts/Passport/ERC1155/utils/ERC1155HolderUpgradeable.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerScenarioG1.sol
  • contracts/LegacyInterestRateModel.sol
  • contracts/InterestRateModel.sol
  • contracts/test-contracts/InterestRateModelHarness.sol
  • contracts/CErc20.sol
  • contracts/CarefulMath.sol
  • contracts/test-contracts/FalseMarker.sol
  • contracts/test-contracts/Passport/ERC1155/extensions/ERC1155SupplyUpgradeable.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerG1.sol
  • contracts/test-contracts/MathHelpers.sol
  • contracts/ComptrollerInterface.sol
  • contracts/CDaiDelegate.sol
  • contracts/ErrorReporter.sol
  • contracts/test-contracts/Passport/UAVMock/UniswapAnchoredViewV3Mock.sol
  • contracts/test-contracts/ERC20.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerScenarioG2.sol
  • contracts/Timelock.sol
  • contracts/BaseJumpRateModelV2.sol
  • contracts/test-contracts/Passport/storage/QuadReaderStore.sol
  • contracts/test-contracts/CErc20Harness.sol
  • contracts/ComptrollerG7.sol
  • contracts/test-contracts/EvilToken.sol
  • contracts/test-contracts/CEtherHarness.sol
  • contracts/test-contracts/Passport/interfaces/IQuadReader.sol
  • contracts/CTokenInterfaces.sol
  • contracts/EIP20Interface.sol
  • contracts/test-contracts/Passport/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol
  • contracts/SafeMath.sol
  • contracts/test-contracts/Passport/QuadReader.sol
  • contracts/EIP20NonStandardInterface.sol
  • contracts/test-contracts/Maximillion.sol
  • contracts/test-contracts/TimelockHarness.sol
  • contracts/test-contracts/SimplePriceOracle.sol
  • contracts/test-contracts/TetherInterface.sol
  • contracts/test-contracts/Passport/UAVMock/UniswapAnchoredViewMock.sol
  • contracts/JumpRateModel.sol
  • contracts/test-contracts/FeeToken.sol
  • contracts/DAIInterestRateModelV3.sol
  • contracts/CErc20Immutable.sol
  • contracts/test-contracts/upgradability-tests/ComptrollerG2.sol
  • contracts/test-contracts/MockMCD.sol
  • contracts/PriceOracle.sol
  • contracts/Passport/IQuadReader.sol
  • contracts/test-contracts/Passport/storage/QuadGovernanceStore.sol

Part of Quadrata’s security record

Quadrata
Audits3 audits by 2 firmsLast audit Jul 2023, by CertiK.
Critical findingsNo open critical findingsAcross 3 reports.
Open Quadrata’s security record

Security firm

Quantstamp

236 projects reviewed · 332 reports · latest Oct 2026

See Quantstamp’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