Web3 · Smart Contract Audit

DeltaPrime Security Audit

softstack completed a smart contract audit of DeltaPrime's Protocol in November 2022, reporting 16 findings (5 medium, 6 low and 5 informational), of which 8 were resolved or mitigated before the final report. The full report is published in the softstack public audit archive.

Key facts

Client
DeltaPrime
Completed
Chains
Ethereum
Languages
Solidity, JavaScript
Commit
0e815117dbde
Market cap
$235,519 as of 2026-09-30

About the project

DeltaPrime is a decentralised borrowing and prime brokerage protocol on Avalanche and Arbitrum. Depositors supply assets to savings pools and earn interest, while borrowers use escrow-based Prime Accounts to take undercollateralised loans against their collateral. Borrowed funds can be invested in integrated DeFi protocols, and the PRIME and sPRIME tokens cover governance and fees.

Scope

Source repositorygithub.com/DeltaPrimeLabs/deltaprime-primeloans

Components reviewed

14 modules · 20 files
  1. XFacet.sol
  2. Facet.sol
  3. DiamondCutFacet.sol
  4. Pool.sol
  5. VariableUtilisationRatesCalculator.sol
  6. SmartLoansFactory.sol
  7. LinearIndex.sol
  8. CompoundingIndex.sol
  9. RedstoneConfigManager.sol
  10. truffle-config.js
  11. hardhat.config.js
  12. UniswapV2DEXFacet.sol
  13. SolvencyFacet.sol
  14. VariableUtilisationRatesCalcuator.sol

Findings

0Critical
0High
5Medium
6Low
5Informational

8 of 16 findings resolved before the final report.

IDTitleSeverityStatus
6.2.1The Owner Can Manipulate The Rate Calculation

Using the setRatesCalculator function, the owner can change the ratesCalculator that is responsible for changing the deposit and the borrowing rates, which allows the admin to manipulate the rate calculation by injecting the address of any…

Mediumacknowledged
6.2.2Race Condition

The setSpread function allows the owner to change the spread variable. If a user uses the rates calculated by the contract, and then the owner changes the spread variable, it is possible that the owner’s transaction will get mined prior,…

Mediumacknowledged
6.2.3All The Upgrades Should Be Performed Using A DAO Structure

The project makes use of the diamond pattern, this implementation offers the upgradabil- ity of functionalities along with other advantages.

Mediumacknowledged
6.2.4Possible Front-Run In The contract initialization

The initialization of SmartLoansFactory and LinearIndex contract requires calling the initialize function, However, there is no access control in place to avoid an attacker to front-run this call.

Mediumacknowledged
6.2.5Protocol Doesn’t Count For Leap Years

The getCompoundedFactor function calculates the compounded factor in Ray using the following formula : ((rate.wadToRay() / SECONDS_IN_YEAR) + WadRayMath.ray()).rayPow(period); The SECONDS_IN_YEAR is equal to 365, and therefore the formula…

Mediumacknowledged
6.2.6Owner Can Renounce Ownership

Typically, the account that deploys the contract is also its owner. Consequently, the owner is able to engage in certain privileged activities in his own name.

Lowfixed
6.2.7Approve Race Condition

The standard ERC20 implementation contains a widely known racing condition in its approve function, wherein a spender can witness the token owner broadcast a transaction altering their approval and quickly sign and broadcast a transaction…

Lowacknowledged
6.2.8Diamond Facet Upgrades Should Be Performed In A Single Transaction

If during an upgrade diamondCut() calls are executed in multiple Ethereum transactions, users may be exposed to contracts that are upgraded only partially, i.e., some of the functions are upgraded while others are not.

Lowfixed
6.2.9Missing Validation On amount

In the deposit function the user can deposit numerous tokens in the Pool. However, there is no validation on the amount variable, a user can call this function with the value 0 and the user will lose gas fees without any impact.

Lowfixed
6.2.10Possible DDoS In The Borrow

The borrow function, is incrementing the borrowed[msg.sender] and borrowed[ad- dress(this)] with the amount of value, if someone managed to borrow an amount with the value of 2**256 - 1 the next borrower can’t borrow, since the increment…

Lowacknowledged
6.2.11Missing Verification In Constructor For Duplicate Values

The constructor loops over the _trustedSigners array and adds each element to trusted- Signers using the function _addTrustedSigner. However, this function does not verify if the array contains duplicated elements.

Lowfixed
6.2.12Floating Pragma Version Identified

It is recommended to specify a fixed compiler version to ensure that the bytecode produced does not vary between builds. This is especially important if you rely

Informationalfixed
6.2.13Unnecessary Initializations

When a variable is declared in solidity, it gets initialized with type’s default value.

Informationalacknowledged
6.2.14Function State Mutability Can Be Restricted To Pure

It is recommended to change the function state mutability to pure when the function does not read or modify the variables of the state.

Informationalfixed
6.2.15Remove Existing Declaration

The amounts array is already declared in the returns statement.

Informationalfixed
6.2.16Remove Unused Local Variables

There are some local variables that are declared

Informationalfixed

About this engagement

A smart contract audit reviews on-chain code for flaws an attacker could exploit. Engineers trace how assets move through the contracts, check who can call privileged functions, and test the arithmetic, external calls and upgrade paths. Each finding is rated by severity, and fixes are re-checked before the final report.

How softstack runs smart contract audits

Methodology

Review process

  1. Scoping and threat modelling

    The commit hash is frozen and the attack surface is mapped: asset flows, trust assumptions, privileged roles and the external systems the code depends on.

  2. Automated analysis

    Static analysers sweep the full codebase to surface known weakness patterns, unreachable states and deviations from established conventions.

  3. Manual code review

    Independent engineers read the code line by line, concentrating on business logic, access control, arithmetic and the handling of external calls.

  4. Adversarial testing

    Property-based fuzzing and invariant tests attack the assumptions the protocol relies on, targeting states that ordinary unit tests never reach.

  5. Reporting

    Every finding is documented with a severity rating, its impact, the steps to reproduce it and a concrete remediation the team can act on.

  6. Remediation verification

    Submitted fixes are re-reviewed against the original finding, and the final report records the resolved state of each one.

Standards and references

  • SWC RegistrySmart Contract Weakness Classification
  • CWECommon Weakness Enumeration

FAQ

DeltaPrime was audited by softstack GmbH, a German Web3 security and software company based in Flensburg and certified to ISO/IEC 27001 by TÜV SÜD. softstack completed a smart contract audit for DeltaPrime in November 2022. The full report is linked on this page and published in the softstack public audit archive.

The review reported 16 findings: 5 medium, 6 low and 5 informational. 8 of 16 were resolved or mitigated before the final report.

20 source files were reviewed in github.com/DeltaPrimeLabs/deltaprime-primeloans at commit 0e81511. The published report lists every file covered.

This report covers the code as reviewed in November 2022 at commit 0e81511. Any code changed after that point is outside the reviewed scope.

Related audits

Browse all security audits

Disclaimer

This audit represents a point-in-time security assessment of the reviewed codebase and is intended for informational purposes only. While Softstack applies industry-standard security review methodologies, no audit can guarantee the absence of vulnerabilities, bugs, or other security risks. This report does not constitute financial, legal, regulatory, or investment advice, nor does it endorse the project, its business model, products, or services. Security is an ongoing process, and we strongly recommend conducting a new assessment following any material code changes or at least every 6 months to address newly emerging threats, vulnerabilities, and ecosystem developments.