Primex Finance security record

Arbitrum, Base, BNB Chain, Ethereum, Polygon (POS)primex.financeXGitHub

As of 19 Nov 2026, Primex Finance has 9 audit reports by 2 security firms on Trustblock; the latest is by Resonance Security, dated 14 Oct 2024. Those reports list no open critical findings.

Critical findings
No open critical findings
Across the 9 reports, 4 critical findings were reported. Each is marked fixed by the firm that reported it. See the findings
Open the latest report
Your label, live
Get the label for your site

Record last updated . It holds audits and findings, contracts and incidents up to Nov 2026. Trustblock does not review code.

Audits9

Newest first

ReportSecurity firmDateScopeCritical findingsSource
Primex Finance - Primex Protocol IntegrationsSecurity firm: Resonance SecurityDate: Scope: Not recorded; see the reportNone openGitHub ↗
Primex Protocol Flash Loan IntegrationSecurity firm: Resonance SecurityDate: Scope: Not recorded; see the report1 critical finding, fixedGitHub ↗
Primex Finance - Primex Protocol Bug ReviewSecurity firm: Resonance SecurityDate: Scope: Not recorded; see the reportNone openGitHub ↗
Primex FinanceSecurity firm: Resonance SecurityDate: Scope: 401 addresses on Ethereum, Polygon (POS) and ArbitrumNone openIPFS ↗
Primex FinanceSecurity firm: Resonance SecurityDate: Scope: 401 addresses on Ethereum, Polygon (POS) and Arbitrum1 critical finding, fixedIPFS ↗
Primex FinanceSecurity firm: Resonance SecurityDate: Scope: 401 addresses on Ethereum, Polygon (POS) and ArbitrumNone openIPFS ↗
Primex FinanceSecurity firm: Resonance SecurityDate: Scope: 401 addresses on Ethereum, Polygon (POS) and Arbitrum1 critical finding, fixedIPFS ↗
Primex Finance - Spot Margin Trading ProtocolSecurity firm: Resonance SecurityDate: Scope: Not recorded; see the report1 critical finding, fixedGitHub ↗
Primex FinanceSecurity firm: QuantstampDate: Scope: Files listedNone opencertificate.quantstamp.com ↗

Findings158

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

SeverityOpenAcknowledgedFixedMitigated
Critical0040
High02110
Medium010202
Low010266

Marked Info, Informational or Undetermined by the firms. Not counted as findings.

InfoLack Of Access Control On setProtocolParamsByAdmin()Primex Finance - Primex Protocol Integrations · Resonance Security · 14 Oct 2024Acknowledged

The report gives no description here.

Open the report
InfoLack Of Access Control On setProtocolParamsByAdmin()Primex Finance · Resonance Security · 14 Oct 2024Acknowledged

The function setProtocolParamsByAdmin() does not implement access control allowing any user to delegate calls to PositionManagerExtension.While this does not present an immediate threat since all administrative functions on PositionManagerExtension possess proper access control, current or future functions that do not have any access control implemented may be at risk.

Open the report
InfoMissing Validation Of Zero Amount On batchBurn()Primex Finance · Resonance Security · 19 Oct 2023Acknowledged

The function batchBurn() does not validate whether the _amounts array contains elements with 0 amount, allowing transactions to take place and events to be emitted that do not change the state of the blockchain. This fact not only incurs unnecessary gas costs, but also fills the blockchain with unnecessary transactions,

Open the report
InfoMissing Validation Of Zero Amount On batchBurn()Primex Finance - Spot Margin Trading Protocol · Resonance Security · 19 Oct 2023Acknowledged

The report gives no description here.

Open the report
InformationalDifferent Solidity Compiler Used For Proxy and Implementation ContractsPrimex Finance · Quantstamp · 18 Aug 2023Acknowledged

The proxy contracts used in the Transparent Upgradeable Proxy pattern are compiled using solidity 0.8.10, but the implementation contracts are compiled using solidity 0.8.18.

Open the report
InformationalIncompatibility with Non-Standard TokensPrimex Finance · Quantstamp · 18 Aug 2023Acknowledged

