Level audit reports

BNB Chain, Arbitrumlevel.financeX

Level has 1 public audit report from Quantstamp; dated 29 Mar 2023; no critical findings reported. It also holds 3 deployed contracts on 2 chains.

Critical findings
No open critical findings
In 1 report.
Open the latest report
Your label, live
Get the label for your site

Last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Audits1

Newest first

ReportSecurity firmDateScopeCritical findingsFindingsSource
Level FinanceSecurity firm: QuantstampDate: Scope: Files listedNone openFindings: 5 high · 5 medium · 16 low
12 fixed · 11 acknowledged
certificate.quantstamp.com ↗

Findings32

32 findings in 1 report: 12 fixed, 3 mitigated, 11 acknowledged (the team chose not to change the code), none open, 6 informational.

SeverityAcknowledgedFixedMitigated
Critical000
High041
Medium122
Low1060

Not fixed (11)

MediumAcknowledgedOwnership Can Be RenouncedLevel Finance · Quantstamp · 29 Mar 2023

Contracts inheriting from `Ownable` contain a function called `renounceOwnership()` which allows the `owner` to leave the contract without an `owner`. This would leave every function guarded by the `onlyOwner` modifier unable to be executed. In the case of `Erc20Reserve`, the `transfer` function, guarded by `onlyOwner`, is the only way of retrieving funds from the contract. If ownership is renounced in this context, the funds in the contract would be lost forever.

Report ↗
LowAcknowledged`LevelDevFund` Improper InitializationLevel Finance · Quantstamp · 29 Mar 2023

`LevelDevFund` inherits `Initializable`, a base contract used to "aid in writing upgradeable contracts, or any kind of contract that will be deployed behind a proxy". However, it is not written as an upgradeable contract and inherits from `Ownable`, which is not upgradeable. Therefore, when deployed, the contract will run the constructor from `Ownable`. At this point, it is possible for a malicious user to call `initialize`, setting `LEVEL_STAKE` to any desired value. Since the `owner` has no recourse to reset `LEVEL_STAKE`, the deployment would be a failure.

Report ↗
LowAcknowledged`LyLevel` ERC-20 DiscrepancyLevel Finance · Quantstamp · 29 Mar 2023

