CertiK reviewed Derify protocol (Derify protocol Ⅱ) on 16 Sep 2022: 22 findings, 0 critical; 11 marked fixed, 8 acknowledged, 3 open.
Report hosted on skynet.certik.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 | 8 | 0 |
| Medium | 1 | 0 | 1 |
| Low | 2 | 0 | 10 |
The above-mentioned function has two modifiers `nonRentrant`.
The value of the public constant CONTRACT_DECIMAL is 10e8 in the DerifyBroker contract, hence all the accounts' decimals should be 8. While USD, DRF, and EDRF are with decimals 18. So the protocol has to interact with USD contract and handle the different decimals.
If the account is liquidated, his/her account balance will be cleared.
The amount of the fee is not relevant to the actual `operatedSize`. As long as the position is processed, there will be a flat fee.
If the updates of gasFeePool are always together with the updates of gasBalance, then the two events can be merged for better simplicity.
The function `transferFrom()` in an ERC20 contract is used for receiving the user's payment to the contract. When the contract needs to transfer money out, it's better to use the function `transfer()` because there is the potential that the target token does not support transferring from users selves.
The position change fee is calculated with kRatio, gRatio, and roRatio. The three ratios are set by the owner and it's hard to understand their meanings.
The function that affects the status of sensitive variables should be able to emit events as notifications to users.
The function name should be `cancelAllOrderedPositions` rather than `cancleAllOrderedPositions`.
The linked `transfer()`/`transferFrom()` invocations do not check the return value of the function call which should yield a `true` result in case of a proper ERC-20 implementation.
The contract is serving as the underlying entity to interact with `communityVestingVault`, which is an external dependency in this audit. The scope of the audit treats 3rd party entities as black boxes and assumes their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to lost or stolen assets. Additionally, the value `amountVested` is calculated by the function `communityVestingVault.calculateGrantClaim()` and is added to the variable `drfRewardPool`. It's recommended to return the actual value in the function `claimVestedTokens` in case the accounts and funds are not reconciled.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (19)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’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