In general, the protocol has some limits on what the token can be supported to interact: 1. The protocol only supports tokens with at most 18 decimals: the protocol aligns the "multiplier" on the decimals to 18 in several places: `BatchManager`, `LimitPriceCOM`, `TakeProfitStopLossCCM`, `BestDexLens`, and `PositionLibrary` contracts. The 18 decimals are also how the `WadRayMath` library handles the WAD precision. 2. The protocol does not support token charging fees on transfers: despite that the `TokenTransfersLibrary.doTransferFromTo()` function returns the balance difference as the output, all places calling the function do not use the output. In other words, all places calling the function assume to get the full amount on transfer. 3. The protocol does not support rebaseable tokens: the contract `TraderBalanceVault` maintains the accounting of token balances in `balances`. Tokens with elastic supply (also known as rebasing tokens) and tokens with dishonest implementation would not be compatible with the logic intended by this contract.

Open the report
InformationalMissing DNS AddressPrimex Finance · Quantstamp · 18 Aug 2023Acknowledged

The `SpotTradingRewardDistributorStorage` contract declares the `dns` variable, but the `SpotTradingRewardDistributor.initialized()` function does not set its value. The `dns` variable is not used in `SpotTradingRewardDistributor`, but if there is a function that requires the use of `dns`, the variable should be initialized during a contract upgrade.

Open the report
UndeterminedReferral Program Susceptible to Sybil AttackPrimex Finance · Quantstamp · 18 Aug 2023Acknowledged

Any user can register a referrer by calling the `ReferralProgram.register()` function. This could potentially be dangerous as there is no way to verify that a single account belongs to a single human. Thus, if a reward was associated with referrals, a user would be incentivized to create and refer fake accounts to amass rewards. Since the reward mechanism for the referral program is unclear to us, we consider the severity to be undetermined.

Open the report
InformationalUpgradabilityPrimex Finance · Quantstamp · 18 Aug 2023Acknowledged

While upgradability is not a vulnerability in itself, token holders should be aware that the token contract can be upgraded at any given time. This audit does not guarantee the behavior of future contracts that the token may be upgraded to. Here is the list of upgradable contracts: ```sh ▶ grep -rl --exclude="I*" --exclude-dir="mocks" "function initialize" contracts contracts/SpotTradingRewardDistributor/SpotTradingRewardDistributor.sol contracts/TraderBalanceVault/TraderBalanceVault.sol contracts/PMXBonusNFT/PMXBonusNFT.sol contracts/ActivityRewardDistributor/ActivityRewardDistributor.sol contracts/PToken/PToken.sol contracts/PriceOracle/PriceOracle.sol contracts/WhiteBlackList/WhiteBlackListReferral/WhiteBlackListReferral.sol contracts/WhiteBlackList/WhiteBlackList/WhiteBlackList.sol contracts/LimitOrderManager/LimitOrderManager.sol contracts/KeeperRewardDistributor/KeeperRewardDistributor.sol contracts/Bucket/Bucket.sol contracts/LiquidityMiningRewardDistributor/LiquidityMiningRewardDistributor.sol contracts/DebtToken/DebtToken.sol contracts/Reserve/Reserve.sol contracts/ReferralProgram/ReferralProgram.sol contracts/PrimexDNS/PrimexDNS.sol contracts/BonusExecutor/FeeExecutor.sol contracts/BonusExecutor/FeeDecreaser.sol contracts/Treasury/Treasury.sol contracts/PositionManager/PositionManager.sol ```

Open the report
InfoGas Price Not Set For ArbitrumPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
Show 10 more
InfoGas Price Not Set For ArbitrumPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Gas price oracle was not set for Arbitrum, and defaultMaxGasPrice was used instead of it that caused incorrect min protocol fee and min position size calculations. We’ve added a wrapper contract on top of Arb gas price precompiles that returns gas price in the required format.

Open the report
InfoImpossible To Create Orders For Assets With Pull OraclesPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoImpossible To Create Orders For Assets With Pull OraclesPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:In createLimitOrder, there is a check that the expected position size is higher than minPositionSize. However this method dont include pullOracleData so it was impossible to create an order for assets with pull oracles.