The `LyLevel` contract implements a token by attempting to follow ERC-20. However, the constant `decimals` is declared as `uint256` instead of `uint8` (see [EIP-20](https://eips.ethereum.org/EIPS/eip-20#token)). This is potentially a result of trying to clone-and-own the OpenZeppelin ERC20 code. This is generally considered poor practice, as it obfuscates the intentions of the developer, and neglects the benefits of using time-tested libraries such as OpenZeppelin's resulting in errors like the above.

Report ↗
LowAcknowledgedAccounting Errors when Dealing with Deflationary TokensLevel Finance · Quantstamp · 29 Mar 2023

When placing a swap order via `OrderManager` with a deflationary token, the `executeSwapOrder()` function attempts to use the same amount used when calling the `transfer()` function of the token. This will lead to the `OrderManager` attempting to swap more tokens than actually received during placement of the order. If there are not enough tokens in `OrderManager`, then the transaction will revert. Moreover, returning funds via `cancelOrder()` may fail due to insufficient token balance in `OrderManager`. In `LevelMasterV2`, `addLiquidity()` calculates ``` IERC20(assetToken).safeTransferFrom(msg.sender, address(this), assetAmount); IERC20(assetToken).safeIncreaseAllowance(address(levelPool), assetAmount); levelPool.addLiquidity(tranche, assetToken, assetAmount, minLpAmount, address(this)); ``` After the transfer from `msg.sender` to the `LevelMasterV2` contract, the actual transferred amount might be lower than the suppose `assetAmount`. This means we are potentially giving more allowance to the `levelPool` contract than it should have access to. However, this is not an issue in `levelPool.addLiquidity()` as it uses the actual balance changed through the call `_transferIn(_token, _amountIn)`.

Report ↗
LowAcknowledgedAssets Cannot Be Removed From the PoolLevel Finance · Quantstamp · 29 Mar 2023

When `addToken()` is called, the token's address is added to the `allAssets` array. However, there is no way for the protocol to remove added tokens, which means that once the `MAX_ASSETS` threshold is reached (currently set at 10 total assets), the protocol will not be able to add any new tokens or remove existing ones.

Report ↗
LowAcknowledgedLoss of Precision Due to Division before MultiplicationLevel Finance · Quantstamp · 29 Mar 2023

Division before multiplication may result in a loss of precision when the operations are carried over integer numbers. This was noticed in the following instances: * `LevelOracle` * #194 -- `lowerBound` * #195 -- `minLowerBound` * #196 -- `upperBound` * #197 -- `maxUpperBound` * `Pool` * #828 -- `tokenInfo.lastAccrualTimestamp` * #835 -- `tokenInfo.borrowIndex` * #836 -- `tokenInfo.lastAccrualTimestamp` * #888 -- `feeAdjust_scope_0`

Report ↗
LowAcknowledgedPool Asset Amount Increase Is Not Reflected in Check in `_reservePoolAsset()`Level Finance · Quantstamp · 29 Mar 2023

Pool Asset Amount Increase Is Not Reflected in Check in `_reservePoolAsset()`

In `_reservePoolAsset()`, the `if` statement checks whether the asset's new reserved amount is greater than the pool amount. If this is not true, the logic is allowed to continue and `_reserveTrancheAsset()` is called. This check is being made because there should never be a situation where the pool amount is less than the reserved amount. However, `_reserveTrancheAsset()` increases not just the reserved amount, but also the pool amount. Therefore, the check is validating the wrong amounts. This may occasionally cause certain position increases to be blocked.

Report ↗
LowAcknowledgedPotential User Error Using `setRiskFactor()`Level Finance · Quantstamp · 29 Mar 2023

`setRiskFactor()` loops through an array of `RiskConfig` objects, one for each tranche with a risk factor to be modified. However, this leaves room for the user to mistakenly input a tranche twice, leading to an incorrect risk configuration.

Report ↗
LowAcknowledgedStaking Rewards AccountingLevel Finance · Quantstamp · 29 Mar 2023

`LevelStake` gives `LGO` rewards to users that stake `LVL` tokens in it. It transfers the reward (if any) when staking, unstaking, or when the user claims it (`claimRewards()`). `LevelStake._safeTransferLGO()` sanitizes the number of tokens to not send more than the contract balance. In case there are not enough tokens, the user's `rewardDebt` is updated as if the full amount was transferred.

Report ↗
LowAcknowledgedUnderconstrained Assumptions for OracleLevel Finance · Quantstamp · 29 Mar 2023

In`_getReferencePrice()`, we calculate the following formula: `minLowerBound = refPrice * (PRECISION - 3 * config.chainlinkDeviation) / PRECISION`. However, in `configToken()`, it is only required that `chainlinkDeviation != 0 && chainlinkDeviation < PRECISION / 2`. Consequently, if the owner misconfigures the token by setting `chainlinkDeviation` to somewhere between `PRECISION / 3` and `PRECISION / 2`, calls to `_getReferencePrice()` will revert due to underflow. This means any call to get the price of the token from the oracle will fail. However, this can be fixed by having the `owner` call `configToken()` again with the correct parameters.

Report ↗
Show all 11
LowAcknowledgedUnexpected EventLevel Finance · Quantstamp · 29 Mar 2023

`LevelReferralController.setEnableStake()` will always emit an `EnableStakeSet` event, even if the new value is equal to the old value of `enableStaking`.

Report ↗

Contracts3

AddressChainSource code
0xbe2b6c5e31f292009f495ddbda88e28391c9815eChain: BNB ChainSource code: Verified source
0xb64e280e9d1b5dbec4accedb2257a87b400db149Chain: BNB ChainSource code: Verified source
0xb64e280e9d1b5dbec4accedb2257a87b400db149Chain: ArbitrumSource code: Verified source

All 3 addresses and the files the reports name

Level: questions

Is Level audited?

Trustblock holds 1 public audit report for Level, dated 29 Mar 2023. The latest is by Quantstamp (“Level Finance”).

Who audited Level?

Quantstamp wrote the report Trustblock holds for Level.

Are there open findings in Level’s audits?

11 findings are still open or acknowledged in the firms’ reports: 1 medium, 10 low (all acknowledged). No critical finding is reported. Statuses are the security firms’ own.

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