id
int64
1
23.6k
file_name
large_stringlengths
6
72
bug_title
large_stringlengths
3
476
bug_desc
large_stringlengths
10
57.4k
bug_poc
large_stringlengths
3
84.2k
bug_rec
large_stringlengths
1
36.7k
bug_sev
large_stringclasses
8 values
bug_sev_raw
large_stringclasses
55 values
bug_weight
float64
0
1
bug_full
large_stringlengths
1.31k
5.12k
1
1.json
Same Execution fee is used for different Settlement tokens Submitted by Aamirusmani1552, also found by BengalCatBalu
As per the sponsors, any ERC20 could be used as a settlement token. But in the ExecutionFeeHandler, the max execution fee is set to 1e7 which is in USDC token. And there is no way to update this fee. That means, if some other token except USDC is used as a settlement token, the protocol will only be able to charge upto...
```solidity // SPDX-License-Identifier: BUSL pragma solidity 0.8.19; // 3rd-party - interfaces import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol"; // 3rd-party - contract import { Test } from "forge-std/Test.sol"; import { WETH } from "solmate/tokens/WETH.sol"; import { MockERC20 } from "solmate/test/utils/m...
It is recommended to make the execution fee dynamic. Either make the execution fee variable updatable, or add a mapping for different tokens corresponding to their fees.
Medium
Medium Risk
0.5255
The vulnerability concerns the way the protocol calculates and enforces the execution fee for actions that can be settled with any ERC‑20 token. The ExecutionFeeHandler contains a hard‑coded maximum fee of 1e7, a value that was chosen for USDC (which has 6 decimals). Because this constant is not tied to the specific se...
2
11.json
When calling _recalfs from dctstake, the calculated fs may be incorrect Submitted by cccz
When _reCalFs is called from dctStake, maxEarning may be stale. This is because if the poolOwner has unshared earnings that have not yet been counted into maxEarning, then the actual maxEarning will be larger than the current one. ```solidity function shareCommission( address account_ ) public { uint amount =...
no poc
It is recommended to call shareCommission before calling _reCalFs to pull the latest maxEarning: ```solidity } else { { require(account_ == poolOwner_, "can only stake DCT for yourself"); uint aLock = _lock(isEth_, poolOwner_, duration_); powerMinted = LHelper.calMintStakingPower( ...
Medium
Medium Risk
0.5606
The vulnerability concerns an inconsistent accounting flow between the shareCommission routine and the _reCalFs function that is invoked after a DCT stake operation. In the contract, shareCommission updates two critical state variables for a pool owner: the amount of earnings that have already been distributed (_shared...
3
12.json
Strengthened Group Index Validation in Friend3V2
The Friend3 protocol allows for customized creation of a new group and each group has its own group index. The group index starts from 1 and will be increased by 1 for each group creation. While examining the logic to examine the validity of a given group index, we notice the current implementation can be improved....
no poc
Improve the above isValidIndex() by additionally check the given groupIndex is a non-zero number.
Low
Low
0.2566
The vulnerability resides in the index validation logic of the Friend3 protocol’s group management functions. The protocol assigns a unique, sequential group index starting at 1 for each newly created group, and stores the latest index in a global variable. The fetchGroup function is supposed to protect callers from re...
4
13.json
Reentrancy Risk in Pool::invest()
A common coding best practice in Solidity is the adherence of checks-effects-interactions principle. This principle is effective in mitigating a serious attack vector known as re-entrancy. Via this particular attack vector, a malicious contract can be reentering a vulnerable contract in a nested manner. Specifically,...
no poc
Apply necessary reentrancy prevention by utilizing the nonReentrant modifier to block possible re-entrancy.
Low
Low
0.2989
The vulnerability resides in the invest() function of a pool contract that accepts ERC20 deposits and distributes pool tokens. The function performs an external call to the token contract's safeTransferFrom method before it updates the pool's internal accounting variables, such as the total raised amount, the raised ba...
5
14.json
Incompatibility With Deflationary Tokens
As mentioned in Section 3.1, in the Formless protocol, the Pool contract allows users to invest ERC20 tokens to get another kind of tokens. The investor can withdraw amounts that have been invested at any time. In particular, one interface, i.e., invest(), accepts asset transfer-in and records the raised balance. A...
no poc
Check the balance before and after the safeTransfer() or safeTransferFrom() call to ensure the book-keeping amount is accurate.
Low
Low
0.2993
The vulnerability stems from an implicit assumption in the pool contract that all ERC20 tokens behave according to the standard interface where a transfer of a given amount results in exactly that amount being moved. The contract’s invest() and withdraw() functions rely on safeTransferFrom() and safeTransfer() to move ...
6
15.json
Improved Logic of Amount Calculation In withdraw()
As mentioned before, the Formless protocol allows users to invest ERC20 tokens to swap tokens provided by the IDO creator. The creator can withdraw the raised amount any time, and the left amounts remain on the Pool contract. While examining the related logic, we notice an issue in current implementation. To elaborate,...
no poc
Improve the calculation logic for the amount variable inside the withdraw() routine.
Low
Low
0.283
The vulnerability resides in the withdraw() function of the IDO pool contract, where the amount of tokens to be transferred to the pool creator is derived directly from the caller‑supplied parameter `exact` without adequate validation against the pool's internal accounting variable `_raisedBalance`. The root cause is a...
7
17.json
Accommodation of Non-ERC20-Compliant Tokens
Though there is a standardized ERC-20 specification, many token contracts may not strictly follow the specification or have additional functionalities beyond the specification. In the following, we examine the transfer() routine and related idiosyncrasies from current widely-used token contracts. In particular, we us...
no poc
Accommodate the above-mentioned idiosyncrasy about ERC20-related transfer()/transferFrom()/approve().
Low
Low
0.4069
The vulnerability originates from the protocol’s reliance on raw ERC‑20 transfer and transferFrom calls that return a boolean status instead of reverting on failure. The FlashProtocol stake function invokes IERC20C.transferFrom without checking the returned value, assuming that the call will either succeed or revert. H...
8
18.json
Invalid Slippage Control in FlashProtocol::flashStake()
The FlashProtocol contract provides a public stake() function for users to stake principal tokens and mint the corresponding amount of fToken to the users. The users-staked funds are transferred to the FlashStrategy to earn yields. The fToken can be burned by the stakers to claim yields earned by the FlashStrategy. To ...
no poc
Develop an effective mitigation to the above front-running attack to better protect the interests of users.
Medium
Medium
0.4601
The FlashProtocol contract implements a flashStake() function that combines staking, minting of fTokens, and immediate burning of those fTokens to claim yield in a single transaction. The routine queries the expected yield by calling IFlashStrategy(_strategyAddress).quoteBurnFToken() before approving the strategy to sp...
9
19.json
Improved Validation Of Function Arguments
In the FireBirdRouter contract, we observe the _swapSingleSupportFeeOnTransferTokens() function is used to swap the exact amount of tokenIn to tokenOut. To elaborate, we show below the related code snippet. In the function, the FireBirdFormula::getFactoryReserveAndWeights() function is called (line 460) to acquire the ...
no poc
Validate whether the token address is in the pair at the beginning of the functions.
Medium
Medium
0.4597
The vulnerability resides in a set of helper functions used by the FireBirdRouter contract to obtain pool state information for token swaps. Specifically, the function that retrieves the reserves and weight parameters of a pair, referred to as getFactoryReserveAndWeights, assumes that the caller‑supplied token address ...
10
2.json
Rejected deposit transaction to DepositHandler will cause the funds stuck in the Vault Submitted by Aamirusmani1552, also found by KupiaSec, Roberto, BengalCatBalu, silverologist, aua-oo7, Bigsam, 0xEllipticCurve, CasinoCompiler, ZoA and zxriptor
When User calls the Vault::deposit(...) function, his assets are transferred to the Vault and requestId is generated for the deposit that will be used to increase his collateral: ```solidity function deposit(address _tokenAddress, bytes32 _subaccount, uint256 _amount) external payable nonReentrant onlyAcceptedToken(_...
```solidity // SPDX-License-Identifier: BUSL pragma solidity 0.8.19; // 3rd-party - interfaces import { IERC20 } from "@openzeppelin/token/ERC20/IERC20.sol"; // 3rd-party - contract import { Test } from "forge-std/Test.sol"; import { WETH } from "solmate/tokens/WETH.sol"; import { MockERC20 } from "solmate/test/utils/m...
It is recommended to add the emergence withdraw function, or give the user access to generate new requests to withdrawal separately.
Medium
Medium Risk
0.7601
The vulnerability arises in the deposit‑withdraw workflow of the Vault contract. When a user calls Vault.deposit(...), the contract first transfers the requested token amount to the Vault and immediately generates a requestId that will later be used to increase the user’s collateral in the AssetService. The transfer is...
11
20.json
Potential DoS With Permission-Based Operations
The FireBirdERC20 contract implements the EIP2612 specification by providing the permit() support. This specification is proposed to address a limiting factor in the earlier ERC20 design where the ERC20 approve() function itself is defined in terms of msg.sender. This EIP-2612 specification basically extends the ERC2...
no poc
The severity of this issue is still undetermined as it largely depends on the context of being used. Fortunately, there is an alternative version without making use of the Permit feature.
Unknown
Undetermined
0.4079
The vulnerability stems from the interaction between the ERC‑20 permit functionality (EIP‑2612) and the router's liquidity‑removal routine that relies on a signed permit to set an allowance before burning liquidity tokens. The permit function consumes a per‑owner nonce each time it is called; this nonce is incremented ...
12
2023-05-maia_H-04_chunk_1.json
`MIN_FALLBACK_RESERVE`
`anyFallback` method is called by the `Anycall Executor` on the source chain in case of a failure of the function `anyExecute` on the root chain. The user has to pay for the execution gas cost for this, which is done at the end of the call. However, if there is not enough `depositedGas`, the `anyFallback` method will b...
`MIN_FALLBACK_RESERVE` is safe enough. _Note: estimation doesn’t consider`anyExec` method’s actual cost._ * `Foundry.toml` [profile.default] solc = '0.8.17' src = 'solidity' test = 'solidity/test' out = 'out' libs = ['lib'] fuzz_runs = 1000 optimizer_runs = 10_000 * `.git...
Increase the `MIN_FALLBACK_RESERVE` by `115_000` to consider the `anyExec` method in `AnyCall`. So `MIN_FALLBACK_RESERVE` becomes `300_000` instead of `185_000`. Additionally, calculate the gas consumption of the input data passed and add it to the cost. This should be done when the call was made in the first place. ...
High
High
0.6077
The vulnerability stems from an under‑funded gas reserve used to pay for the anyFallback routine in the BranchBridgeAgent contract. The constant MIN_FALLBACK_RESERVE is defined as 185 000 gas units, a value that was chosen based on an approximate execution overhead for the fallback path. When a cross‑chain call fails o...
13
2023-05-maia_H-16_chunk_1.json
Overpaying remaining gas to the user for failing `anyExecute` call due to an incorrect gas unit calculation in `BranchBridgeAgent`
The `anyExecute` method is called by the `Anycall Executor` on the destination chain to execute interaction. The user has to pay for the remote call `ExecutionGas`; this is done at the end of the call. However, if there is not enough `gasRemaining`, the `anyExecute` will be reverted due to a revert caused by the `Anyca...
This PoC is independent from the codebase (but uses the same code). There are two contracts simulating `BranchBridgeAgent.anyExecute`: 1. **`BranchBridgeAgent`** \- which has the code of the pre-first gas checkpoint and the post-last gas checkpoint. 2. **`BranchBridgeAgentEmpty`** \- which has the code of the pre-...
Increase the `MIN_EXECUTION_OVERHEAD` by: * `20_000` for `RootBridgeAgent.anyExecute`. * `110_000` for `anyExec` method in `AnyCall`. `20_000 + 110_000 = 130_000` So `MIN_EXECUTION_OVERHEAD` becomes `290_000` instead of `160_000`. Additionally, calculate the gas consumption of the input data passed then add it ...
High
High
0.5955
The vulnerability is an incorrect gas‑budget calculation inside the BranchBridgeAgent’s _payExecutionGas routine, which handles the reimbursement of gas after a cross‑chain anyExecute call. The contract records the amount of native token (WETH) deposited as a gas budget, then attempts to compute the minimum execution c...
14
2023-07-tapioca_H-54_chunk_1.json
Anybody can buy collateral on behalf of other users without having any allowance using the multiHopBuyCollateral
* Malicious actors can buy collateral on behalf of other users without having any allowance to do so. * No unauthorized entity should be allowed to take borrows on behalf of other users.
* The [`SGLLeverage::multiHopBuyCollateral()`](https://github.com/Tapioca-DAO/tapioca-bar-audit/blob/2286f80f928f41c8bc189d0657d74ba83286c668/contracts/markets/singularity/SGLLeverage.sol#L21-L56) function allows users to level up cross-chain: Borrow more and buy collateral with it, the function receives as parameters ...
* Make sure to validate that the caller has enough allowance to take the borrow specified by the `borrowAmount`. * Use the returned amount `borrowShare` from the `_borrow()` to validate if the caller has enough allowance to take that borrow. function multiHopBuyCollateral( address from, uint256 c...
High
High
0.5166
The vulnerability resides in the multiHopBuyCollateral() entry point of the SGLLeverage contract. The function is designed to let a caller add collateral and simultaneously borrow USDO in a single transaction. It correctly verifies that the caller holds enough allowance to transfer the requested collateral shares, but ...
15
2023.03.03 - Final - Optimism Bedrock Audit Report_chunk_16_chunk_1.json
Withdrawal transactions can get stuck if out-
Withdrawal transactions may never be executed if the L2 output root for the block, for which the withdrawal was proven, is challenged and reproposed. Withdrawal transactions can be reproven in the case that the output root for their previously proven output index has been updated. This can happen if the L2 output root ...
no poc
Loosen the restriction of reproving: Allow reproving under a new L2 output index whenever the output root of the proven output index changes. This still balances the other concern of malicious users reproving transactions to reset the withdrawal countdown well as in the case where the output root changed, the withdrawa...
Medium
Medium
0.3097
The vulnerability consists of a situation where a withdrawal that has been proven on Optimism can become permanently unfinalizable when the L2 output root associated with the block that originally contained the withdrawal is later challenged and replaced. In the Optimism design, a withdrawal is first proven by referenc...
16
2023.06.04 - Final - GMX Update Audit Report_chunk_8_chunk_1.json
PositionUtils.validatePosition() usesisIncrease
PositionUtils.validatePosition() uses isIncrease instead of false when calling isPositionLiquidatable(), making it not work properly for the case of isIncrease = true. The main problem is that when calling isPositionLiquidatable(), we should always consider decreasing the position since we are proposing a liquidation t...
no poc
Pass false always to isPositionLiquidatable(): function validatePosition( DataStore dataStore, IReferralStorage referralStorage, Position.Props memory position, Market.Props memory market, MarketUtils.MarketPrices memory prices, bool isIncrease, bool shouldValidateMinPositionSize, bool shouldValidateMinCollateralUsd ) ...
Medium
Medium
0.28
The vulnerability resides in the position validation routine of the protocol. The function PositionUtils.validatePosition is responsible for ensuring that a trader's position respects collateral limits, minimum size requirements and, crucially, that the position is not already liquidatable. To determine liquidatability...
17
2024-01-renft_H-02_chunk_1.json
An attacker is able to hijack any ERC721 / ERC1155 he borrows because guard is missing validation on the address supplied to function call `setFallbackHandler
1. Gnosis safe fallback handlers : Safes starting with version 1.1.1 allow to specify a fallback handler. A gnosis safe fallback handler is a contract which handles all functions that is unknown to the safe, this feature is meant to provide a great flexibility for the safe user. The safe in particular says “If I see so...
To run the PoC, you’ll need to do the following: 1. You’ll need to add the following two files to the test/ folder: 1. `SetupExploit.sol` -> Sets up everything from seaport, gnosis, reNFT contracts 2. `Exploit.sol` -> The actual exploit PoC which relies on `SetupExploit.sol` as a base. 2. You’ll need to...
In the guard, check if the TX is a call to the function `setFallbackHandler()`. If it is, then ensure that the address supplied to that function is not an address of an actively rented ERC721/1155 token. Additionally, if the borrower rents a new token, ensure that the already set fallback handler address isn’t the same...
High
High
0.6235
The vulnerability is a missing validation in the reNFT custom transaction guard that protects rental Gnosis Safe wallets. The guard inspects the function selector of every transaction sent from a rental safe and blocks calls that match a known list of dangerous signatures, such as token transfer and approval functions....
18
2024-01-renft_H-03_chunk_1.json
An attacker can hijack any ERC1155 token he rents due to a design issue in reNFT via reentrancy exploitation
1. Gnosis safe fallback handlers : Safes starting with version 1.1.1 allow to specify a fallback handler. A gnosis safe fallback handler is a contract which handles all functions that is unknown to the safe, this feature is meant to provide a great flexibility for the safe user. The safe in particular says “If I see so...
1. The attacker will create a custom fallback handler contract which will contain an implementation of the `onERC1155Receive()` function, which will be triggered by the Seaport Conduit when it conducts the token swap and moves the lender’s NFT tokens to the borrower’s safe. The implementation of the `onERC1155Receive()...
No recommendation
High
High
0.6149
The vulnerability is a re‑entrancy design flaw in the reNFT rental protocol that allows an attacker to hijack any ERC1155 token that is rented through a Gnosis Safe borrower wallet. The protocol’s execution flow first transfers the lender’s ERC1155 token from the Conduit to the borrower’s Safe using the standard ERC115...
19
2024-01-renft_H-05_chunk_1.json
Malicious actor can steal any actively rented NFT and freeze the rental payments
The main exploit presented in this report takes advantage of multiple bugs. Some of these bugs on their own can be viewed as having their own “lesser” impacts. However, this report can be considered as my demonstration of the `greatest impact` for all the bugs described below: 1. The `stopRent`/`stopRentBatch` funct...
In order to provide more context for the PoC provided below, I will detail the steps that are occuring in the PoC: 1. Two orders are created (these will act as our victim orders). One will be for an ERC721 token and the other will be for an ERC1155 token. 2. Our `attackerContract` is created. 3. `x` amount of we...
By addressing the non-compliant EIP-712 functions we can mitigate the main exploit path described in this report. I would suggest the following changes: diff --git a/./src/packages/Signer.sol b/./src/packages/Signer.sol index 6edf32c..ab7e62e 100644 --- a/./src/packages/Signer.sol +++ b/./src/packa...
High
High
0.659
The vulnerability consists of a combination of three contract flaws that together enable a malicious actor to steal any NFT that is currently rented through the protocol and to freeze the associated rental payments. The first flaw is that the `stopRent` and `stopRentBatch` functions only validate three fields of the su...
20
2024-01-renft_H-07_chunk_1.json
Attacker can lock lender NFTs and ERC20 in the safe if the offer is set to partial
If the lender creates an offer set to partial, the attacker can lock parts of the lender’s assets inside the attacker’s safe.
When reNFT zone validates the offer and create the rental, it will calculate order hash using `_deriveRentalOrderHash`, and add the rentals by calling `STORE.addRentals` to storage using the calculated hash. function _rentFromZone( RentPayload memory payload, SeaportPayload memory seapo...
Introduce nonce when calculating orderHash, to ensure every order will always unique. > The PR [here](https://github.com/re-nft/smart-contracts/pull/10) \- Prevents `RentPayload` replayability and ensures that orders must be unique by disallowing partial orders from seaport.
High
High
0.4923
The flaw resides in the rent‑order creation logic of the reNFT protocol. When a lender creates an offer that allows partial fills, the contract computes a deterministic order identifier (orderHash) by hashing a static set of fields – the Seaport order hash, the list of item hashes, hook hashes, timestamps and other ord...
21
2024-01-renft_M-01_chunk_1.json
A malicious lender can freeze borrower’s ERC1155 tokens indefinitely because the guard can’t differentiate between rented and non-rented ERC1155 tokens in the borrower’s safe.
1. Gnosis safe guards: A gnosis guard is a contract that acts as a transaction guard which allows the owner of the safe to limit the contracts and functions that may be called by the multisig owners of the safe. ReNFT has created it’s own gnosis guard contract, which is [Guard.sol](https://github.com/re-nft/smart-contr...
1. The borrower, Jack, has 1,000 ERC1155 tokens of id 5 that are not rented. 2. Jack decides to lend 10 ERC1155 tokens of same id, 5, from Alice (malicious lender). Rental period will last 10 days. 3. Alice (malicious smart contract lender) sets a `onERC1155Receive()` hook which reverts if certain time has not pass...
No recommendation
Medium
Medium
0.4414
The vulnerability is a logical flaw in the reNFT Gnosis Safe guard that governs ERC1155 token transfers. The guard intercepts calls to the ERC1155 `safeTransferFrom` selector and checks whether the token is currently rented, but it does not distinguish between tokens of the same contract address and token ID that are p...
22
2024-01-renft_M-02_chunk_1.json
A malicious borrower can hijack any NFT with `permit
1. ERC-4494: Permit for ERC-721 NFTs : ERC721-Permit is very similar to ERC20-permit (EIP-2612). ERC721 Permit adds a new `permit()` function. It allows user can sign an ERC721 approve transaction off-chain producing a signature that anyone could use and submit to the permit function. When permit is executed, it will e...
To run the PoC, you’ll need to do the following: 1. You’ll need to add the following two files to the test/ folder: 1. `SetupExploit.sol` -> Sets up everything from seaport, gnosis, reNFT contracts 2. `Exploit.sol` -> The actual exploit PoC which relies on `SetupExploit.sol` as a base. 2. You’ll need to...
No recommendation
Medium
Medium
0.4414
The vulnerability is a permission‑escalation bug that stems from ReNFT’s failure to recognise the ERC‑721 `permit()` function defined in the ERC‑4494 standard. ReNFT assumes that the owner of an NFT is a simple externally‑owned account (EOA) and that all approvals are performed on‑chain via the traditional `approve()` ...
23
2024-07-loopfi_H-15_chunk_1.json
Directly sending dust token amount will slow down distribution in `MultiFeeDistribution.sol`
While sending a small amount and calling `getReward` is a typical example of griefing which is normally considered Medium. Given the low cost of the attack and that no specific external conditions need to be met as well as the high impact for all the users of the protocol I consider it High severity.
The `_getReward` function in `MultiFeeDistribution.sol` will call `_notifyUnseenReward` which will execute the following: uint256 unseen = IERC20(token).balanceOf(address(this)) - r.balance; if (unseen > 0) { _notifyReward(token, unseen); } If a small amoun...
`_notifyUnseenReward` should not be in functions without access control for trusted protocol roles, as griefing would always be possible. If you still want the unseen amount to be updated frequently consider value-weighted time additions to the vesting. > Requesting a PoC (coded) to evaluate the risk based on real num...
High
High
0.5447
The MultiFeeDistribution contract contains a reward‑rate manipulation flaw that allows any participant to slow down the distribution of rewards by sending a tiny amount of the reward token directly to the contract and then invoking the public getReward function. The root cause is the internal function _notifyUnseenRewa...
24
2024.08.05 - Final - MakerDAO Endgame Audit Report_chunk_1_chunk_1.json
An attacker can exploit LSUrn address colli-
An attacker can use brute force to find a collision between a new urn address (dependent solely on msg.sender) and an EOA controlled by the attacker. While this currently costs between $1.5 million and several million dollars (detailed in "Vulnerability Details"), the cost is decreasing, making the attack more feasible...
1. Create test/ALockstakeEngine.sol in the root project directory. // SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.8.21; import "../dss-flappers/lib/dss-test/src//DssTest.sol"; import "../dss-flappers/lib/dss-test/lib/dss-interfaces/src/Interfaces.sol"; import { LockstakeDeploy } from "../lockstake/dep...
• Prevent users from controlling the salt, including using msg.sender. • Additionally, consider combining and encoding block.prevrandao with msg.sender. This approach will make finding a collision practically impossible within the short timeframe that prevrandao is known.
Informational
Informational
0.0965
The vulnerability is an address‑collision attack on the LockstakeUrn (LSUrn) creation logic of the MakerDAO Endgame system. The LSUrn address is derived only from the caller’s address (msg.sender) as a salt, which means an attacker can deliberately choose a private key so that the contract address generated for a new L...
25
2025-06-10-cyfrin-bunni-v2.1_001_chunk_1.json
Pools configured with a malicious hook can bypass the `BunniHub` re-entrancy guard to drain all raw balances and vault reserves of legitimate pools
** The `BunniHub` is the main contract that both holds and accounts the raw balances and vault reserves that each pool has deposited. It inherits `ReentrancyGuard` which implements the `nonReentrant` modifier: ```solidity modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } functio...
** To run the following PoCs: * Add the following malicious vault implementation inside `test/mocks/ERC4626Mock.sol`: ```solidity interface MaliciousHook { function continueAttackFromMaliciousVault() external; } contract MaliciousERC4626 is ERC4626 { address internal immutable _asset; MaliciousHook intern...
** The root cause of the attack was the ability to disable the intended global re-entrancy protection by invoking `unlockForRebalance()` which was subsequently disabled. One solution would be to implement the rebalance re-entrancy protection on a per-pool basis such that one pool cannot manipulate the re-entrancy guard...
High
High
1
The vulnerability resides in the BunniHub contract, which is the central accounting component for raw token balances and vault reserves of every Bunni pool. BunniHub inherits OpenZeppelin's ReentrancyGuard and protects its external functions with the nonReentrant modifier, which uses a single transient storage slot (ST...
26
21.json
Accommodation Of Possible Non-Compliant ERC20 Tokens
Though there is a standardized ERC-20 specification, many token contracts may not strictly follow the specification or have additional functionalities beyond the specification. In this section, we examine the transfer() routine and possible idiosyncrasies from current widely-used token contracts. In particular, we us...
no poc
Accommodate the above-mentioned idiosyncrasy about ERC20-related transfer().
Low
Low
0.4066
The vulnerability originates from the reliance on the ERC‑20 transfer() function behaving exactly as the standard defines – namely, that a call either reverts on failure or returns a boolean true indicating success. In practice, many deployed token contracts deviate from this specification. Some tokens, such as ZRX, im...
27
22.json
Proper StakingEIP20::deposit() Logic
The Demeter protocol provides incentive mechanisms that reward the staking of supported assets. The rewards are carried out by designating specific staking pools into which supported assets can be staked. And staking users are rewarded in proportional to their share of LP tokens in the reward pool. While examining the ...
no poc
Revise the above deposit() function to properly apply the global accruedRewardHeight to the user-specific state.
Low
Low
0.2813
The vulnerability lies in the initialization of the per‑account reward accrual height inside the StakingEIP20 contract’s deposit() function. When the first user makes a global deposit – i.e., totalDepositQuantity equals the amount being deposited and the protocol‑wide accruedRewardHeight is still zero – the contract se...
28
23.json
Unsafe Ownership Transition
In DeFi Yield Protocol, the Owned contract is used for ownership management in Staking contract. When the contract owner needs to transfer the ownership to another address, she could invoke the transferOwnership() function with a newOwner address. ```solidity function transferOwnership(address newOwner) onlyOwner ...
no poc
Implement a two-step ownership transfer mechanism that allows the new owner to claim the ownership by signing a transaction. An example is shown below: ```solidity function transferOwnership( address newOwner ) external onlyOwner { require(newOwner != address(0), "Owned: Address must not be null"); ...
Low
Low
0.3712
The vulnerability concerns the method used to change the privileged account in a DeFi staking contract. The contract implements a single‑step ownership transfer function that, after verifying the supplied address is not the zero address, immediately overwrites the stored owner variable with the new address and emits an...
29
24.json
Missed Sanity Check in Governance::noContractsAllowed()
In DeFi Yield Protocol, the Staking contract allows users to stake Uniswap LP Tokens to receive WETH and DYP tokens as rewards. And the Governance contract manages proposals for staking pools. In order to reduce the risks of the contract being attacked by malicious users, the key functions in these two contracts use no...
no poc
Ensure the msg.sender is the same as tx.origin. ```solidity modifier noContractsAllowed() { require(!address(msg.sender).isContract() && tx.origin == msg.sender, "No Contracts Allowed!"); } ```
Low
Low
0.4754
The vulnerability concerns a sanity check that is meant to block smart contracts from directly invoking privileged functions in the Staking and Governance contracts of the DeFi Yield Protocol. The contracts use a modifier called noContractsAllowed, which relies on the isContract helper that reads the size of the code s...
30
25.json
Trust Issue of Admin Keys
In the DeFiAi protocol, there are certain privileged accounts, i.e., owner. When examining the related contracts, we notice an inherent trust on these privileged accounts. For example, this owner account plays a critical role in governing and regulating the system-wide operations (e.g., configure various settings). It ...
no poc
Make the list of extra privileges granted to owner explicit to the protocol users.
Low
Low
0.271
The vulnerability concerns an excessive trust placed in a single privileged account, commonly referred to as the owner or governance address, within the DeFiAi protocol. This admin key is granted the ability to invoke functions that modify critical protocol parameters, such as adding new pools, configuring the associat...
31
26.json
Accommodation of Non-ERC20-Compliant Tokens
Though there is a standardized ERC-20 specification, many token contracts may not strictly follow the specification or have additional functionalities beyond the specification. In this section, we examine the approve() routine and analyze possible idiosyncrasies from current widely-used token contracts. In particular, ...
no poc
Accommodate the above-mentioned idiosyncrasy about ERC20-related approve()/transfer()/transferFrom().
Low
Low
0.4069
The vulnerability stems from an implicit assumption that all ERC‑20 tokens strictly follow the standard approve() behaviour, where a spender can be granted a new allowance without first resetting the previous one. Certain widely used tokens, most notably USDT, deviate from the specification: their approve() implementat...
32
27.json
Trust Issue of Admin Keys
In the DCAv2 protocol, there is a privileged admin account (with the role of TIME_LOCKED_ROLE) that plays a critical role in governing and regulating the protocol-wide operations (e.g., configuring various system parameters). It also has the privilege to control or govern the flow of assets managed by this protocol. Ou...
no poc
Promptly transfer the privileged account to the intended DAO-like governance contract. All changed to privileged operations may need to be mediated with necessary timelocks. Eventually, activate the normal on-chain community-based governance life-cycle and ensure the intended trustless nature and high-quality distribut...
Medium
Medium
0.4577
The DCAv2 protocol grants a single externally owned account (EOA) the TIME_LOCKED_ROLE, which authorises it to call privileged configuration functions such as setSwapFee, setLoanFee and setPlatformFeeRatio. This privileged account can arbitrarily modify protocol‑wide parameters that directly affect the cost and distrib...
33
28.json
Improved Logic For Permission Accounting
The DCAv2 protocol has a key DCAPermissionsManager contract that is designed to manage various token-related permissions. While examining its logic, we notice it maintains the timestamp when a specific permission is assigned. Combined with the timestamp upon the creation or ownership transfer of an ERC721 token, the pr...
no poc
Properly keep track of the lastOwnershipChange timestamp for each minted tokenID.
Low
Low
0.2668
The DCAv2 protocol relies on the DCAPermissionsManager contract to keep a per‑token record of the moment when ownership last changed. This timestamp, stored in the mapping lastOwnershipChange, is used by the permission‑accounting logic to automatically revoke permissions that were granted by a previous owner once the t...
34
29.json
Trust Issue of Admin Keys
In the DarkNess Dollar protocol, there are two privileged accounts, i.e., owner and strategist. These accounts play a critical role in governing and regulating the system-wide operations (e.g., add/remove a pool to/from the Treasury, pause/unpause minting/redeeming from an existing pool, update the targetCollateralRati...
no poc
Promptly transfer the privileged account to the intended DAO-like governance contract. All changed to privileged operations may need to be mediated with necessary timelocks. Eventually, activate the normal on-chain community-based governance life-cycle and ensure the intended trustless nature and high-quality distribut...
Medium
Medium
0.4647
The DarkNess Dollar protocol relies on two privileged accounts – an owner and a strategist – to perform critical administrative actions such as adding or removing liquidity pools, updating oracle addresses, changing fee structures, and modifying protocol‑wide parameters. This centralisation creates a trust issue becaus...
35
3.json
Deposit transactions / events may mixed in case of chain re-org and lead to double deposit Submitted by BengalCatBalu
Let's take a look at how transaction control is performed. When Deposit is called in Vault: ```solidity emit LogDeposit(_requestId, _subaccount, _tokenAddress, _amount); ``` The requestId is responsible for identifying the transaction. Then, in the depositHandler, each requestId is processed as follows: ```solidity...
no poc
Add a protection mechanism for such cases, at least check on deposit handler, that requestId was generated.
Medium
Medium Risk
0.5933
The vulnerability concerns the way deposit transactions are identified and processed across two contracts – a Vault contract that emits a LogDeposit event with a requestId, and a separate DepositHandler that consumes that requestId to adjust collateral. The handler stores a simple boolean flag isProcessed[requestId] to...
36
30.json
Potential Sandwich/MEV Attack In CollateralReserve::_sellSharesToUsdc()
While examining the CollateralReserve contract, we notice there is one function that can be improved with slippage control. To elaborate, we show below the related code snippet of the CollateralReserve contract. According to the design, the _sellSharesToUsdc() function is used to swap share to USDC. In the function, th...
no poc
Improve the above-mentioned function by adding necessary valid slippage control.
Low
Low
0.2707
The vulnerability resides in a token‑to‑USDC swap routine that lacks any meaningful slippage protection. In the CollateralReserve contract the internal function _sellSharesToUsdc() calls UniswapV2Router.swapExactTokensForTokens with the second argument amountOutMin hard‑coded to 1. This means the contract accepts any a...
37
31.json
Trust Issue of Admin Keys
In the DarkCrypto protocol, there is a special administrative account, i.e., Operator. This Operator account plays a critical role in governing and regulating the system-wide operations (e.g., setting protocol-wide parameters, etc.). It also has the privilege to control or govern the flow of assets managed by this prot...
no poc
Promptly transfer the privileged account to the intended DAO-like governance contract. All changed to privileged operations may need to be mediated with necessary timelocks. Eventually, activate the normal on-chain community-based governance life-cycle and ensure the intended trustless nature and high-quality distribut...
Medium
Medium
0.4446
The vulnerability concerns the concentration of privileged authority in a single administrative account, called Operator, within the DarkCrypto protocol. This account is granted exclusive access to a set of setter functions in the Treasury contract that can re‑configure core system parameters such as the Boardroom cont...
38
32.json
Inconsistent Dark Amount Calculation in getBurnableDarkLeft() and redeemBonds()
In the Treasury contract, the getBurnableDarkLeft() viewer function allows the caller to get the _burnableDarkLeft. As shown in the following code snippets, the _burnableDarkLeft takes the minimum value between epochSupplyContractionLeft and _maxBurnableDark, where _maxBurnableDark is derived from _maxMintableBond.mul(...
no poc
No data
Medium
Medium
0.5918
The Treasury contract contains two functions that calculate how much DARK token can be extracted when a holder redeems their bonds, but the formulas used in each function are not aligned. The viewer function getBurnableDarkLeft() determines the maximum amount of DARK that can be burned for the current epoch by taking t...
39
33.json
Proper Refund of The Excess ETH
In DarkCrypto, there is a contract TaxOffice which provides a number of convenience routines for liquidation addition, e.g., addLiquidityTaxFree() and addLiquidityETHTaxFree(). During the analysis of these convenience routines, we notice that addLiquidityETHTaxFree() does not refund the excess ETH properly. To elaborat...
no poc
Revise the above routine to properly return the excess ETH back to the user.
Medium
Medium
0.4491
The vulnerability resides in the addLiquidityETHTaxFree convenience function of the TaxOffice contract in the DarkCrypto system. The function accepts a payable amount of ETH from a user, forwards the entire msg.value to the UniswapV2Router's addLiquidityETH method, and receives back three values: the actual amount of D...
40
4.json
Incorrect Margin Calculation Due to Inconsistent Realized and Unrealized Balances Submitted by Tripathi
Impact Explanation: Incorrect liquidation.
```solidity function test_IncorrectMarginCalculation() public { vm.prank(DEPLOYER); // Set USDC collateral factor to 0.9 (9000 basis points) assetService.setCollateralFactor(address(USDC), 9000); // Scenario 1: Alice with -500 USDC unrealized and +600 USDC realized // Set up Alice's initial state ...
Based on my current understanding aggregate realized and unrealized balances before applying collateral factors. 3.2
High
High Risk
0.6862
The vulnerability is an incorrect margin calculation in the asset service component of the protocol, caused by inconsistent handling of realized and unrealized balances when applying the collateral factor. The contract aggregates a trader’s realized USDC collateral and unrealized PnL separately, but only multiplies the...
41
5.json
Lack of slippage control in llido.sol::swapexactinputsinglehop Submitted by erictee, also found by Lefg, b0g0, Auditism, walter, 0xrex, jesjupyter, 0xRajkumar,
When swapping the tokens with function LLido.sol::swapExactInputSingleHop, the slippage control is disabled by configuring the amountOutMin to zero. This can potentially expose the swap/trade to sandwich attacks and MEV (Miner Extractable Value) attacks, resulting in a suboptimal amount of tokens received from the swap...
no poc
One possible solution is to dynamically compute the minimum amount of tokens to be received after the swap based on the maximum allowable slippage percentage (e.g. 5%) and the exchange rate (Source Token <> Destination Token) from a source that cannot be manipulated (e.g. Chainlink, Custom TWAP). Alternatively, consi...
Medium
Medium Risk
0.4158
The vulnerability consists of an absent slippage protection mechanism in the LLido contract’s swapExactInputSingleHop function. The function builds an ExactInputSingleParams struct for the Uniswap V3 router and deliberately sets the amountOutMinimum field to zero, which removes any lower bound on the amount of destinat...
42
6.json
The lack of slippage protection leads to capital loss Submitted by Bauer, also found by 0xRajkumar and Bauchibred
In the Controller.earningPulls() function, if bountyPullerTo_ is not equal to account_, the protocol calculates amountForPuller, converts this amount of wstETH to WETH, and then transfers it to the user as ETH: ```solidity if (bountyPullerTo_ == account_) { _geth.transfer(address(_eEarning), _geth.balanceOf(addre...
no poc
Setting parameters for slippage protection. Goat Fixed.
Medium
Medium Risk
0.5648
The vulnerability resides in the earnings‑pull routine of the protocol’s Controller contract. When a user other than the account that triggered the pull (bountyPullerTo_) requests a reward, the contract calculates a portion of the contract’s wrapped stETH (wstETH) balance, swaps that amount for WETH on Uniswap V3, conv...
43
7.json
Pool owner can sandwich deposits into his pool to keep their fs at 1 while being able to withdraw ETH earnings Submitted by Aslanbek Aibimov, also found by cccz
The trust Score depends on three factors: total ETH staked in the pool, Booster, and financial stability. Financial stability is the ratio of current ETH earnings to max ETH earning, so the reason why pool owners would not claim their ETH earnings is to not decrease their financial stability. The purpose of FS form...
1. Bob signs a ethStake transaction that is going to stake 50 ETH into Alice's pool. 2. Alice frontruns Bob and withdraws 1 ETH from her EthEarnings, decreasing her financial stability. 3. Bob's transaction makes Alice 1 ETH in owner fees, so Alice's FS is instantly back to 1.
Perhaps, more incentives for keeping EthEarnings as high as possible should be introduced.
Medium
Medium Risk
0.1693
The vulnerability consists of a sandwich‑style manipulation of the pool owner's earnings withdrawal logic that allows the owner to keep the financial stability (FS) metric at its maximum value while still extracting ETH from the pool. The FS score is calculated as the ratio of current ETH earnings to the maximum possib...
44
8.json
Abuser can vote twice by voting, withdrawing dct and staking it on another account Submitted by Auditism
When a user stakes DCT, they will be granted some dp2pTokens. These tokens will allow user to vote against or for the attacker when someone gets challenged. The present issue is that an abuser is able to withdraw his DCT, transfer it to another account, stake it, receive voting power (dp2pTokens) and vote again. Impa...
When users stake DCT they will be granted some dp2pTokens: ```solidity powerMinted = LHelper.calMintStakingPower( //@note rs oldLockData, aLock, duration_, false, _selfStakeAdvantage ); } _dP2PDToken.mint(poolOwner_, powerMinted); ``` These dP2PDTokens are the _votingToken used in the Voting.sol c...
In order to mitigate this issue before unstaking dct, add a mechanism to prevent abusive behavior, such as if a user has a current votingPower > 0, denied from unstaking, or to remove all the power this user posses prior to unstaking.
Medium
Medium Risk
0.6226
The vulnerability concerns a governance voting mechanism that derives voting power from dp2pTokens minted when a user stakes DCT. When a stake is created, the contract calculates a staking power amount and mints an equivalent amount of dp2pTokens, which are later read by the Voting contract to determine how much influe...
45
9.json
max_supply will not be reached as there is an early return that does set ismintingfinished to early Submitted by 0xWeiss, also found by Haxatron, cccz, Rotciv Egaf, Tripathi, Auditism, walter, jesjupyter, er-ictee, merlin, Aslanbek Aibimov, nmirchev8, 0xumarkhatab, Bauchibred, Chad0, sashik-eth, Said, ast3ros, Victor O...
Currently in the publicMint() function in DCT, there is a check that if the totalSupply() of tokens + the minting amount: ```solidity uint mintingA = pendingA(); ``` is bigger than MAX_SUPPLY: ```solidity if (totalSupply() + mintingA > MAX_SUPPLY) { isMintingFinished = true; return; } ``` the minting of DCT...
no poc
If totalSupply() + mintingA > MAX_SUPPLY) normalize the mintingA amount to mint the last tokens before MAX_SUPPLY is reached: ```solidity if (totalSupply() + mintingA > MAX_SUPPLY) { mintingA = MAX_SUPPLY - totalSupply(); isMintingFinished = true; } ```
Medium
Medium Risk
0.6809
The vulnerability originates in the publicMint function of the DCT token contract, where an early return is used to mark the minting process as finished once the projected amount of newly minted tokens would push the total supply above the defined MAX_SUPPLY. The code first calculates the pending amount of tokens that ...
46
cantina_competition_euler_may2024_3_1_14_chunk_1.json
IRMSynth.sol - L91-L94: Failure to account for case quote == targetQuote risks incorrect in- terest rate calculations for synthetic tokens Submitted by 0xSCSamurai, also found by T1MOH and XDZIBECX
The _computeRate() function fails to accommodate for the case when quote == targetQuote, and instead it currently bundles this case together with case quote > targetQuote, which I think is a mistake that risks incorrect rate calculations, as demonstrated by my first two proof of concept tests. Tests were run differing m...
The buggy function under scrutiny: • Due to complexities/nuances introduced by the existing protocol test(s) I made some modifications to the below contract function to accommodate my proof of concept tests, in order to filter out the noise and get to the actual bug and what it actually does. • The timestamp check was co...
if (quote < targetQuote) { // If the quote is less than the target, increase the rate rate = rate * ADJUST_FACTOR / ADJUST_ONE; - } else { + } else if (quote > targetQuote) { // If the quote is greater than the target, decrease the rate rate = rate * ADJUST_ONE / ADJUST_FACTOR; }
Low
Low Risk
0.2531
The vulnerability resides in the IRMSynth contract's internal _computeRate function, which determines the interest rate for synthetic tokens based on an oracle price (quote) and a predefined target price (targetQuote). The implementation groups the case where quote is exactly equal to targetQuote together with the case...
47
Tadle_h-06_chunk_1.json
Formulaic Error Rounds Down Causing Total Loss Of Funds For Bid Takers During Abort
A critical vulnerability exists in the abortBidTaker() function where an incorrect calculation leads to rounding errors, potentially causing takers to lose all their deposited funds during bid abortion. Overview The vulnerability stems from an incorrect formula used in the abortBidTaker() function where the deposit am...
Please run the following test to reproduce the issue: forge test --via-ir --mt testTakerTotalBalancesOnOfferCancellationAndAbort As noted in the audit tags, offending lines can be changed to fixed implementation, however this requires adding the recommendations to the src/core/PreMarkets.sol file. solidity // SPDX-Lic...
Update the abortBidTaker() function to use the correct formula for calculating the deposit amount: uint256 depositAmount = stockInfo.points.mulDiv(preOfferInfo.amount, preOfferInfo.points, Math.Rounding.Floor);. An example implementation is shown below; solidity /** @notice abort bid taker @param _stock stock address ...
High
High
0.661
The vulnerability is an arithmetic miscalculation in the abortBidTaker function of the PreMarkets contract that causes the deposit amount for a taker to be rounded down to zero. The root cause is a swapped order of the numerator and denominator in a mulDiv call that uses Math.Rounding.Floor: the code multiplies the sto...
48
united_001_normalized_chunk_1.json
MKTV-1 | Users Prevented From Withdrawing Liquidity Category
Whenever a user deposits into the MarketVault, the lastDepositedTimestamp[receiver] is updated to the current block's timestamp. This is then used to ensure depositors have been in the vault for a MINIMUM_DEPOSIT_PERIOD when withdrawing or redeeming. The problem is that a malicious user can deposit 1 wei of assets with...
no poc
Do not allow users to deposit for arbitrary receivers.
Unknown
Commit Location
0.0415
The vulnerability lies in the way the MarketVault contract records the time of a user’s most recent deposit. Whenever a deposit is executed, the contract updates a mapping called lastDepositedTimestamp for the address supplied as the receiver of the deposit. This timestamp is later consulted to enforce a MINIMUM_DEPOSI...
49
united_001_normalized_chunk_10.json
ORDM-8 | Misconfigured Markets Can Break The Protocol Category
The addNewMarket function allows a market to be added with the specified _marketId, however the _newMarket.marketId is not validated to be the same as the provided _marketId. Additionally, the Market struct should not store a marketId as it is unnecessary and can always be accessed from an order or position object.
no poc
Remove the marketId attribute on the Market struct as it is unnecessary and leads to misconfiguration.
Unknown
Commit Location
0.0298
The vulnerability resides in the market‑creation routine of the protocol, where the addNewMarket function receives a market identifier (_marketId) as a separate argument and also expects a Market struct (_newMarket) that contains its own marketId field. The implementation does not verify that the two identifiers match,...
50
united_001_normalized_chunk_11.json
ORDM-9 | updatedAvgPrice Always Rounds Down Category
The updatedAvgPrice computed in the _increasePosition function is always rounded down, therefore it is possible for users with long positions to increase their position at an executionPrice that is higher than their average price and see no change in their position’s average price. For example, an increase order with t...
no poc
Use roundUp division when calculating the updatedAvgPrice for longs and round down division when calculating the updatedAvgPrice for shorts.
Unknown
Commit Location
0.0597
The vulnerability resides in the calculation of the updated average price (updatedAvgPrice) inside the _increasePosition function of the contract. When a trader expands a long position, the contract computes the new average price using integer division that always rounds down. Because the division discards any fraction...
51
united_001_normalized_chunk_12.json
ORDM-10 | Lack Of Reserve Validation Category
Although the OrderManager validates that the position does not increase the open interest past the maximumOi, LPers are still exposed to great risk as there is no validation on the size of the position relative to the funds available in the market. With a large enough order which is still within OI bounds, a user in pr...
no poc
Add validation checks to ensure the position size may be only up to a specific percentage of funds available in the market.
Unknown
Commit Location
0.0472
The vulnerability is a missing validation of market reserves when a new position is opened through the OrderManager. Although the contract correctly checks that the cumulative open interest (OI) does not exceed the configured maximum, it does not enforce any relationship between the size of an individual position and t...
52
united_001_normalized_chunk_13.json
ORDM-11 | Open Interest Validation Becomes Meaningless Category
Whenever the Aggregate vaultOpenInterest is increased or decreased, it is done so at the current value of the index token: User opens a position with size 10 ETH @ $2,000 / ETH vaultOpenInterest is increased from 0 to $20,000 The user then closes their position after ETH drops to $1,000 / ETH vaultOpenInterest is decre...
no poc
Use the open interest that is tracked on a per market basis and value the open interest of each market in aggregate based on the current price of the each index token during validation. This solution requires an O(n) approach where n is the number of markets configured for a single vault. This ought to be fine as long ...
Unknown
Commit Location
0.0844
The vulnerability concerns the way a vault computes its aggregate open interest, a metric that should reflect the total value of all currently open positions at the market's prevailing price. In the existing implementation, the vault updates the aggregate open interest whenever a position is opened or closed, but it do...
53
united_001_normalized_chunk_14.json
FWD-1 | Relayer May Censor Transactions Category
The gasSent is validated to be greater than 64/63 * the transaction.minGas, however the gasSent is recorded at the beginning of the execute function which has a non-trivial amount of logic, that will expend gas, before executing the external call. Therefore the remaining gas that is forwarded to the external call may b...
no poc
Add a buffer to the gasSent validation that comfortably covers any expenditure that would occur before the external call.
Unknown
Commit Location
0.0335
The vulnerability concerns the way a relayer contract validates the amount of gas it forwards to an external call. The contract records the value of gas sent (gasSent) at the very start of its execute function and then checks that this value is greater than 64/63 times the transaction’s declared minimum gas (transactio...
54
united_001_normalized_chunk_15.json
MKTV-2 | Maximum Open Interest Configuration Risk Category
The admin can configure any maxVaultOpenInterest value with the setMaximumVaultOpenInterest function. This poses a risk as the admin may accidentally configure a maxVaultOpenInterest that is below the current vaultOpenInterest. Consider the following scenario: maxVaultOpenInterest is 15 vaultOpenInterest is 10 maxVault...
no poc
Take care when using the setMaximumVaultOpenInterest function. Consider adding validation such that the maxVaultOpenInterest cannot be set below the current vaultOpenInterest.
Unknown
Commit Location
0.0443
The vulnerability is a configuration‑validation flaw in the contract that manages vault open interest. The contract provides an admin‑only function, setMaximumVaultOpenInterest, that allows the administrator to change the global ceiling for open interest (maxVaultOpenInterest). Because the function does not enforce tha...
55
united_001_normalized_chunk_16.json
ORDM-12 | Unexpected Limit Execution Category
Limit orders are traditionally defined to execute at or better than the limit price. However, the current limit price check disallows execution when the market price is equivalent to the expected price. This may lead to unexpectedly failed entries for users who expected their order to be executed once price reached the...
no poc
Allow limit orders to execute when they are at or better than the configured trigger price.
Unknown
Commit Location
0.2421
The vulnerability concerns the price validation logic for limit orders in the contract. A limit order is expected to execute when the market price reaches the user‑specified limit price or improves beyond it. In the current implementation the contract checks the execution price against the expected price using the cond...
56
united_001_normalized_chunk_17.json
ORDM-13 | Slippage Applies To Both Sides Category
For slippage calculations, _settleOrder calculates a percentage above the expectedPrice and a percentage below the expectedPrice. However, slippage should not apply to both the upper and lower prices. Traditionally, when a user submits a long, slippage is measured against the best offer price. If a user submits a short...
no poc
Only compare the price against the upperLimit for longs and the lowerLimit for shorts.
Unknown
Commit Location
0.0541
The vulnerability concerns the slippage calculation performed during order settlement in the PariFi protocol. When a user submits an order, the contract determines an acceptable price range by computing an upper limit (a percentage above the expected price) and a lower limit (a percentage below the expected price). The...
57
united_001_normalized_chunk_18.json
ORDM-14 | maxLeverage Bypassed Category
Upon creating a new position the maxLeverage is not validated. The maxLeverage validation will occur when you make a new order, however fees, price, and the maxLeverage itself may change in between the time you create your order and when it gets executed. Therefore it is possible to bypass the configured maxLeverage fo...
no poc
Validate the maxLeverage after the order has been executed.
Unknown
Commit Location
0.0295
The vulnerability is a leverage‑limit bypass that allows a trader to open a position with a leverage greater than the market’s configured maxLeverage. The root cause lies in the contract’s execution flow: when a user creates a new position the contract records the request but does not immediately enforce the maxLeverag...
58
united_001_normalized_chunk_19.json
ORDM-15 | Lacking Validation For New Markets Category
The addNewMarket function lacks several key validations on new markets being added such as validating the ranges for: openingFee closingFee liquidationFee minCollateral liquidationThreshold
no poc
Add validation on the configured values for each of the above.
Unknown
Commit Location
0.0181
The vulnerability resides in the contract function responsible for registering a new trading market. The function accepts a set of economic parameters—opening fee, closing fee, liquidation fee, minimum collateral, and liquidation threshold—but does not enforce any constraints on the values supplied. Because there is no...
59
united_001_normalized_chunk_2.json
FM-1 | Fees Unable To Be Distributed Category
The fee distribution interval early return logic is reversed such that fees can only be distributed inside of the DELAY window. After the DELAY window has passed fees can no longer be distributed. ```solidity // Distribute fees at regular intervals of every 1 hour if (lastTransferTimestamp + DELAY < block.timestamp) re...
no poc
Replace the interval early return logic with: lastTransferTimestamp + DELAY > block.timestamp.
Unknown
Commit Location
0.2293
The vulnerability is a reversed early‑return check in the fee‑distribution routine. The contract is supposed to release accumulated fees at regular intervals (every hour), but the condition that guards the distribution is written as `if (lastTransferTimestamp + DELAY < block.timestamp) return;`. Because the inequality ...
60
united_001_normalized_chunk_20.json
ORDM-16 | Lacking Validation When Updating Markets Category
The updateExistingMarket function lacks several key validations on new markets being updated such as validating the ranges for: openingFee closingFee liquidationFee minCollateral liquidationThreshold
no poc
Add validation on the configured values for each of the above.
Unknown
Commit Location
0.019
The vulnerability lies in the market‑update routine of the PariFi protocol, specifically the `updateExistingMarket` function. This function permits an authorized caller to modify key economic parameters of an already deployed market, such as the opening fee, closing fee, liquidation fee, minimum collateral requirement,...
61
united_001_normalized_chunk_21.json
MKTV-3 | _withdrawalFee Not Validated In Constructor Category
The _withdrawalFee is not validated to be within the WITHDRAWAL_FEE_CAP in the MarketVault constructor.
no poc
Validate that the _withdrawalFee is within the WITHDRAWAL_FEE_CAP in the MarketVault constructor.
Unknown
Commit Location
0.0122
The vulnerability resides in the MarketVault contract’s constructor, where the initial withdrawal fee (_withdrawalFee) is accepted without any validation against the predefined upper bound constant WITHDRAWAL_FEE_CAP. Because the constructor does not enforce that the fee must be less than or equal to this cap, the cont...
62
united_001_normalized_chunk_22.json
ORDM-17 | Pyth Prices Not Updated Before Being Used Category
priceFeed.updatePythPrice(priceUpdateData) is not used to update the pyth price before cancelPendingOrder or createNewPosition. To be entirely accurate prices should be updated before computing the fees in these functions using those pyth prices.
no poc
Update Pyth prices with priceFeed.updatePythPrice(priceUpdateData) for entirely up to date pricing when computing fees in the cancelPendingOrder and createNewPosition functions.
Unknown
Commit Location
0.0267
The vulnerability stems from the contract’s reliance on a Pyth price oracle without guaranteeing that the most recent price data is loaded before the contract performs fee calculations in the cancelPendingOrder and createNewPosition functions. The root cause is a missing invocation of the priceFeed.updatePythPrice(pric...
63
united_001_normalized_chunk_23.json
ORDM-18 | ExecutionFee To Cover The Keeper's Gas Category
Currently there is no remuneration for the keeper executing orders with the settleOrder function. It may be prudent to cover the gas costs for the keeper by introducing an executionFee that must be sent in when creating an order to cover the keeper’s gas expenditure. Such an executionFee would dissuade from potential k...
no poc
Consider implementing an executionFee to remunerate the keeper’s gas expenditure when settling orders. Additionally consider charging a percentage of this executionFee upon the cancellation of an order, especially decrease orders as they currently have no fees applied on cancellation.
Unknown
Commit Location
0.0608
The vulnerability is an incentive gap in the order settlement workflow: the protocol does not compensate the keeper who calls the settleOrder function, nor does it charge any fee when a pending order is cancelled via cancelPendingOrder. Because the execution of an order costs gas, a keeper normally expects to be reimbu...
64
united_001_normalized_chunk_24.json
ORDM-19 | Fees May Not Be Skipped Due To Misconfiguration Category
In the updateExistingMarket function the admin may update the market and provide an _updatedMarket with a non-paused status e.g. isLive = true, however this would avoid the dataFabric.unpauseMarket call as the market has been toggled to a live status without calling the toggleMarketStatus function.
no poc
Either require that markets are created with an isLive of false or invoke the dataFabric.unpauseMarket function in the updateExistingMarket when the _updatedMarket.isLive == true.
Unknown
Commit Location
0.031
The vulnerability concerns the market‑status update path in the PariFi protocol. An administrator can invoke the updateExistingMarket function and supply a market object whose isLive flag is set to true. Because the function only writes the new market struct to storage and does not enforce a call to dataFabric.unpauseM...
65
united_001_normalized_chunk_25.json
ORDM-20 | Leverage Relies On EMA Category
A position's leverage is calculated using an EMA price, however this is a lagging indicator and will not be entirely accurate to current prices. Therefore users will be able to open positions that, at current prices, would be above the maxLeverage. However by the EMA are not above maxLeverage.
no poc
Consider if this is the desired behavior, if not, use current prices to calculate the position’s leverage.
Unknown
Commit Location
0.0281
The vulnerability stems from the protocol's method of computing a trader's leverage using an Exponential Moving Average (EMA) price instead of the current market price. EMA is a lagging indicator, meaning it smooths price data over time and does not instantly reflect rapid market movements. Because the leverage check r...
66
united_001_normalized_chunk_26.json
ORDM-21 | User's Leverage Changes With The Index Price Category
The max leverage check relies on the index token price relative to the collateral token price, if the index token price moves relative to the collateral token price, a position’s leverage changes. This means the leverage of user’s position can change even if the price of their collateral token does not move and they do...
no poc
Determine if this ought to be the expected behavior and if so ensure it is well documented for users.
Unknown
Commit Location
0.053
The vulnerability concerns the calculation of a trader’s maximum leverage in a perpetual contract platform. The contract determines whether a position respects the maximum allowed leverage by comparing the index token price to the collateral token price. Because the index token price is used directly in the leverage ch...
67
united_001_normalized_chunk_27.json
ORDM-22 | Fees Based On EMA Category
The fees on lines 524 and 651 are calculated based on an EMA price which is a lagging indicator and will not be entirely accurate to the current token price.
no poc
Consider if this is desired. If not, use the convertMarketToToken function to compute the value of these fees.
Unknown
Commit Location
0.0171
The vulnerability consists of a fee calculation that relies on an Exponential Moving Average (EMA) price instead of the current market price. The EMA is a lagging indicator, meaning it reflects past price information and does not adjust instantly to rapid market movements. Because the contract uses this stale price to ...
68
united_001_normalized_chunk_28.json
ORDM-23 | Read-only Reentrancy Potential Category
In the _closePosition function the position is deleted at the end of the function call, however for tokens with callbacks it would be safer to delete the position and update the market data before the transfer, it may also be wise to delete the position before the distributeFees external call as well, even though this ...
no poc
Ensure state is modified before initiating token transfers to protect against potential read-only reentrancies with ERC-777 tokens.
Unknown
Commit Location
0.0341
The vulnerability is a read‑only reentrancy risk in the contract's closePosition routine. The function currently deletes a user's position only after it has performed token transfers and an external fee distribution call. When the transferred token implements a callback mechanism such as the ERC‑777 tokensReceived hook...
69
united_001_normalized_chunk_29.json
ORDM-24 | Inefficient Limit Order Validation Category
When executing a limit order the expectedPrice is validated for the first time, however this validation should be carried out when the order is first created. Otherwise user’s may submit many orders that will always fail this validation in order to waste the keeper’s gas upon execution of the settleOrder function.
no poc
Validate the expectedPrice for the limitOrder when first creating the order.
Unknown
Commit Location
0.0288
The vulnerability consists of a misplaced validation check for the expected price of a limit order. In the current implementation the contract verifies that the price supplied by the user matches the market price only when the order is settled through the `settleOrder` function. This check should be performed at the mo...
70
united_001_normalized_chunk_3.json
ORDM-1 | Users Can Modify Any Position Category
An arbitrary positionId can be provided to the modifyPosition function without validation that the msg.sender is the owner. As a result, users may modify or close any arbitrary position, even if it doesn’t belong to them.
no poc
Validate that the msg.sender is the owner of the supplied positionId.
Unknown
Commit Location
0.021
The vulnerability is an authorization bypass in the contract function that updates trading positions. The function accepts an arbitrary position identifier but does not verify that the caller is the owner of that position. Because there is no ownership check, any address can supply a valid positionId belonging to anoth...
71
united_001_normalized_chunk_30.json
ORDM-25 | Fees Can Be Avoided With Small Order Sizes Category
Throughout the OrderManager contract, fees are calculated using round down division. Therefore it is possible for users to avoid paying fees by using order sizes small enough such that they round down to 0. With sponsored order creation through the PariFiForwarder this can be a viable method to avoid fees.
no poc
Employing such a strategy would cost a significant amount of gas and is unlikely to ever be profitable, however it may be preferred to use round up division when computing these fees.
Unknown
Commit Location
0.0317
The vulnerability resides in the fee‑calculation logic of the OrderManager contract, where fees are derived using integer division that rounds down. Because the division discards any fractional remainder, an order whose nominal fee value is less than one fee unit is evaluated as zero. Consequently, a user can construct...
72
united_001_normalized_chunk_31.json
ORDM-26 | Risk Of Stale Pricing Category
When creating a new position, the Pyth price feed is not updated. The fees calculation and the leverage validation are at risk of utilizing a stale price. This is because the convertMarketToTokenSecondary function is called which uses the unsafe EMA price point without validating publish time. ```solidity PythStructs.P...
no poc
Consider validating the publish time or updating the price feed when creating a new position.
Unknown
Commit Location
0.2458
The vulnerability originates from the way the contract obtains a market price when a user creates a new trading position. Instead of using a price that is guaranteed to be recent, the contract calls Pyth's getEmaPriceUnsafe function and directly feeds the returned price into the fee calculation and leverage validation ...
73
united_001_normalized_chunk_32.json
MKTV-4 | Dead Address Can Be Constant Category
To reduce bytecode and favor DRY the dead address referenced multiple times can instead be a constant in the MarketVault contract.
no poc
Declare the dead address as a constant variable in the MarketVault contract.
Unknown
Commit Location
0.0137
The observed issue concerns the repeated use of a hard‑coded dead address literal within the MarketVault contract. Instead of referencing a single, shared constant, the address (commonly 0x000000000000000000000000000000000000dEaD) is embedded directly at multiple points in the bytecode. This practice inflates the contr...
74
united_001_normalized_chunk_33.json
ORDM-27 | Unnecessary userPosition Storage Declaration Category
The userPosition variable is declared as a storage reference variable, however it would be much more efficient to declare it as a memory variable.
no poc
Declare the userPosition variable as a memory variable.
Unknown
Commit Location
0.0143
The vulnerability consists of an inefficient variable declaration where a contract declares a local variable that references a struct stored in contract storage, even though the variable is only used for read‑only or temporary calculations within a single function execution. Because the variable is defined as a storage...
75
united_001_normalized_chunk_34.json
ORDM-28 | Unnecessary userOrder Storage Declaration Category
The userOrder variable is declared as a storage reference variable, however it would be much more efficient to declare it as a memory variable.
no poc
Declare the userOrder variable as a memory variable.
Unknown
Commit Location
0.014
The vulnerability consists of an unnecessary use of a storage reference for a variable that is only needed temporarily within a function. In the examined contract, the variable named userOrder is declared as a storage pointer, which forces the EVM to read from and write to persistent blockchain storage even though the ...
76
united_001_normalized_chunk_35.json
ORDM-29 | Leverage Rounded Down Category
When computing the leverage of a position in the calculateLeverage function round down division is used. The result of the rounding is that the position appearing as if it has slightly lower leverage than it actually does.
no poc
Though this rounding will have a minimal impact it may be worthwhile to use roundUp division to avoid position’s being technically above the allowed leverage yet rounded to within the allowed range.
Unknown
Commit Location
0.0254
The vulnerability lies in the way the contract calculates the leverage of an open position. The calculateLeverage function performs a division and then applies a floor (round‑down) operation before returning the leverage value. Because the result is always rounded down, the reported leverage is slightly smaller than th...
77
united_001_normalized_chunk_36.json
ORDM-30 | Unnecessary Handling Of 0 Collateral Category
In the event that isProfit is false and the pnlInCollateral is greater in magnitude than the collateralAmount for the position an alternative leverage calculation is used to avoid divide by zero reverts. However any position where the collateral is exactly equal to the pnlInCollateral or insufficient to cover the pnlIn...
no poc
Simply revert with a maxLeverage validation failure in the event that the pnlInCollateral >= _collateralAmount.
Unknown
Commit Location
0.0386
The vulnerability is a logical error in the protocol’s leverage validation that allows positions with zero or negative effective collateral to pass the maximum‑leverage check. The contract calculates an alternative leverage value when a position reports a loss (isProfit is false) that is larger in magnitude than the po...
78
united_001_normalized_chunk_37.json
ORDM-31 | Loss Amount Is Rounded Down Category
When computing the profitOrLoss round down division is always used whether or not this variable represents profit or loss. This way user’s are able to avoid a fraction of their losses that are lost from truncation. This amount will almost always be negligible, however the loss amount should use `roundUp` division to ac...
no poc
Use roundUp division when the profitOrLoss variable represents a loss amount.
Unknown
Commit Location
0.0313
The vulnerability concerns the arithmetic handling of loss amounts in the profitOrLoss calculation of the contract. The code unconditionally applies a round‑down (truncating) division whenever the profitOrLoss variable is computed, regardless of whether the resulting value represents a profit or a loss. Because roundin...
79
united_001_normalized_chunk_38.json
ORDM-32 | Superfluous orderToPositionId Mapping Category
The orderToPositionId is unnecessary and inefficient as each order can simply have a positionId as an attribute, for open orders this id can be ignored.
no poc
Remove the orderToPositionId mapping and introduce an attribute on the order struct to store the positionId the order is meant for.
Unknown
Commit Location
0.0175
The vulnerability consists of an unnecessary and inefficient mapping called orderToPositionId that links each order identifier to a position identifier. The contract already stores every order in a struct, and the position identifier can be stored directly as a field of that struct. By keeping a separate mapping, the c...
80
united_001_normalized_chunk_39.json
LP-1 | Required Margin Miscalculated
When computing the position maintenance margin required, the maintenance margin is miscalculated because the positionMaintenanceMargin is called with the option premium as the spot price of the asset and the spot price of the asset as the option premium. This drastically miscalculates the required positionMaintenanceMa...
no poc
Provide the spot price as the X value and the premium as the Y value.
Critical
Critical
0.1331
The vulnerability is a miscalculation of the required maintenance margin in the margin‑adjustment logic of the protocol. The root cause lies in an argument swap when the contract calls the positionMaintenanceMargin routine: it passes the option premium where the spot price of the underlying asset should be supplied, an...
81
united_001_normalized_chunk_4.json
ORDM-2 | Decreasing Position Size Does Not Account For PnL Category
In the _decreasePosition function users can decrease their position size without realizing any of the positive or negative PnL for their position. This way a user can decrease their size to a trivial amount if they do not immediately start to profit.
no poc
When users decrease their position size account for a proportional amount of their current PnL being realized.
Unknown
Commit Location
0.0247
The vulnerability resides in the contract’s position‑size reduction logic. When a trader calls the decreasePosition function to shrink an open position, the implementation fails to realize any portion of the position’s accumulated profit or loss. In other words, the contract reduces the notional size while leaving the ...
82
united_001_normalized_chunk_40.json
DIEM-1 | Liquidations Halted Due To DoS
There is no limit to the amount of trades a user may open in their portfolio. Therefore it is possible for a user to open so many trades that functions that need to iterate through all of them multiple times, such as liquidation, cannot occur. The maxBatchTrading validation fails to protect against this DoS as it limit...
https://github.com/GuardianAudits/IVX-Suite/blob/main/test/guardian/DIEM-1.sol
Implement a cap on the amount of trades that can belong to any single portfolio.
Critical
Critical
0.146
The vulnerability is an unbounded growth bug in the portfolio management component of the DIEM protocol that allows a single user to accumulate an unlimited number of open trades within their portfolio. Because the contract does not enforce a maximum total count of trades, a malicious or careless user can create enough...
83
united_001_normalized_chunk_41.json
DIEM-2 | Sell Premium Paid Twice
In the openTrades function, when a user opens a !isBuy trade their portfolio receives the totalPremium immediately. However upon settling and closing the expired trade, when the premium of the expired option is 0 the _trade.averageEntry.mulDivUp(closedUnits, 1e18), which represents the totalPremium upon opening the sel...
https://github.com/GuardianAudits/IVX-Suite/blob/main/test/guardian/DIEM-2.sol
Do not credit the initial totalPremium as PNL when the sell trade is closed as this amount has already been paid out.
Critical
Critical
0.1565
The vulnerability is a double‑credit of the option seller’s premium. When a user opens a sell (short) option trade, the protocol immediately transfers the total premium to the user’s portfolio. Later, during settlement of the same trade, the _calculatePnl function adds the value of _trade.averageEntry.mulDivUp(closedUn...
84
united_001_normalized_chunk_5.json
ORDM-3 | Users In Profit Errantly Liquidated Category
When the position's PnL is obtained in the liquidate function with ```solidity (uint256 pnlInCollateral,) = getProfitOrLossInCollateral(_positionId, executionPrice) ``` The protocol assumes that the pnlInCollateral is always a loss, uint256 lossInCollateral = pnlInCollateral + feesInCollateral. As a result, a position ...
no poc
Require that the isProfit returned from the getProfitOrLossInCollateral function is false.
Unknown
Commit Location
0.2327
The vulnerability is an erroneous liquidation logic that treats a profitable position as if it were in loss, allowing the protocol to liquidate users who are actually earning. The root cause lies in the liquidate function calling getProfitOrLossInCollateral and unconditionally interpreting the returned pnlInCollateral ...
85
united_001_normalized_chunk_6.json
ORDM-4 | Insolvent Closes Steal Collateral From Other Positions Category
When the pnlInCollateral is greater in magnitude than the collateralAmount and isProfit is false the entire pnlInCollateral amount is transferred to the feeManager and distributed to the protocol and the LPers. This steals the delta (|pnlInCollateral| - collateralAmount) from the collateral of other positions in the Or...
no poc
In the event where the pnlInCollateral is greater than the available collateral and isProfit is false, only send the available collateral from the position to the feeManager.
Unknown
Commit Location
0.0445
The vulnerability is an improper handling of loss settlement when a trading position is closed with a negative profit‑and‑loss (PnL) that exceeds the position’s own collateral. In the order‑management contract, if the absolute value of the loss (pnlInCollateral) is larger than the collateral that the position supplied ...
86
united_001_normalized_chunk_7.json
ORDM-5 | Incorrect OrderType Used For Execution Price Category
In the calculateLeverage function the executionPrice is hardcoded to use the OPEN_NEW_POSITION order type, however the calculateLeverage function is used for other order types such as DECREASE_POSITION where the resulting executionPrice ought to be using the less favorable price for decreases.
no poc
Allow the calculateLeverage function to take in an orderType and supply the appropriate orderType when validating leverage for each orderType.
Unknown
Commit Location
0.0293
The vulnerability resides in the leverage validation logic of the protocol’s order processing module. Specifically, the calculateLeverage function determines the execution price by hard‑coding the order type to OPEN_NEW_POSITION, regardless of the actual order being processed. This function is invoked not only when a u...
87
united_001_normalized_chunk_8.json
ORDM-6 | Price Updated In Wrong Direction Category
A potential problem arises when price is updated according to the market's deviationPoints. The update only considers whether the user is long or short, if the user opens a long they receive a superior execution. If the user closes a long position, the user receives a less favorable execution. The liquidity curve is in...
no poc
Take into consideration whether the orderType being executed is an increase or decrease orderType when adjusting the updatedPrice by the deviationPoints.
Unknown
Commit Location
0.0459
The vulnerability concerns the price‑adjustment logic of the market contract that uses a liquidity curve to simulate spread widening and narrowing. When a user places an order, the contract computes an updated price by adding or subtracting a value called deviationPoints. The current implementation decides the sign of ...
88
united_001_normalized_chunk_9.json
ORDM-7 | Small Positions Prevented From Being Closed Category
The _deductFeesFromPosition function reverts if the remaining position collateral after deducting fees is less than the configured minimum collateral for the market. However this _deductFeesFromPosition function is called during _closePosition execution, therefore positions that have accumulated enough fees to be put u...
no poc
Do not validate the minimum collateral amount in the _deductFeesFromPosition when closing a position.
Unknown
Commit Location
0.0342
The vulnerability is a logical restriction that prevents a trader from closing a position when the net collateral remaining after fee deduction falls below the market's configured minimum collateral threshold. The root cause lies in the _deductFeesFromPosition routine, which contains a validation step that reverts the ...
89
united_002_normalized_chunk_1.json
PORT-1 | swapMargin Used To Game The AMM
Users are able to use the swapMargin function to siphon funds from their portfolio well past the point of insolvency. A user can sell options contracts to the AMM and collect the premium in their portfolio immediately. The user can then repeatedly use the swapMargin function on their portfolio and sandwich themselves t...
https://github.com/GuardianAudits/IVX-Suite/pull/5
Consider removing the ability to swap margin balances as it poses an inherent risk to the system. Otherwise add validation that the portfolio is not liquidatable at the end of swapMargin function: if (IIVXDiem(diemContract).isPortfolioLiquidatable(this)) revert IVXPortfolio_PortfolioLiquidatable();
Critical
Critical
0.2273
The vulnerability resides in the swapMargin function of the IVXLP protocol, which permits a user to transfer margin balances out of their portfolio without any verification that the portfolio remains solvent after the transfer. The root cause is the absence of a post‑swap solvency check: the contract allows users to fi...
90
united_002_normalized_chunk_10.json
DIEM-5 | mulDivUp Leads To Unliquidatable Position
In the _closeTrade function mulDivUp is used to compute the borrowed amount to be subtracted from the utilized collateral. In some cases, when a trade is closed in multiple transactions the resulting decrease of the utilized collateral will be greater than the corresponding increase that opening that trade incurred. Th...
no poc
Refactor the subUtilizedCollateral function such that if the provided _amount value is greater than the existing utilizedCollateral the function does not revert but instead assigns the utilizedCollateral to 0.
High
High
0.1999
The vulnerability originates from the arithmetic routine used in the contract’s _closeTrade logic. When a trade is closed, the function calculates the amount of borrowed assets to subtract from the currently utilized collateral by calling mulDivUp, a helper that rounds the result upward. If a position is closed in seve...
91
united_002_normalized_chunk_11.json
PORT-3 | swapOnUniswap has 0 slippage protection
The removeMargin and liquidate functions have no slippage protection and are therefore vulnerable to sandwich attacks. These actions can be sandwiched by MEVers to extract a significant amount of value from both users and the AMM.
no poc
Allow users to provide a slippage tolerance when they are initiating an action that should have a slippage tolerance. Upon liquidations, consider refactoring the design such that liquidators are able to seize the assets and transfer them to the IVXLP contract without swapping them. The seized assets can be swapped in a...
High
High
0.1043
The vulnerability consists of missing slippage protection in the functions that execute token swaps on Uniswap when a user removes margin or when the protocol liquidates a position. Because the swap call does not enforce a maximum acceptable price deviation, an attacker controlling the transaction ordering (typically a...
92
united_002_normalized_chunk_12.json
RSKE-2 | Expired Options Increase Maintenance Margin
In the healthFactor function, the positionMaintenanceMargin is added for options which may be expired, however expired options should not increase the required margin for an account — their result is already factored into PnL and that result cannot change.
no poc
Skip expired options for the positionMaintenanceMargin calculation.
High
High
0.0821
The vulnerability resides in the healthFactor calculation of the margin accounting module, where the function aggregates the positionMaintenanceMargin of all option contracts held by a user without discriminating between active and expired options. Because the contract treats expired options as if they still require up...
93
united_002_normalized_chunk_13.json
PORT-4 | Supported Token Removal Gamed
When a token is removed from the assetsArray with the removeAsset function, it can no longer be used as margin when a portfolio is liquidated. When the owner calls the removeAsset function, a malicious actor can front-run the transaction and make a large trade using the soon-to-be-removed token as margin. After the adm...
no poc
Only remove supported tokens when options are not tradeable or the protocol is paused.
High
High
0.1746
The vulnerability concerns the removal of a supported token from a portfolio’s assets array via the removeAsset function. The contract allows the owner to delete a token that is currently permitted as margin for open positions. The root cause is that the contract does not enforce a state check that prevents trades or w...
94
united_002_normalized_chunk_14.json
GLOBAL-1 | Unlimited Centralized Controls
Throughout the codebase critical values are allowed to be set without appropriate limits on the configured values. Some of these critical values include: collateralFactor FEE_TAKEN_PROFITS deltaCutoff withdrawFee limitProcess interestRateParams
no poc
Implement limits on the range of valid values for each variable.
Medium
Medium
0.0441
The vulnerability consists of a set of unchecked configuration parameters that can be modified by privileged callers without any bounds checking. The contract exposes functions that allow the central authority to adjust critical economic variables such as the collateral factor, the fee taken from profits, the delta cut...
95
united_002_normalized_chunk_15.json
BIN-1 | Option May Have Time Value But Zero Premium
An option’s premium is calculated to be Premium = Time Value + Intrinsic Value. Consequently, even if an option is out-the-money (no intrinsic value), if there is still time until expiration the premium should be non-zero. Due to the specific 15 periods and volatility factors used for binomial calculation, it is possib...
no poc
Consistently monitor volatility parameters and consider increasing how many periods are used for Binomial options pricing.
Medium
Medium
0.0999
The vulnerability concerns the option‑pricing routine in a binomial model implementation. The contract calculates an option's premium as the sum of intrinsic value and time value, expecting a non‑zero price whenever the option still has time to expiry. However, due to the fixed choice of fifteen pricing periods togethe...
96
united_002_normalized_chunk_16.json
DIEM-6 | PNL Always Decreased By borrowedAmount
In the _calculatePnl function, for expired buy trades the PNL is decreased by the entire borrowedAmount no matter the closedUnits provided. This is fine during the _closeTrade function call as the _amountContracts is set to the entire trade.contractsOpen, however other functions that rely on the _calculatePnl function ...
no poc
Replace structured.PNL -= int256(_trade.borrowedAmount) with structured.PNL -= int256(_trade.borrowedAmount.mulDivUp(closedUnits, _trade.contractsOpen)). Otherwise make the closedUnits = _trade.contractsOpen adjustment when the option is expired in the calculatePnl view function.
Medium
Medium
0.0995
The vulnerability resides in the profit‑and‑loss (PNL) computation for expired buy positions within the IVX smart contract suite. The core of the issue is a mis‑scaled deduction: when an expired trade is evaluated, the internal routine _calculatePnl always subtracts the full borrowedAmount from the PNL, regardless of h...
97
united_002_normalized_chunk_17.json
DIEM-7 | Borrowing Fees Extend Past Option Expiry
When a trader closes a trade their borrowing fees are computed based on the period from the trade.timestamp to the current block.timestamp. However, when an option expires the trader will be closing the trade at a timestamp that is past the expiry time of the option. Therefore borrowing fees accrue for the option even ...
no poc
Compute borrowing fees for the period where the option was tradeable and not expired.
Medium
Medium
0.0916
The vulnerability concerns the calculation of borrowing fees for option trades on the DIEM protocol. When a trader decides to close a position, the contract computes the fee based on the elapsed time from the trade's original timestamp up to the current block.timestamp. This logic does not take into account that an opt...
98
united_002_normalized_chunk_18.json
DIEM-8 | averageEntry Always Rounds Up
In the _openTrade function, when the averageEntry is computed with an earlier trade, mulDivUp is used. However, a higher averageEntry is more beneficial for contracts where isBuy == false. Malicious traders are therefore able to increase their resulting PNL by splitting their trades up and abusing the round up behavior...
no poc
Round up for isBuy == true and round down for isBuy == false.
Medium
Medium
0.0555
The vulnerability resides in the calculation of the average entry price inside the contract’s openTrade function. When a trader executes a new trade that follows a previous one, the contract recomputes the average entry using the mulDivUp utility, which always rounds the division result upward. This rounding direction ...
99
united_002_normalized_chunk_19.json
DIEMT-3 | Errant Fee Applied
The settlement fee is taken on the premium based on the FEE_TAKEN_PROFITS, however this calculated amount is not all profit for isBuy contracts and is in fact all loss for !isBuy contracts.
no poc
Do not fee this amount if it represents a loss, additionally compute the fee after the PNL has been determined, this way true profits are feed with the FEE_TAKEN_PROFITS amount.
Medium
Medium
0.0428
The vulnerability consists of an incorrect settlement‑fee calculation that charges a fee on the premium regardless of whether the trade resulted in a profit or a loss. The contract determines the fee amount using the constant FEE_TAKEN_PROFITS and applies it directly to the premium before the profit‑and‑loss (PnL) for ...
100
united_002_normalized_chunk_2.json
DIEMT-1 | DeltaT Rounds Down To 0 Bricking Trades
secondsToExpiry is divided by 15 to produce deltaT. Options with <15 seconds of expiry will have deltaT rounded down to 0 and will cause functions such as calculateCosts(), interestRate() and utilizationRatio() to revert. The above functions call Binomial._optionPrices which calculates N period for binomial pricing: ui...
https://github.com/GuardianAudits/IVX-Suite/blob/67b520e0ec04b8c4403a0f235199a7e0b1d6e36b/test/pocs/RoundingDownExpiry.t.sol#L46
Use the default inputs.deltaT value to prevent N from becoming 0. Furthermore, carefully monitor expired options and ensure they are settled to prevent bloating the active options list.
Critical
Critical
0.2587
The vulnerability originates from the way the protocol computes the time step deltaT for option pricing. The contract derives deltaT by dividing the remaining seconds to expiry (secondsToExpiry) by a constant of 15. Because Solidity integer division truncates toward zero, any option with less than 15 seconds remaining ...