- Home
- Security Audits
- DeltaPrime
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-primeloansComponents reviewed
14 modules · 20 files- XFacet.sol
- Facet.sol
- DiamondCutFacet.sol
- Pool.sol
- VariableUtilisationRatesCalculator.sol
- SmartLoansFactory.sol
- LinearIndex.sol
- CompoundingIndex.sol
- RedstoneConfigManager.sol
- truffle-config.js
- hardhat.config.js
- UniswapV2DEXFacet.sol
- SolvencyFacet.sol
- VariableUtilisationRatesCalcuator.sol
Findings
8 of 16 findings resolved before the final report.
| ID | Title | Severity | Status |
|---|---|---|---|
6.2.1 | The 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… | Medium | acknowledged |
6.2.2 | Race 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,… | Medium | acknowledged |
6.2.3 | All 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. | Medium | acknowledged |
6.2.4 | Possible 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. | Medium | acknowledged |
6.2.5 | Protocol 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… | Medium | acknowledged |
6.2.6 | Owner 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. | Low | fixed |
6.2.7 | Approve 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… | Low | acknowledged |
6.2.8 | Diamond 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. | Low | fixed |
6.2.9 | Missing 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. | Low | fixed |
6.2.10 | Possible 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… | Low | acknowledged |
6.2.11 | Missing 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. | Low | fixed |
6.2.12 | Floating 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 | Informational | fixed |
6.2.13 | Unnecessary Initializations When a variable is declared in solidity, it gets initialized with type’s default value. | Informational | acknowledged |
6.2.14 | Function 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. | Informational | fixed |
6.2.15 | Remove Existing Declaration The amounts array is already declared in the returns statement. | Informational | fixed |
6.2.16 | Remove Unused Local Variables There are some local variables that are declared | Informational | fixed |
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 auditsMethodology
Review process
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.
Automated analysis
Static analysers sweep the full codebase to surface known weakness patterns, unreachable states and deviations from established conventions.
Manual code review
Independent engineers read the code line by line, concentrating on business logic, access control, arithmetic and the handling of external calls.
Adversarial testing
Property-based fuzzing and invariant tests attack the assumptions the protocol relies on, targeting states that ordinary unit tests never reach.
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.
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 auditsDisclaimer
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.