FortKnoxster - Audit

CertiKFiles named in the report

CertiK reviewed FortKnoxster DieFi (FortKnoxster - Audit) on 23 Sep 2022: 4 findings, 0 critical; 3 marked fixed, 1 open.

No open critical findings
Open the reportOpen FortKnoxster DieFi’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings4

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

SeverityOpenAcknowledgedFixed
Critical000
High001
Medium000
Low102
HighCentralization Risks in `DieFiForwarder.sol` andFixed

In the contract `DieFiForwarder` the role `DEFAULT_ADMIN_ROLE` has authority over the functions shown in the diagram below and the following functions: * `grantRole()` * `revokeRole()` Any compromise to the `DEFAULT_ADMIN_ROLE` account may allow the hacker to take advantage of this authority and: * Pause or unpause the function `execute()` from executing meta transactions by the `RELAY_ROLE` address, with functions `pause()` and `unpause()`. * Grant or revoke the `RELAY_ROLE` to/from any address with functions `grantRole()` and `revokeRole()`. A user with the `DEFAULT_ADMIN_ROLE` also has the ability to grant/revoke this role to/from any address, and grant/revoke the `RELAY_ROLE` that is described below. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48ea3fe442e54092b1aecb9dd47ec201/diagrams/centralization_DieFiForwarder-DieFiForwarder-DEFAULT_ADMIN_ROLE.svg) --- In the contract `DieFiForwarder` the role `RELAY_ROLE` has authority over the functions shown in the diagram below. Any compromise to the `RELAY_ROLE` account may allow the hacker to take advantage of this authority and: * Verify a signature against the given `ForwardRequest` variables and execute the meta transaction in place of the signature signer. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48ea3fe442e54092b1aecb9dd47ec201/diagrams/centralization_DieFiForwarder-DieFiForwarder-RELAY_ROLE.svg) --- In the contract `DieFiPolicy` the role `DEFAULT_ADMIN_ROLE` has authority over the functions shown in the diagram below and the following functions: * `grantRole()` * `revokeRole()` Any compromise to the `DEFAULT_ADMIN_ROLE` account may allow the hacker to take advantage of this authority and: * Grant or revoke the `DEFAULT_ADMIN_ROLE` to or from any address. The `DEFAULT_ADMIN_ROLE` has the ability to call the function described below. * Change the `subscriptionManager` address to any address with function `setSubscriptionManager()`. The `subscriptionManager` address is used throughout the contract to call external `policy` functions. ![](https://accelerator-tasks-prod.acc.corp.certik.com/48ea3fe442e54092b1aecb9dd47ec201/diagrams/centralization_DieFiPolicy-DieFiPolicy-DEFAULT_ADMIN_ROLE.svg)

LowChecks Effects Interaction Pattern ViolatedFixed

A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. If a recursive call is preformed on either function `execute()` or `createPolicy()`, the ordering of events emitted will be inaccurate compared to the actual execution timeline of the external calls. ### External call ```solidity=62 (bool success, bytes memory returndata) = req.to.call{gas: req.gas, value: req.value}( abi.encodePacked(req.data, req.from) ); ``` ### Events emitted after the call ```solidity=78 emit MetaTransactionExecuted(req.from, req.to, req.data); ``` --- ### External call ```solidity=66 ISubscriptionManager(subscriptionManager).createPolicy{value: msg.value }( _policyId, _policyOwner, _size, _startTimestamp, _endTimestamp ); ``` ### Events emitted after the call ```solidity=74 emit DieFiPolicyCreated( _policyId, _policyOwner, _size, _startTimestamp, _endTimestamp, msg.value ); ```

LowFunction Should Be Declared ExternalFixed

The functions which are never called internally within the contract should have external visibility for gas optimization.

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

  • contracts/policy/DieFiPolicy.sol
  • contracts/metatx/DieFiForwarder.sol

Part of FortKnoxster DieFi’s security record

FortKnoxster DieFi
Audits2 audits by 2 firmsLast audit Sep 2022, by HashEx.
Critical findingsNo open critical findingsAcross 2 reports.
Open FortKnoxster DieFi’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

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