Quantstamp reviewed saffron.finance (Saffron Staking V2) on 21 Sep 2021: 9 findings, 0 critical; 5 marked fixed, 4 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 | 2 |
| Low | 0 | 4 | 3 |
`SaffronStakingV2.add()` allows adding more than once the same `LPToken`. This issue will dilute the user's rewards since `updatePool()` relies on `pool.lpToken.balanceOf(address(this))` to get the pool supposed balance, that will return the total value held by both pools (or more), which will dilute the user's rewards.
`set()` and `add()` functions members should always be executed with `massUpdatePools()` to avoid errors when computing the user's rewards since the total allocation points will change. However, both functions have a boolean (`_withUpdate`) input that will allow the owner or governance to modify the allocation point of a pool or to add a new pool with new allocation points without updating the accumulated reward per block for each pool. This can lead to distributing more or less reward than the amount expected.
The value of allocation point value is not validated in both `set()` and `add()` functions. The input validation, in this case, is important since it can impact `totalAllocPoint`. For example, if `totalAllocPoint` is equal to zero then both `updatePool` and `pendingSFI` will most likely throw.
The `accSFIPerShare` variable (see `pendingSFI()` and `updatePool()`) is updated by `sfiReward * 1e18 / lpSupply` and `sfiReward` uses integer division when dividing by `totalAllocPoint`. This leads to `sfiReward` being truncated and `accSFIPerShare` potentially losing precision.
The `set` function works on pools that have not been created yet. The owner can allocate points to non-existant pools.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (3)
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