Quantstamp reviewed saffron.finance (Saffron) on 21 Mar 2023: 12 findings, 0 critical; 7 marked fixed, 5 acknowledged.
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 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 5 | 7 |
The clone-and-own approach involves copying and adjusting open source code at one's own discretion. From the development perspective, it is initially beneficial as it reduces the amount of effort. However, from the security perspective, it involves some risks as the code may not follow the best practices, may contain a security vulnerability, or may include intentionally or unintentionally modified upstream libraries. Use Uniswap's `FullMath.sol` instead of `Math.sol` to avoid maintaining the code.
It is crucial to validate inputs, even if the inputs come from trusted addresses, to avoid human error. Following is the list of places that can potentially benefit from a stricter input validation: 1. `VaultFactory.addVaultType()` it is worth checking if that exact `bytecode` already exists. 2. `UniV3LimitedRangeAdapter.initialize()` does not validate `params.minTick` to be less than `params.maxTick`. 3. `VaultFactory.sol#154`: the `_adapterInfo.vaultAddress` of the `createVault()` function should be zero address. Otherwise, it is not possible to invoke `initializeVault()` if a vault is already attached to the specified `adapter`. 4. `VaultFactory.sol#162`: the `vaultAddress` of the `createVault()` function should not be zero. The assembly `create` function returns a zero address upon error. 5. `VaultFactory.sol#251`: the `adapterAddress` of the `createAdapter()` function should not be zero. The assembly `create` function returns a zero address upon error.
`UniV3LimitedRangeAdapter.removeLiquidity()` should require that earning have been settled. Safety checks must be implemented at the smart contract level to prevent future breaking changes. Similarly, `UniV3LimitedRangeAdapter.deployCapital()` should require that the token ID is not set in order to safely execute the transaction..
As security standards develop, so does the Solidity language. To stay up to date with current practices, it's important to use a recent version of Solidity and recent conventions.
Within the `deployCapital()` function implementation, the `uint256 fixedSideCapacity` gets cast to `uint128` from `uint256`. Therefore, if `fixedSideCapacity` exceeds `uint128`, `fixedSideCapacity` will be truncated during the conversion. This is problematic because this allows a depositor to deposit less than expected liquidity. The current implementation has a check inside `setVault()`, but it is a good practice to add the check in the `deployCapital()` function in case of code restructuring.
Local variable naming in `UniV3LimitedRangeAdapter.mintToken()` is confusing: ``` (..., uint256 minted0, uint256 minted1) = positionManager.mint(params); ``` `minted0` and `minted1` do not represent minted amounts but the amount used as liquidity for the Uniswap pool.
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".
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (22)
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