Open the report
InfoImpossible To Execute Limit Orders Through PrimexUpkeepPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoImpossible To Execute Limit Orders Through PrimexUpkeepPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Executing a limit order through primexUpkeep is not possible as the method is not payable, and it cannot pay the Pyth pull oracle fee in the native token.

Open the report
InfoIncorrect Calculations For minFeeRestrictionsPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoIncorrect Calculations For minFeeRestrictionsPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Method getL1BaseLengthForTradingOrderType returned the sum of lengths for position opening and closing for limit orders that caused incorrect calculations of minProtocolFee for these actions separately.

Open the report
InfoIncorrect Fee In Health Calculation After UpgradePrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoIncorrect Fee In Health Calculation After UpgradePrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The positions opened before the upgrade paid the protocol fee at the moment of opening, and the fee from them is not taken again upon closing, but this fee was taken into account in the health calculation. A check was added to avoid it.

Open the report
InfoIncorrect Token Amount Used In Protocol Fee Calculation For Batch ClosingPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
Show 10 more
InfoIncorrect Token Amount Used In Protocol Fee Calculation For Batch ClosingPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:An incorrect token amount was used in the protocol fee calculation for batch closing, tokenOut and amountIn were used instead of tokenOut and amoutOut.

Open the report
InfoLack Of Event Emission In TraderBalanceVaultPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoLack Of Event Emission In TraderBalanceVaultPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The following functions do not emit relevant events after executing sensitive actions:withdrawFromincreaseLockedBalancetopUpAvailableBalance

Open the report
InfoLimit Orders Work Incorrectly Due To Fee StructurePrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoLimit Orders Work Incorrectly Due To Fee StructurePrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:After the changes in fee structure, limit orders created before the upgrade worked incorrectly - the fee associated with them was locked after the order execution or editing, also the order became unexecutable and unclosable after editing.

Open the report
InfominPositionSizeMultiplier MisinterpretationPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfominPositionSizeMultiplier MisinterpretationPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:We renamed minPositionSizeMultiplier to minPositionSizeAddend because the old name didn’t correspond to its meaning, and irrelevant restrictions were removed.

Open the report
InfoMissing Estimation Of minProtocolFee For LiquidationPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoMissing Estimation Of minProtocolFee For LiquidationPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Added a new method to Lens to calculate min protocol fee for liquidation.

Open the report
InfoMissing extraParams In OpenPositionDataPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
Show 10 more
InfoMissing extraParams In OpenPositionDataPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The OpenPositionData struct had no extraParams field in src/contracts/interfaces/IPrimexLens.sol

Open the report
InfoMissing protocolFeeCoefficient In minPositionSize CalculationPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoMissing protocolFeeCoefficient In minPositionSize CalculationPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The protocolFeeCoefficient was missed in minPositionSize calculation, but this coefficient is a part of min protocol fee, which defines the min position size.

Open the report
InfoMissing Reinitialization On SwapManager And BatchManager Due To UpgradePrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoMissing Reinitialization On SwapManager And BatchManager Due To UpgradePrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The initialize functions of SwapManager and BatchManager check the interfaces of the contracts they receive as parameters, including IPositionManagerV2 and IPriceOracleV2, which will be added with this upgrade. However, the initialize method was called before the upgrade of the PositionManager and PriceOracle contracts, causing the check to fail. To resolve this, the initialization was split into two steps, with the second step executed after the upgrade of these contracts.

Open the report
InfoMissing Revert Case For Uniswap v3 TWAP OraclePrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoMissing Revert Case For Uniswap v3 TWAP OraclePrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Add revert to Uni v3 TWAP oracle for the case if the pool is unavailable.

Open the report
InfoOverly Restrictive Requirement Leads To Failed Token SwapsPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoOverly Restrictive Requirement Leads To Failed Token SwapsPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:It was impossible to swap tokens through an arbitrary contract using DexAdapter.swapExactTokensForTokens as it required that the router had to be whitelisted. This restriction was removed.

Open the report
InfoParameter Name Mismatch In setPoolUpdateIntervalPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
Show 10 more
InfoParameter Name Mismatch In setPoolUpdateIntervalPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The setPoolUpdateInterval function in src/contracts/UniswapPriceFeed/UniswapPriceFeed.sol is designed to set poolUpdateInterval. However it will not work due to parameter name mismatch.

Open the report
InfoPossible Duplicate Assets In FlashloanPrimex Protocol Flash Loan Integration · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoPossible Duplicate Assets In FlashloanPrimex Finance · Resonance Security · 14 Oct 2024Fixed

The FlashLoanManager contract contains logic related to flashloans. Most notably - the flashLoan function used to initiated the loan. Among other arguments, this function takes two arrays - buckets and amounts which specify assets to be used in the flashloan. It was observed that the flashLoan function does not verify the uniqueness of entries in the buckets array. Hence, it is possible to use the same asset multiple times during the same flashloan. As a consequence, in this scenario the contract will need to perform additional cross-contract calls and use more memory for the execution which would be inefficient.

Open the report
InfoTransaction Fails Due To Price DifferencePrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoTransaction Fails Due To Price DifferencePrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:The borrowed amount for margin limit orders was calculated during the order execution based on the oracle prices. At the same time, keepers calculate the swap route before the transaction execution, and if the amountIn used in the route and the amount calculated in tx differs, the transaction fails. To fix it, we allowed keepers to set the borrowed amount, but we also check that the leverage of the opened position can’t differ from the leverage of the order for more than leverageTolerance percentage.

Open the report
InfoUniform Health Check During LiquidationPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoUniform Health Check During LiquidationPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:There is a difference in minProtocolFee calculation for single and batch position closing which leads to different health values and the liquidation price for the same position depending on the closing method.

Open the report
InfoUnnecessary Usage Of int256 On minPositionSizeMultiplierPrimex Finance - Primex Protocol Integrations · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
InfoUnnecessary Usage Of int256 On minPositionSizeMultiplierPrimex Finance · Resonance Security · 14 Oct 2024Fixed

The contract KeeperRewardDistributorStorageV2 implements the state variable minPositionSizeMultiplier as an int256. The usage of this state variable throughout the code assumes that it will always contain an unsigned integer. Therefore, various checks may be removed to optimize gas.

Open the report
InfoUpdated Admin RolesPrimex Finance - Primex Protocol Bug Review · Resonance Security · 14 Oct 2024Fixed

The report gives no description here.

Open the report
Show 10 more
InfoUpdated Admin RolesPrimex Finance · Resonance Security · 14 Oct 2024Fixed

Issue identified by Primex:Change admin roles for some methods.

Open the report
InfoConditions On supportsInterface() Can Be Switched To Save GasPrimex Finance · Resonance Security · 19 Oct 2023Fixed

Most supportsInterface() functions across the Primex protocol validate the base-most interfaceId. Due to both the inheritance nature of the Solidity language, and the short-circuiting capability of its logical operators, testing the base-most interface first is not optimal to save gas.

Open the report
InfoConditions On supportsInterface() Can Be Switched To Save GasPrimex Finance - Spot Margin Trading Protocol · Resonance Security · 19 Oct 2023Fixed

The report gives no description here.

Open the report
InfoDifferent Versions Of canBeFilled() Lead To Undefined BehaviourPrimex Finance · Resonance Security · 19 Oct 2023Fixed

The function canBeFilled() implements several versions used throughout different contracts of the Primex protocol. Using different versions of code for the same intended behaviour may lead to unexpected and/or inconsistent results.

Open the report
InfoDifferent Versions Of canBeFilled() Lead To Undefined BehaviourPrimex Finance - Spot Margin Trading Protocol · Resonance Security · 19 Oct 2023Fixed

The report gives no description here.

Open the report
InfoUnnecessary Validation Of _params On createBucket()Primex Finance · Resonance Security · 19 Oct 2023Fixed

The function createBucket() correctly validates _params.positionManager and _params.reserve. However, this validation is unnecessary since the same validation is being made inside the contract Bucket, therefore leading to a duplication of code and the increase of gas costs.

Open the report
InfoUnnecessary Validation Of _params On createBucket()Primex Finance - Spot Margin Trading Protocol · Resonance Security · 19 Oct 2023Fixed

The report gives no description here.

Open the report
InfoUsage Of Unlimited ApprovePrimex Finance · Resonance Security · 19 Oct 2023Fixed

The inclusion of unlimited approval in contracts increase potential attack surface.

Open the report
InfoUsage Of Unlimited ApprovePrimex Finance - Spot Margin Trading Protocol · Resonance Security · 19 Oct 2023Fixed

The report gives no description here.

Open the report
Informational`depositAndLock()` Not Directly Tied to a DepositPrimex Finance · Quantstamp · 18 Aug 2023Fixed

The `TraderBalanceVault.depositAndLock()` function allows the `VAULT_ACCESS_ROLE` to add any amount of any asset to any trader's locked balance. However, this function does not actually require that a deposit takes place, contrary to what the function name suggests.

Open the report
Show 7 more
Informational`increaseDeposit()` May Revert if No Swap Is PerformedPrimex Finance · Quantstamp · 18 Aug 2023Fixed

When increasing the deposit of a position through `PositionLibrary.increaseDeposit()`, the following check is performed: ``` _require(depositedAmountInBorrowed >= params.amountOutMin, ...) ``` However, this check will also be performed in case `params.asset == borrowedAsset`, meaning that no swap is executed. Therefore, this swap may revert if the user has provided `_amountOutMin` in `increaseDeposit(..)` of `PositionManager.sol` anyway.

Open the report
InformationalApplication Monitoring Can Be Improved by Emitting More EventsPrimex Finance · Quantstamp · 18 Aug 2023Fixed

In order to validate the proper deployment and initialization of the contracts, it is a good practice to emit events. Also, any important state transitions can be logged, which is beneficial for monitoring the contract, and also tracking eventual bugs or hacks. Below we present a non-exhaustive list of events that could be emitted to improve application management: 1. `Bucket.setReserveRate()` 1. `Bucket.setWithdrawalFee()` 1. `Bucket.setInterestRateStrategy()` 1. `PositionManager.setKeeperRewardDistributor()` 1. `PositionManager.setMinPositionSize()` 1. `PositionManager.setOracleTolerableLimitMultiplier()` 1. `Reserve.setTransferRestrictions()` 1. `PrimexDNS.setConditionalManager()` 1. `PrimexDNS.setPMX()` 1. `PrimexDNS.setProtocolRate` 1. `PrimexDNS.setProtocolRateInPMX` 1. `PrimexDNS.setAavePool()` 1. `PrimexDNS.activateBucket()` 1. `PrimexDNS.freezeBucket()` 1. `PrimexDNS.setDexAdapter()` 1. `PrimexDNS.activateDEX()` 1. `PrimexDNS.freezeDEX()` 1. `PriceOracle.updatePriceFeed()` 1. `PriceOracle.updateVolatilityFeed()` 1. `PriceOracle.setGasPriceFeed()` 1. `KeeperRewardDistributor.setDefaultMaxGasPrice()` 1. `KeeperRewardDistributor.setOracleGasPriceTolerance()` 1. `KeeperRewardDistributor.setMaxGasAmount` 1. `KeeperRewardDistributor.setPmxPartInReward()` 1. `KeeperRewardDistributor.setNativePartInReward()` 1. `KeeperRewardDistributor.setPositionSizeCoefficients()` 1. `KeeperRewardDistributor.setAdditionalGas()` 1. `SpotTradingRewardDistributor.decreaseRewardPerPeriod()` 1. `SpotTradingRewardDistributor.setRewardPerPeriod()` 1. `SpotTradingRewardDistributor.topUpAvailablePmxBalance()` 1. `SpotTradingRewardDistributor.withdrawPmx()` 1. `Treasury.setMaxSpendingLimit()` 1. `Treasury.decreaseLimits()` 1. `ReferralProgram.setReferrals()` 1. `DexAdapter.setQuoter()` 1. `DexAdapter.setDexType()` 1. `Redeemer.changeRate()` 1. `Redeemer.adminClaimEarlyTokens()` 1. `Redeemer.adminClaimRegularTokens()` 1. `SwapManager.setSwapRate()` 1. `SwapManager.setSwapRateInPmx()` 1. `PMXBonusNFT.setExecutor()` 1. `PMXBonusNFT.blockNFT()` 1. `PMXBonusNFT.unblockNFT()`

Open the report
InformationalInfinite Token ApprovalPrimex Finance · Quantstamp · 18 Aug 2023Fixed

Several contracts approves token infinitely for another contract. While we do not find any exploit from this, and the risk is mitigated as it is only approved to another contract within the protocol, it increase the risk surface as a vulnerability can cause the token on the approved contracts to be all taken away. We found the pattern in the following places: 1. `ActivityRewardDistributor.initialize()` 2. `Bucket.initialize()` 3. `LiquidityMiningRewardDistributor.initialize()` 4. `SpotTradingRewardDistributor.initialize()`

Open the report
InformationalUnclear Whether Native Currency Should Be Supported for SwappingPrimex Finance · Quantstamp · 18 Aug 2023Fixed

When swapping from the wallet through the `swap()` function, the input token `params.tokenA` can be `NATIVE_CURRENCY`. The current implementation does not accept `NATIVE_CURRENCY` when swapping directly from the wallet through the `TokenTransfersLibrary.doTransferFromTo()` function. However, the implementation accepts `NATIVE_CURRENCY` when using funds from the `traderBalanceVault.lockAsset()`. Nonetheless, the call to `PrimexPricingLibrary.multiSwap()` will eventually fail. However, it might be great to clarify whether native token should be supported or not and add the corresponding validation.

Open the report
InformationalUninitialized Implementation ContractPrimex Finance · Quantstamp · 18 Aug 2023Fixed

Leaving an implementation contract uninitialized poses a security risk. An uninitialized implementation contract can be exploited by attackers, potentially compromising the associated proxy. To mitigate this risk, it is recommended to invoke the `_disableInitializers()` function in the constructor during deployment (see: [OpenZeppelin doc](https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#initializing_the_implementation_contract)). This action will automatically lock the implementation contract, preventing any unauthorized usage. The following is the list of impacted contracts found with the `grep` command: ```sh ▶ grep -rl --include="*.sol" --exclude="I*.sol" --exclude-dir="mocks" "initializer" . ./SpotTradingRewardDistributor/SpotTradingRewardDistributor.sol ./TraderBalanceVault/TraderBalanceVault.sol ./PMXBonusNFT/PMXBonusNFT.sol ./ActivityRewardDistributor/ActivityRewardDistributor.sol ./PToken/PToken.sol ./PriceOracle/PriceOracle.sol ./WhiteBlackList/WhiteBlackListReferral/WhiteBlackListReferral.sol ./WhiteBlackList/WhiteBlackList/WhiteBlackList.sol ./LimitOrderManager/LimitOrderManager.sol ./KeeperRewardDistributor/KeeperRewardDistributor.sol ./Bucket/Bucket.sol ./LiquidityMiningRewardDistributor/LiquidityMiningRewardDistributor.sol ./DebtToken/DebtToken.sol ./Reserve/Reserve.sol ./ReferralProgram/ReferralProgram.sol ./PrimexDNS/PrimexDNS.sol ./BonusExecutor/FeeDecreaser.sol ./Treasury/Treasury.sol ./PositionManager/PositionManager.sol ```

Open the report
InformationalUnresolved `TODO`Primex Finance · Quantstamp · 18 Aug 2023Fixed

The `PrimexPricingLibrary.getLiquidiationPriceByOrder()` function has an unresolved `TODO` stating: "This function is only used in tests. Maybe it can be removed."

Open the report
InformationalUsing Deprecated FunctionPrimex Finance · Quantstamp · 18 Aug 2023Fixed

The function `AccessControl._setupRole()` has been [deprecated](https://docs.openzeppelin.com/contracts/4.x/api/access#AccessControl-_setupRole-bytes32-address-) in favor of `AccessControl._grantRole()`, which performs the same operations.

Open the report

Contracts

No deployed address is recorded for these audits.

The reports name a repository or files. Open a report to see its scope.

The repositories and files the reports name

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="primex-finance"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

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