query
large_stringlengths
39
1.7k
ground_truth_code
large_stringlengths
26
116k
severity
large_stringclasses
3 values
vuln_type
large_stringclasses
95 values
report_name
large_stringclasses
16 values
audit_firm
large_stringclasses
7 values
report_date
large_stringclasses
10 values
source
large_stringclasses
10 values
HIGH severity: Impossible for user to get refund after re-joining a rescheduled game which is subsequently cancelled. **Description:** Impossible for user to get refund after re-joining a rescheduled game which is subsequently cancelled. **Impact:** The user's fee for joining the game is permanently locked inside the ...
function test_gameRescheduled_Leave_JoinAgain_GameCancelled_UserRefundReverts() public { // create a game uint256 timeAfterRescheduling = sessionManager.minimumRescheduleTime(); _createGame(); uint256 rescheduleDelta = type(uint256).max - sessionManager.getStartTime(1); // user joins the game u...
HIGH
holdout_Solodit
LOW severity: Stablecoin interest being lower than jTokens seems inconsistent + Tokens with different volatilities pay the same fee. **Impact** Generally speaking jAssets will be more volatile and riskier than a stablecoin that denominates them The logic for `getBorrowingRate` charges more for stableCoins than for jA...
function getBorrowingRate(bool isStableCoin) public view override returns (uint) { if (!isStableCoin) return borrowingFeeFloor; return _calcBorrowingRate(stableCoinBaseRate); }
LOW
holdout_Solodit
HIGH severity: MarketMaker.sol is vulnerable to inflation attacks. **Details** [FundingMath.sol#L21-L37](https://github.com/SportsFI-UBet/ubet-contracts-v1/blob/2766b47bed2cf027e29053af2afc4d35256747a5/contracts/funding/FundingMath.sol#L21-L37) function calcFunding(uint256 collateralAdded, uint256 totalShares, u...
function calcFunding(uint256 collateralAdded, uint256 totalShares, uint256 poolValue) internal pure returns (uint256 sharesMinted) { if (totalShares == 0) { // funding when LP pool is empty sharesMinted = collateralAdded; } else { // mint LP tokens proportional to how much value the new investment // brings to the pool
HIGH
holdout_Solodit
MEDIUM severity: Resolving a frozen investor causes all the pending payouts for the entire time the investor was frozen to be lost. **Description:** When an investor is frozen, they do not receive payouts while the freeze is active. However, once the sanction is lifted, the investor is entitled to receive the accumulat...
//ChildToken.sol// function resolveUser(address oldAddress, address newAddress) external nonReentrant restricted { ... _resolvePay(oldAddress, newAddress); // moves any unclaimed payouts to new account ... } //DividendManager.sol// function _resolvePay(address oldAddress, address ne...
MEDIUM
holdout_Solodit
LOW severity: Extra debug events are present in PrivateDistribution smart contract. **Description** PrivateDistribution utilizes library hardhat/console.sol for debugging events. **Snippet**: **Recommendation**: Remove debug events.
console.log("Withdrawable Tokens: %s", tokensAvailable); console.log("Everyday Percentage: %s, Days: %s, Current Unlock %: %s",everyDayReleasePercentage, noOfDays, currentUnlockedPercentage);
LOW
holdout_Solodit
HIGH severity: Owner calling `LSSVMPair::changeSpotPrice` can cause arithmetic over/underflows on later swaps. **Description:** Changing the spot price to a value higher than the current ERC20 (or ETH) balance of the pair can cause unintended reverts in valid swap calls later on. **Proof of Concept:** Full proof of c...
‌// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "forge-std/Test.sol"; import {InvariantERC721LinearERC20} from "./InvariantERC721LinearERC20.t.sol"; import {IERC721Mintable} from "../interfaces/IERC721Mintable.sol"; contract SwapArithmeticOverflow is InvariantERC721LinearERC20 { function setUp() p...
HIGH
holdout_Solodit
LOW severity: [ETRP-8] Non-uniform Distribution in Random Nonce Generation Due to JavaScript Number Precision Limitations. **Severity:** Low **Description:** The randomNonce() function in jub/jub.ts uses Math.random() and Number() type conversion to generate random nonces, which can lead to non-uniform distribution of...
console.log("Number.MAX_SAFE_INTEGER:", Number.MAX_SAFE_INTEGER); // 9007199254740991 console.log("2n ** 53n:", 2n ** 53n); // 9007199254740992 console.log(Number(2n ** 53n) + 1); // 9007199254740992 console.log(Number(2n ** 53n) + 2); ...
LOW
holdout_Solodit
HIGH severity: Spender can front-run calls to modify token allowances, resulting in DoS and/or spending more than was intended. **Description:** When updating the allowance for a spender that is less than the value currently set, a well-known race condition allows the spender to spend more than the caller intended by f...
require( currentAllowance >= subtractedValue, "Silo: decreased allowance below zero" );
HIGH
holdout_Solodit
LOW severity: [TOKE-11] AutopoolETH redeem incorrectly calculates remaining pull from idle. **Severity:** Medium **Path:** vault/libs/AutopoolDebt.sol:redeem#L791 **Description:** This library function is responsible for pulling assets back from DestinationVaults to let the user redeem their shares for underlying as...
if ( info.assetsPulled < assets && info.debtMinDecrease < assets && info.currentIdle > 0 && exhaustedDestinations ) { uint256 remaining = assets - Math.max(info.assetsPulled, info.debtMinDecrease); if (remaining < info.currentIdle) { info.assetsFromIdle = remaining; } else { info.assets...
LOW
holdout_Solodit
MEDIUM severity: `collateralizationRatio` can be set higher than 100% which would result in no positions getting liquidated.. **Severity**: Medium **Status**: Resolved **Description** The `updateCollateralizationRatio()` within the `VaultFacet.sol` function is used by the owner to change the collateralizationRatio ...
if (currentCollateral <= (s.CollateralizationRatio[_indexToken] * position.collateral) / BASIS_POINTS_DIVISOR) { return (true, currentCollateral); }
MEDIUM
holdout_Solodit
LOW severity: `SecuritizeAmmNavProvider` trades when pool price and anchor price differ can leak value. **Description:** Due to the asymmetric smoothing formula and integer truncation, a BUY followed by an immediate SELL at the same `anchorPriceWad` and `marketStatus = CLOSED_MARKET` can return more quote than initiall...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; import "forge-std/Test.sol"; import {SecuritizeAmmNavProvider} from "../contracts/nav/SecuritizeAmmNavProvider.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; contract AssetMock { uint8 public decimals = 6; } cont...
LOW
holdout_Solodit
LOW severity: Direct amount assignment in `SherpaUSD::ownerMint`/`ownerBurn` can break accounting for totalStaked and accountingSupply. **Description:** Functions `SherpaUSD::ownerMint` and `ownerBurn` directly assign the amount parameter to mappings `approvedTotalStakedAdjustment` and `approvedAccountingAdjustment`. T...
function ownerMint(address to, uint256 amount) external onlyOperator { _mint(to, amount); // Approve vault to adjust by this amount approvedTotalStakedAdjustment[to] = amount; approvedAccountingAdjustment[to] = amount; emit PermissionedMint(to, amount); emit RebalanceApprovalSet(to, amount, am...
LOW
holdout_Solodit
LOW severity: Incorrect/inconsistent comment with implementation for `Locker.sol`. **Severity**: Low **Status**: Resolved **Location**: Locker.sol **Description** There is inconsistency in the comments and implementation in Locker.sol. The following code on line: 12 states that the contract implements IERC721Receiv...
line: 12 /// @dev Implements both IERC721Receiver for handling incoming ERC721 tokens and ReentrancyGuard for secure native token transfers.
LOW
holdout_Solodit
HIGH severity: Attacker Can Grief The Management Fee To Be Lesser Than Expected. **Severity**: Critical **Status**: Resolved **Description** Fee is accrued when the share value increases / accrues value , then anyone can call the takeFees function which will accrue performance and management fee and send it to the ...
if (shareValue > fees_.highWaterMark) fees.highWaterMark = shareValue; if (fee > 0) _mint(fees_.feeRecipient, convertToShares(fee)); fees.feesUpdatedAt = uint64(block.timestamp); return managementFee > 0 ? managementFee.mulDivDown( totalAssets() * (bl...
HIGH
holdout_Solodit
HIGH severity: Avoid floating pragma unless creating libraries. **Description:** Per [SWC-103](https://swcregistry.io/docs/SWC-103/) compiler versions in pragmas should be fixed unless creating libraries. Choose a specific compiler version to use for development, testing and deployment, eg: **Mode:** Fixed in commit.....
- pragma solidity ^0.8.19; + pragma solidity 0.8.19;
HIGH
holdout_Solodit
LOW severity: TRST-Rounding error causes an additional iteration of DCA strategies. **Description:** Both CoW strategies receive an interval and total amountIn of tokens to swap. They calculate the amount per iteration as below: **Impact:** There is a precision loss error in the amountIn calculation. It will result in...
Types.TokenRequest[] memory tokens = new Types.TokenRequest[](1); tokens[0] = Types.TokenRequest({token: inputToken, amount: amountIn}); amountIn = amountIn / iterations; StrategyParams memory params = StrategyParams({ tokenIn: inputToken, tokenOut: outputToken, amountToSwap: amountIn, interval: int...
LOW
holdout_Solodit
LOW severity: [G-01] Gas Optimization: Can skip check to save 200 gas. **Impact** `performUpkeep` has a check to verify if there's any re-lockable balance https://github.com/onchainification/aura_locker_v2/blob/07294ae3638909ecd768a6a0f831fa513abe91a0/src/AuraLockerModule.sol#L112-L113 If the check fails, the call w...
/// @notice The actual execution of the action determined by the `checkUpkeep` method (AURA locking) function performUpkeep(bytes calldata /* _performData */ ) external override onlyKeeper { if (!_isModuleEnabled()) revert ModuleNotEnabled(); (, uint256 unlockable,,) = AURA_LOCKER.lockedBalances(ad...
LOW
holdout_Solodit
MEDIUM severity: Uptime loss due to integer division in `UptimeTracker::computeValidatorUptime` can make validator lose entire rewards for an epoch. **Description:** `UptimeTracker::computeValidatorUptime` loses validator uptime due to integer division truncation when distributing uptime across multiple epochs. This re...
// UptimeTracker::computeValidatorUptime // Distribute the recorded uptime across multiple epochs if (elapsedEpochs >= 1) { uint256 uptimePerEpoch = uptimeToDistribute / elapsedEpochs; // @audit integer division for (uint48 i = 0; i < elapsedEpochs; i++) { uint48 epoch = lastUptimeEpoch + i; if ...
MEDIUM
holdout_Solodit
HIGH severity: Market direction signature can be abused if privateKeeperMode is disabled. **Details** https://github.com/Buffer-Finance/Buffer-Protocol-v2_5/blob/84b6060b4447b2550de595202e8820c7f515988b/contracts/core/BufferRouter.sol#L233-L246 if ( !Validator.verifyMarketDirection( ...
if ( !Validator.verifyMarketDirection( params, queuedTrade, optionInfo.signer ) ) { emit FailUnlock( params.optionId, params.targetContract, "Router: Wrong market direction" ); continue; }
HIGH
holdout_Solodit
HIGH severity: [LYSWP2-6] Discrepancy between the actual locked and stored amount of tokens when using fee-on-transfer tokens. **Severity:** Medium **Path:** chains/evm/solidity/contracts/HashedTimeLockERC20.sol#L337-L350 **Description:** To bridge the funds the user needs to lock their funds on one chain to later un...
if (token.balanceOf(msg.sender) < amount + reward) revert InsufficientBalance(); if (token.allowance(msg.sender, address(this)) < amount + reward) revert NoAllowance(); token.safeTransferFrom(msg.sender, address(this), amount + reward); contracts[Id] = HTLC( amount, hashlock, uint256(1), tokenContract, timel...
HIGH
holdout_Solodit
MEDIUM severity: [UFAR9] Investor withdrawals may not function with a nonzero withdrawalLockupPeriod. **Severity:** High **Path:** contracts/main/contracts/pool/UFarmPool.sol#L517 **Description:** `UFarmPool::withdraw` allows for a permissionless two-step withdrawal process for non-member investors if a nonzero `with...
//contracts/main/contracts/pool/UFarmPool.sol#L496-L540 ... function withdraw( SignedWithdrawalRequest calldata _withdrawalRequest ) external override ufarmIsNotPaused nonReentrant { _checkStatusForFinancing(false); IPoolAdmin.PoolConfig memory config = IPoolAdmin(poolAdmin).getConfig();...
MEDIUM
holdout_Solodit
HIGH severity: Users can provide old price feeds to trade in their favor. **Description:** The function [set_underlying_px](https://github.com/deriverse/protocol-v1/blob/30b06d2da69e956c000120cdc15907b5f33088d7/src/state/instrument.rs#L224) is being called from many places in code, its setting the underlying price from...
let feed_id = next_account_info!(accounts_iter)?; if self.header.feed_id == *feed_id.key { let oracle_px = i64::from_le_bytes(feed_id.data.borrow()[73..81].try_into().unwrap()); let oracle_exponent = 9 + i32::from_le_bytes(feed_id.data....
HIGH
holdout_Solodit
LOW severity: TRST-Autotrader can steal gas. **Description:** The autotrader receives gas compensation for the invocation of a trade action. Note that **tx.gasprice** is controlled by the sender, by passing an arbitrary priority fee. This way, the fee calculation may grant them a large profit. The key point is that *...
if (useGasStation && (msg.sender == _autoTrader) && (_autoTrader != vlt.operator())) { //operator pays gas to _autoTrader for auto trades uint256 gasPrice = tx.gasprice; if (gasPrice == 0){ gasPrice = 1; } uint256 fee = gasPrice * (gasStart - gasleft(...
LOW
holdout_Solodit
LOW severity: Temporary denial-of-service when in-flight messages are not executed before a deprecated Wormhole Guardian set expires. **Description:** Wormhole exposes a governance action in [`Governance::submitNewGuardianSet`](https://github.com/wormhole-foundation/wormhole/blob/eee4641f55954d2d0db47831688a2e97eb20f7e...
function submitNewGuardianSet(bytes memory _vm) public { ... // Trigger a time-based expiry of current guardianSet expireGuardianSet(getCurrentGuardianSetIndex()); // Add the new guardianSet to guardianSets storeGuardianSet(upgrade.newGuardianSet, upgrade.newGuardianSetIndex); // Makes the ne...
LOW
holdout_Solodit
MEDIUM severity: Referral Incentives Disabled for All Legitimate Users During Any Liquidation. **Description:** Once the engine detects any instrument that requires liquidation (`is_long_margin_call` or `is_short_margin_call`), the `margin_call` flag is set to true for every subsequent `new_perp_order`. This flag is pa...
let margin_call = engine.is_long_margin_call() || engine.is_short_margin_call(); if !margin_call { engine.state.header.perp_spot_price_for_withdrowal = engine.state.header.perp_underlying_px; } if engine.cross(price, OrderSide::Ask) { (remaining_qty, _, ref_payment) = engine.match_ask_order...
MEDIUM
holdout_Solodit
MEDIUM severity: Wrong `avgDepositPrice` calculated. **Severity**: Medium **Status**: Resolved **Description** In Contract VaultETH_V2, the method Request_BuyETH(...) allows users to buy ETH using ZeUSD tokens. In the method, the epoch’s average deposit price is calculated as follows: `tempEpochInfo.avgDepositPric...
tempEpochInfo.avgDepositPrice = (tempEpochInfo.rmDeposit * tempEpochInfo.avgDepositPrice + sendAmt * ethPrice) / (tempEpochInfo.rmDeposit + sendAmt); *// Update the total deposit Ether amount for the epoch* tempEpochInfo.rmDeposit += ethA...
MEDIUM
holdout_Solodit
HIGH severity: Inefficient storage layout in `LINKMigrator.Migration`. **Description:** Here's the [`LINKMigrator.Migration`](https://github.com/stakedotlink/contracts/blob/0bd5e1eecd866b2077d6887e922c4c5940a6b452/contracts/linkStaking/LINKMigrator.sol#L31-L38) struct: This struct occupies more than 256 bits and there...
struct Migration { // amount of principal staked in Chainlink community pool uint128 principalAmount; // amount to migrate uint128 amount; // timestamp when migration was initiated uint64 timestamp; }
HIGH
holdout_Solodit
LOW severity: Missing Sanity checks. **Severity**: Low **Status**: Resolved **Description** It was found that the constructor of the Airdrops.sol smart contract does not include checks to validate the provided parameters are not zero. Although this is not critical, failing to perform this validation can lead to unex...
30: constructor(bytes32 _merkleRoot, address _rewardContract) { 31: merkleRoot = _merkleRoot; 32: rewardContract = _rewardContract; 33: }
LOW
holdout_Solodit
HIGH severity: `PledgeManager::pledge`, `refundTokens` will revert due to overflow when `pricePerToken * numTokens > type(uint32).max`. **Description:** `PledgeManager::pledge` multiplies two `uint32` variables and stores the result into a `uint256`, attempting to account for when the multiplication returns a value gre...
uint256 stablecoinAmount = pricePerToken * numTokens; // account for overflow uint256 refundAmount = numTokens * pricePerToken; //TOOD: overflow check $ chisel Welcome to Chisel! Type `!help` to show available commands. ➜ uint32 a = type(uint32).max; ➜ uint32 b = 10; ➜ uint256 c = a * b; Traces: [401] 0xBd770416a33...
HIGH
holdout_Solodit
LOW severity: [ETRP-7] Improper validation of message padding during Poseidon decryption in EERC SDK. **Severity:** Low **Path:** src/crypto/poseidon/poseidon.ts:L199 **Description:** `poseidonDecrypt` function implements decryption of the transfer amounts and balances via Poseidon decryption algorithm described in t...
if (length > 3) { if (length % 3 === 2) { checkEqual( msg[msg.length - 1], this.field.zero, this.field, "The last element of the message must be 0", ); } else if (length % 3 === 1) { checkEqual( msg[msg.length - 1], this.field.zero, this.field, "The last e...
LOW
holdout_Solodit
HIGH severity: updateBalances Should Be Called Before collectFees(). **Severity** - High **Status** - Resolved **Description** When increasePosition is invoked in the trade facet , the borrow interest is accumulated using the collectFees() function uint256 fee = collectFees(position); The collectFees() function ca...
function collectFees(Position memory _position) internal returns (uint256) { uint256 interestFactor = s.cumulativeInterestRate[_position._indexToken] - _position.entryCumulativeInterestRate; uint256 interest = (interestFactor * _position.reserveAmount) / (INTERESTRATE_DECIMALS * 365 * 86_400); e...
HIGH
holdout_Solodit
HIGH severity: TRST-The attacker can use larger dust when opening a position to perform griefing attacks. **Description:** When opening a position, unused assets are sent to **dustVault** as dust, but since these dust are not subtracted from **inputAmt**, they are included in the calculation of **positionOpenUSDValue...
uint inputTotalUSDValueE36; for (uint i; i < openTokenInfos.length; ) { inputTotalUSDValueE36 += openTokenInfos[i].inputAmt * tokenPriceE36s[i]; borrowTotalUSDValueE36 += openTokenInfos[i].borrowAmt * tokenPriceE36s[i]; unchecked { ++i;...
HIGH
holdout_Solodit
LOW severity: Missing checks for sending assets to non existent dNFTs. There are two places in the code where the user inputs the id of the dNFT they would like to send assets to. - In deposit(), the user sends msg.value directly to the dNFT - In move(), the user sends their own shares to another dNFT In both cases, ...
function test_CanDepositToNonExistantId() public { dNft.deposit{value: 5000 ether}(987654321); } function deposit(uint id) external payable returns (uint) { require(id < totalSupply(), "dNFT does not exist"); return _deposit(id); }
LOW
holdout_Solodit
MEDIUM severity: Nonce Verification Missing in `permit` Function. **Severity**: Medium **Status**: Unresolved **Source**: ./UniswapV2ERC20.sol **Description**: The `permit` function does not include a check to verify that the nonce used in the signature is correct and has not been used before. This omission can le...
mapping (address => uint) public nonces; function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s, uint nonce) external { require(deadline >= block.timestamp, 'UniswapV2: EXPIRED'); require(nonce == nonces[owner], 'UniswapV2: INVALID_NONCE'); ...
MEDIUM
holdout_Solodit
LOW severity: Inconsistent stake calculation due to mutable `vaultManager` reference in `AvalancheMiddleware`. **Description** The `AvalancheL1Middleware` contract permits updating the `vaultManager` reference. However, doing so can introduce **critical inconsistencies** in logic that depends on stateful or historical...
function test_changeVaultManager() public { // Move forward to let the vault roll epochs uint48 epoch = _calcAndWarpOneEpoch(); uint256 operatorStake = middleware.getOperatorStake(alice, epoch, assetClassId); console2.log("Operator stake (epoch", epoch, "):", operatorStake); ass...
LOW
holdout_Solodit
MEDIUM severity: Transaction displacement can lead to the referrer not being able to earn.. **Severity**: Medium **Status**: Acknowledged **Description** The `registerReferral()` function in the Referrals.sol smart contract is used to assign a referral code to a new trader, or in other words, register a referred us...
Registration memory registration = Registration({ registrationTime: block.timestamp, referralCode: referralCode, hasRegistered: true });
MEDIUM
holdout_Solodit
LOW severity: Missing zero output validation in `SecuritizeAmmNavProvider` quote and buy functions. **Description:** `SecuritizeAmmNavProvider::quoteBuyBase, quoteSellBase, executeBuyBase, executeSellBase` lack validation that output values are non-zero. Apart from issues already mentioned where rounding down to zero c...
uint256 scaleDown = 10 ** (18 - d); execPrice = rawExecPriceWad / scaleDown; baseReserves = newBase; quoteReserves = newQuote; k = newBase * newQuote; function executeBuyBase( uint256 amountInQuote, uint256 anchorPriceWad, uint8 marketStatus ) external onlyRole(EXECUTOR_ROLE) returns (uint256 baseOu...
LOW
holdout_Solodit
LOW severity: `automationsToIndex` storage is not correctly reset when deleting automations. **Description:** When deleting an automation, the logic pops the final element from the `_usedInAutomations` array but fails to correctly reset the `automationsToIndex` mapping storage. Regardless of whether the if statement ex...
function _deleteAutomation(address wallet, uint32 id) internal { bytes32 automationSID = getStorageId(wallet, id); Automation memory _automation = automations[automationSID]; uint32[] storage _usedInAutomations = strategiesUsed[getStorageId(wallet, _automation.strategyId)]; @> uint32 _act...
LOW
holdout_Solodit
LOW severity: Incorrect Comment about blocks and adjustments. **Impact** Quill will reduce the min debt by a factor of 10 Bold had a potential risk when batch debt shares were rebased The exploit was fixed and as far I was able to tell the system is safe from this exploit Out of caution, as to maintain a similar ri...
uint128 constant MIN_INTEREST_RATE_CHANGE_PERIOD = 120 seconds; // prevents more than one adjustment per ~10 blocks /// @audit this is MAINNET
LOW
holdout_Solodit
HIGH severity: Incorrect comment regarding the configuration of `DebtToken::FLASH_LOAN_FEE` parameter. **Description:** `DebtToken::_flashFee` divides by `10000`, hence if `FLASH_LOAN_FEE = 1` then: So the comment indicating that 1 = 0.0001% is incorrect: **Bima:** Fixed in commit [4ae0be3](https://github.com/Bima-La...
File: DebtToken.sol - uint256 public constant FLASH_LOAN_FEE = 9; // 1 = 0.0001% + uint256 public constant FLASH_LOAN_FEE = 9; // 1 = 0.01%
HIGH
holdout_Solodit
HIGH severity: `get_by_tag` tries to access out of bound index. **Description:** The [get_by_tag](https://github.com/deriverse/protocol-v1/blob/30b06d2da69e956c000120cdc15907b5f33088d7/src/program/constants.rs#L4) contains an off-by-one error in its loop condition. The function iterates using [while i <=...
pub const fn get_by_tag<const TAG: u32>( continer: CandleRegister, ) -> Result<CandleParams, DeriverseError> { let mut i = 0; while i <= continer.candles.len() { // BUG: should be `<` not `<=` if continer.candles[i].tag == TAG { // Out-of-bounds when i == len return Ok(continer.candle...
HIGH
holdout_Solodit
HIGH severity: Linearity assumption on the royalty can lead to denial of service. **Description:** `VeryFastRouter::swap` relies on the internal functions [`VeryFastRouter::_findMaxFillableAmtForSell`](https://github.com/sudoswap/lssvm2/blob/78d38753b2042d7813132f26e5573c6699b605ef/src/VeryFastRouter.sol#L556) and...
VeryFastRouter.sol 576: // Perform binary search 577: while (start <= end) { 578: // We check the price to sell index + 1 579: ( 580: CurveErrorCodes.Error error, 581: /* newSpotPrice */ 582: , 583: /* newDelta */ 58...
HIGH
holdout_Solodit
LOW severity: Closedown condition is inconsistent with the stated documentation of majority agreement. **Severity:** Low **Description:** [Documentation](https://hackmd.io/CPINxScvSE2vo-t8mwY_Og#Risks) states the following: _"Closing the Contract: If the majority of the pets agree, they can vote to close the contract...
/// @notice Close down the contract if majority wants it, after closedown everyone can withdraw without getting a yield cut and no pet can die. function closedown(uint256[] memory _idsOfMajorityThatWantsClosedown) external { ... }
LOW
holdout_Solodit
LOW severity: Remove comments which no longer apply. **Description:** Comments which no longer apply should be removed as they are now misleading. File: `L1MessageServiceV1.sol` File: `L1MessageService.sol` **Linea:** Fixed in [PR256](https://github.com/Consensys/linea-monorepo/pull/256) commits...
// @audit `claimMessage` no longer uses `_messageSender` so these comments are incorrect * @dev _messageSender is set temporarily when claiming and reset post. Used in sender(). * @dev _messageSender is reset to DEFAULT_SENDER_ADDRESS to be more gas efficient. // @audit `_messageSender` no longer initialized as ...
LOW
holdout_Solodit
LOW severity: Potential replay attacks due to static DOMAIN_SEPARATOR. **Description:** The DOMAIN_SEPARATOR is set only once during initialization and includes `block.chainid`. This could theoretically enable cross-chain replay attacks in the event of a hard fork. Although the contract implements a nonce system (`mapp...
function initialize(...) public override initializer onlyProxy { // ... other initialization code ... DOMAIN_SEPARATOR = keccak256( abi.encode( EIP712_DOMAIN_TYPE_HASH, NAME_HASH, VERSION_HASH, block.chainid, //@audit-issue LOW this can change in the cas...
LOW
holdout_Solodit
HIGH severity: Use low-level `call()` to prevent gas griefing attacks when returned data not required. **Description:** Using `call()` when the returned data is not required unnecessarily exposes to gas griefing attacks from huge returned data payload. For [example](https://github.com/dexe-network/DeXe-Protocol/tree/f2...
(bool status, ) = payable(receiver).call{value: amount}(""); require(status, "Gov: failed to send eth"); (bool status, bytes memory data ) = payable(receiver).call{value: amount}(""); require(status, "Gov: failed to send eth"); bool status; assembly { status := call(gas(), receiver, amount, 0, 0, 0, 0) }
HIGH
holdout_Solodit
LOW severity: Using bools for storage incurs overhead. **Description:** Use uint256(1) and uint256(2) for true/false to avoid a Gwarmaccess (100 gas), and to avoid Gsset (20000 gas) when changing from ‘false’ to ‘true’, after having been ‘true’ in the past. See...
File: factory/PoolFactory.sol 41: mapping(bytes32 => bool) private _usedSalts; File: gov/GovPool.sol 76: bool public onlyBABTHolders; File: gov/validators/GovValidators.sol 35: mapping(uint256 => mapping(bool => mapping(address => mapping(bool => uint256))))
LOW
holdout_Solodit
HIGH severity: GM tokens were deposited but no shares were minted. **Severity**: High **Status**: Resolved **Description** In Contract GlmManger.sol, the method getGmTokenValueInUSDC() has the following logic: Here if `_amount` is less than 1e12 (let’s say 1e11), the return will be (1e30*1e11*1e6)/(1e48) = 0 but th...
uint256 gmTokenPrice = IGlmPriceReader(glm.priceReader).getMarketTokenPrice(_gmToken); uint256 usdcPrice = IGlmPriceReader(glm.priceReader).getTokenPrice(USDC) / 1e18; return ((gmTokenPrice * _amount) * usdcPrice) / 1e30 / 1e18; //return 1e6
HIGH
holdout_Solodit
HIGH severity: Alligator gives gas refunds but does not receive gas refunds. The `AlligatorV2.sol` contract has a function `castRefundableVotesWithReasonBatched()` which tracks the gas used and provides a refund to the user. This mirrors the functionality used by `NounsLogicV2` to provide voting refunds. However, whil...
function castRefundableVotesWithReasonBatched( Rules[] calldata proxyRules, address[][] calldata authorities, uint256 proposalId, uint8 support, string calldata reason ) external whenNotPaused { uint256 startGas = gasleft(); castVotesWithReasonBatched(proxyRules, authorities, proposalId, sup...
HIGH
holdout_Solodit
HIGH severity: Investors will not be able to withdraw tokens after the end of the vesting duration for Ecosystem in UnmarshalTokenVesting. **Description** Array ecosystemVesting length is equal to 50. If more than 50 months have passed since the initial time function _calculateAvailablePercentage will lead to error. ...
if (currentTimeStamp > _initialTimestamp) { if (distributionType == DistributionType.ECOSYSTEM) { return ecosystemVesting[noOfMonths];
HIGH
holdout_Solodit
HIGH severity: [RUS4] Lack of slippage protection in withdraw functions. **Severity:** Medium **Path:** src/periphery/RushRouter.sol, src/periphery/RushRouterAlpha.sol **Description:** The `withdraw()` and `withdrawETH()` functions both call `redeem()` on the LiquidityPool. However, these functions don't have a slipp...
function withdraw(uint256 amount) external { // Calculate the amount of shares to redeem. uint256 shares = LIQUIDITY_POOL.previewWithdraw(amount); // Transfer the amount of shares to this contract. IERC20(LIQUIDITY_POOL).transferFrom({ from: msg.sender, to: address(this), value: shares ...
HIGH
holdout_Solodit
LOW severity: `InstanceDeployer` - Could use constant for Flag Previous Owner. Could use CONSTANT instead of `1` https://github.com/solidity-labs-io/kleidi/blob/1a06ac16bc99d0b4081281329d03064c3737f5e4/src/InstanceDeployer.sol#L294-L302
calls3[index++].callData = abi.encodeWithSelector( OwnerManager.swapOwner.selector, /// previous owner address(1), /// old owner (this address) address(this), /// new owner, the first owner the caller wants to add ...
LOW
holdout_Solodit
HIGH severity: ThrottledExit contract is affected by Out-of-gas error, because of usage of cycle to calculate nextAvailableExitBlock in case if current mined block is far in future comparing to initial nextAvailableExitBlock.. **Recommendation**: Instead of doing iterations it is better to use mathematical formula to c...
nextAvailableExitBlock = nextAvailableExitBlock + ((block.number - nextAvailableExitBlock) / throttleRoundBlocks + 1) * throttleRoundBlocks
HIGH
holdout_Solodit
HIGH severity: Lack of Return Value Validation in ERTransfer. **Severity**: Low **Status**: Acknowledged **Location**: AgentImplementation.sol **Description** The smart contract initiates ERC20 token transfers without validating the return value of the transfer operation. Failing to check the return value may resul...
if (_pFILBalance > 0) { IPFIL(pFIL).transfer(owner, _pFILBalance); } IPFIL(pFIL).transferFrom(msg.sender, address(this), _receive);
HIGH
holdout_Solodit
HIGH severity: `StakingOperations.claim` doesn't update reward debt, allowing multiple claims. **Impact** User rewards are computed as `((user.amount * accRewardPerShare) / REWARD_DECIMALS) - user.rewardDebt;` `user.rewardDebt = (user.amount * pool.accRewardPerShare) / REWARD_DECIMALS;` is set in deposit and withdraw...
function claim(ISwapPair _pid) external override { requireValidPool(_pid); _claim(_pid, msg.sender); } function batchClaim(ISwapPair[] memory _pids) external override { uint length = _pids.length; for (uint n = 0; n < length; n++) { requireValidPool(_pids[n]); _claim(_pids[n], msg.sende...
HIGH
holdout_Solodit
MEDIUM severity: The decimal unit discrepancy in `lockedVeTokenUsdcValue` Function. **Severity**: Medium **Status**: Resolved **Location**: EligibilityDataProvider.sol **Description** The `lockedVeTokenUsdcValue` function does not accurately return the value in proper decimal units. The issue arises because both `...
// [AUDIT] the result decimal units of priceOfAPuffInEth equals the decimal units of price uint256 priceOfAPuffInEth = 1e18 / priceOfEthInApuff; //1 Apuff to eth
MEDIUM
holdout_Solodit
MEDIUM severity: \_convertMatchOrders will fail to function properly for lenders if any borrower has canceled a matched order. **Details** function killBorrowerMatch(address lender) external returns (uint256 lenderAmount, uint256 borrowerReturn) { MatchOrder[] storage matches = _userMatchedOrders[lender]; ...
uint256 len = matches.length; for (uint256 i = 0; i != len; ++i) { if (matches[i].borrower == msg.sender) { lenderAmount = uint256(matches[i].lCollateral); borrowerReturn = uint256(matches[i].bCollateral); // Zero out the match order to preserve the array's order matches[i] = MatchOrder({lCollateral: 0, bCollateral: 0,...
MEDIUM
holdout_Solodit
HIGH severity: Use existing `available` function in `BeefyVaultConcLiq::balances`. **Description:** `BeefyVaultConcLiq` has an `available` function that [returns](https://github.com/beefyfinance/experiments/blob/14a313b76888581b05d42b6f7b6097c79f3e65c6/contracts/protocol/concliq/vault/BeefyVaultConcLiq.sol#L91-L94) the...
(uint256 stratBal0, uint256 stratBal1) = IStrategyConcLiq(strategy).balances(); (uint256 vaultBal0, uint256 vaultBal1) = available(); return (stratBal0 + vaultBal0, stratBal1 + vaultBal1);
HIGH
holdout_Solodit
MEDIUM severity: In `VoteKickPolicy.onFlag()`, `targetStakeAtRiskWei[target]` might be greater than `stakedWei[target]` and `_endVote()` would revert.. **Severity:** Medium **Description:** `targetStakeAtRiskWei[target]` might be greater than `stakedWei[target]` in `onFlag()`. For example, - At the first time, `strea...
targetStakeAtRiskWei[target] = max(stakedWei[target], streamrConfig.minimumStakeWei()) * streamrConfig.slashingFraction() / 1 ether;
MEDIUM
holdout_Solodit
MEDIUM severity: Infinite loop in the `exitValidators()` prevents users from calling `requestUnstake()`. **Description:** When users call function `requestUnstake()` to request to unstake their ETH, the `CasimirManager` contract will calculate if the current expected withdrawable balance is enough to cover all the queu...
function exitValidators(uint256 count) private { uint256 index = 0; while (count > 0) { uint32 validatorId = stakedValidatorIds[index]; Validator storage validator = validators[validatorId]; // @audit if status != ACTIVE, count and index won't be updated => Infinite loop if (val...
MEDIUM
holdout_Solodit
HIGH severity: [FNG-14] Function should be marked external. **Severity:** Informational **Path:** CErc721.sol:borrowAndInterestBalanceStored#L715-L717 **Description:** The function `borrowAndInterestBalanceStored` is never called internally, therefore, there is no reason for it to be `public` instead of `external`. ...
function borrowAndInterestBalanceStored(address account) public view returns (uint, uint) { return borrowAndInterestBalanceStoredInternal(account); }
HIGH
holdout_Solodit
HIGH severity: TRST-Attacker can freeze profit withdrawals from V3 vaults. **Description:** Users of Ninja can use Vault's `withdrawProfit()` to withdraw profits. It starts with the following check: If attacker can front-run user's `withdrawProfit()` TX and set **lastProfitTime** to block.timestamp, they would eff...
if (block.timestamp <= lastProfitTime) { revert NYProfitTakingVault__ProfitTimeOutOfBounds(); } function harvest() external override whenNotPaused returns (uint256 callerFee) { require(lastHarvestTimestamp != block.timestamp); uint256 harvestSeconds = lastHarvestTimestamp > 0 ? ...
HIGH
holdout_Solodit
HIGH severity: Signature can be reused unlimited number of times. **Severity**: High **Status**: Resolved **Location**: Airdrop.sol **Description** The signature can be reused by a user to claim the airdrop again and again for unlimited number of times every week. If users who do not claim their airdrop, it could r...
// tokens meant for Aliceis claimed by Bob by reusing previous signature await airdropZap .connect(Bob) .claimRewards( 1, chapterIds, erc20RewardsForMultipleChapter, ownerSignature, ); expect(await erc20Token.balanceOf(addr7.address)).to.equal(1000...
HIGH
holdout_Solodit
LOW severity: [EIGEN2-14] Stake deviations due to adding/removing strategy may allow for ejector manipulation. **Severity:** Medium **Path:** src/StakeRegistry.sol#L128-L174 src/StakeRegistry.sol#L727-L731 src/EjectionManager.sol#L135-L163 **Description:** In the StakeRegistry contract, the `updateOperatorsStake()` f...
(uint96[] memory stakeWeights, bool[] memory hasMinimumStakes) = _weightOfOperatorsForQuorum(quorumNumber, operators); int256 totalStakeDelta = 0; // If the operator no longer meets the minimum stake, set their stake to zero and mark them for removal /// also handle setting the operator's stake to 0 and remove the...
LOW
holdout_Solodit
HIGH severity: Malicious user can create delegations that will spend unlimited amount of gas with `SpecificActionERTransferBatchEnforcer` caveat. **Description:** The `SpecificActionERC20TransferBatchEnforcer` first execution has no limit on the calldata size. This allows a malicious user to create delegations that wil...
function beforeHook( bytes calldata _terms, bytes calldata, ModeCode _mode, bytes calldata _executionCallData, bytes32 _delegationHash, address _delegator, address ) public override onlyBatchExecutionMode(_mode) { ... ...
HIGH
holdout_Solodit
HIGH severity: Remove redundant `unary` call from `TradingAccount::getAccountMarginRequirementUsdAndUnrealizedPnlUsd`. **Description:** `TradingAccount::getAccountMarginRequirementUsdAndUnrealizedPnlUsd` [L239](https://github.com/zaros-labs/zaros-core-audit/blob/de09d030c780942b70f1bebcb2d245214144acd2/src/perpetuals/l...
UD60x18 markPrice = perpMarket.getMarkPrice(unary(sd59x18(position.size)), perpMarket.getIndexPrice()); UD60x18 markPrice = perpMarket.getMarkPrice(sd59x18(-position.size), perpMarket.getIndexPrice()); ctx.oldPositionSizeX18 = sd59x18(position.size); - ctx.liquidationSizeX18 = unary(ctx.oldPositionSizeX18); + ctx.liq...
HIGH
holdout_Solodit
LOW severity: Domain separator of FUNG token will temporarily be set to 0 before initialization. In the FUNG token's `initialize()` function, we set the `DOMAIN_SEPARATOR` as follows: This value is then used in permit signatures to ensure they were intended to be applied in this context. However, there is no check th...
DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes("Fung Token")), keccak256(bytes("1")), block.chainid, address(this) ) ); function permit( address owner, add...
LOW
holdout_Solodit
HIGH severity: Divide before multiply loses precision in `FiveFiftyRule::_updateEntityAllowance` and leads to caps being exceeded. **Description:** The function `_updateEntityAllowance` contains This should be `REMOTE_PERCENT_DENOMINATOR * amount / aData.equity` otherwise precision loss occurs. Since `_updateEntityAl...
(REMORA_PERCENT_DENOMINATOR / aData.equity) * amount @@ -505,16 +505,16 @@ contract FiveFiftyRule is UUPSUpgradeable, AccessManagedUpgradeable { // to side changes if (to != address(0)) { IndividualData storage iTo = individualData[to]; - + if (iTo.isEntity) { // if entity -...
HIGH
holdout_Solodit
LOW severity: [MAOR-10] Validator's withdrawn principal could be counted as rewards. **Severity:** High **Path:** lib/withdrawals/withdrawals.go:ComputeWithdrawals#L57-69 **Description:** In order to correctly count withdrawals and separate principal from reward amounts, the oracle uses the `ComputeWithdrawals` func...
if val.WithdrawableEpoch() <= epoch { if val.EffectiveBalance() != 0 { return validator.WithdrawalPossible, nil } else { return validator.WithdrawalDone, nil } } def process_effective_balance_updates(state: BeaconState) -> None: # Update effective balances with hysteresis for index, validator in enumera...
LOW
holdout_Solodit
HIGH severity: Under-funded eth distribution proposals can be created causing claiming rewards to revert. **Description:** It is possible to create under-funded eth distribution proposals as `DistributionProposal::execute()` [L62-63](https://github.com/dexe-network/DeXe-Protocol/tree/f2fe12eeac0c4c63ac39670912640dc91d9...
it("under-funded eth distribution proposals prevents claiming rewards", async () => { // use GovPool to create a proposal with 10 wei reward await govPool.createProposal( "example.com", [[dp.address, wei("10"), getBytesDistributionProposal(1, ETHER_ADDR, wei("10"))]], [], ...
HIGH
holdout_Solodit
LOW severity: `DividendManager::distributePayout` records a new payout record increasing the current payout index for zero `payoutAmount`. **Description:** `DividendManager::distributePayout` records a new payout record increasing the current payout index for zero `payoutAmount`. **Proof of Concept:** **Recommended M...
function test_distributePayout_ZeroPayout() external { // setup one user address user = users[0]; uint256 userRemoraTokens = 1; // whitelist user remoraTokenProxy.addToWhitelist(user); assertTrue(remoraTokenProxy.isWhitelisted(user)); // mint user their tokens remoraTokenProxy.mint(use...
LOW
holdout_Solodit
HIGH severity: First transaction on `SpecificActionERTransferBatchEnforcer` does not support sending native value. **Description:** The `SpecificActionERC20TransferBatchEnforcer` is an enforcer to execute an arbitrary transaction first that is constrained by the delegator and afterwards an ERC20 transfer. Both executio...
function beforeHook( bytes calldata _terms, bytes calldata, ModeCode _mode, bytes calldata _executionCallData, bytes32 _delegationHash, address _delegator, address ) public override onlyBatchCallTypeMode(_mode) onlyDefaultExecut...
HIGH
holdout_Solodit
HIGH severity: Unrestricted call to `setConfig`. **Severity**: Critical **Status**: Resolved **Location:** TokenSaleUSDB.sol, TokenSaleETH.sol **description** The `setConfig()` function within the smart contracts poses a significant security risk due to its unrestricted accessibility. Any wallet or address can call...
function setConfig(Config memory _config, address _creator) external { require(creator == _creator,"Only Creator can Call"); config = _config; }
HIGH
holdout_Solodit
HIGH severity: Users can sell their market seat without paying loss coverage. **Description:** When users incur loss, its covered from available insurance funds and is stored and tracked inside `taker_info4.loss_coverage`, this is what user owes to protocol before he closes his position, because insurance funds have be...
if (*self.perp_info3).bids_entry != NULL_ORDER || (*self.perp_info3).asks_entry != NULL_ORDER || self.current_instr_index >= self.assets.len() { bail!(ClientDataDestruction); } if (*self.perp_info4).loss_coverage > 0 { let delta = ...
HIGH
holdout_Solodit
LOW severity: Lack of slippage protection in liquidity functions. **Description:** The `addLiquidity` and `removeLiquidity` functions do not include any form of slippage protection, such as `minSharesOut` or `minTokensOut` parameters. This means users cannot guard against receiving significantly fewer shares or tokens ...
function testFrontRunAddLiquidity() public { uint256 marketId = _createTestMarket(); address alice = makeAddr("Alice"); address bob = makeAddr("Bob"); deal(address(tokenERC20), alice, 1 ether); deal(address(tokenERC20), bob, 1 ether); // bob sees that alice will add liq...
LOW
holdout_Solodit
HIGH severity: `DepositManager::_refundEntryFee` doesn't deduct referral rewards allowing users to join then leave games to drain tokens via inflated referral rewards they aren't entitled to. **Description:** `DepositManager::_payEntryFee` increments the referral rewards for the user's referrer: But `DepositManager::_...
referralRewards[gameId][Registry(registry).referrers(player)] += pool.ticketPrice * REFERRER_FEE;
HIGH
holdout_Solodit
MEDIUM severity: `performanceFee` CAN LEAD TO DENIAL OF SERVICE (DOS). **Severity**: Medium **Status**: Resolved **Description** The function `updatePerformanceFee()` allows the restricted user to change and set a new `performanceFee`. If performanceFee is set to a value higher than `SAFE_MULTIPLIER` (1e18) it will...
function testPocPerformanceFeeCausePOC() public { vm.startPrank(address(alice)); vault.approveBorrower(address(bob)); // Approve Bob as borrower // Set interest rate ILendingVault.InterestRate memory _interestRate; _interestRate.baseRate = 0; _interestRate.multiplier = 25431914...
MEDIUM
holdout_Solodit
HIGH severity: Lack of events emitted on state changes. **Description:** The following functions should ideally emit an event to enhance transparency and traceability: [`Vault::setDelegateRegistry`](https://github.com/stakedotlink/audit-2025-02-linkpool/blob/046c65a9c771315816bc59533183f52661af8e5e/contracts/linkStaki...
function setDelegateRegistry(address _delegateRegistry) external onlyOwner { delegateRegistry = _delegateRegistry; + emit SetDelegateRegistry(_delegateRegistry); } function setNonLINKRewardReceiver(address _nonLINKRewardReceiver) external onlyOwner { nonLINKRewardReceiver = _nonLINKRewardReceiver; + ...
HIGH
holdout_Solodit
HIGH severity: Malicious user can easily make the protocol revert on every `USDT` swap on Uniswap. **Likelihood:** High, attack can easily be done and it exploits a well-known attack vector of `USDT` **Impact:** Medium, because the protocol will not work with only one ERC20 token, but it is a widely used one **Descri...
TransferHelper.safeApprove( swapParams.token1, address(swapRouter), IERC20(swapParams.token1).balanceOf(address(this)) );
HIGH
holdout_Solodit
HIGH severity: TRST-Users can drain Gelato deposit at little cost. **Description:** In Console automation, fees are collected via the `claimExecutionFees()` modifier: **Impact:** The actual strategy processing happens in _; , then the total fee is calculated using the gas used up to this point. The issue is t...
modifier claimExecutionFees(address _wallet) { uint256 startGas = gasleft(); _; if (feeMultiplier > 0) { address feeToken = FeePayer._feeToken(_wallet); uint256 gasUsed = startGas -gasleft(); (uint256 feeAmount, address recipient, Types.Executable memory feeTransferTxn)=FeePayer._buildFeeExecut...
HIGH
holdout_Solodit
LOW severity: [EIG-17] Operator or delegation approver have the power to censor delegated stakers. **Severity:** Medium **Path:** DelegationManager.sol:undelegate#L213-L257 **Description:** The operator or delegation approver that stakers have delegated to, have the power to selectively censor those stakers. As s...
The staker is able to delegate his shares to another operator only after `withdrawalDelayBlocks` period. Which is 1 week according to the documentation https://github.com/Layr-Labs/eigenlayer-contracts/blob/master/docs/core/StrategyManager.md#strategymanager.
LOW
holdout_Solodit
HIGH severity: Unnecessary price feed address validation in `Ignite::configurePriceFeed`. **Description:** Unlike [`Ignite::addPaymentToken`](https://github.com/Benqi-fi/ignite-contracts/blob/bbca0ddb399225f378c1d774fb70a7486e655eea/src/Ignite.sol#L791), which performs no validation on the price feed address itself, an...
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import "forge-std/Test.sol"; contract TestZeroAddressCall is Test { function test_zeroAddressCall() external { vm.expectRevert(); // see: https://book.getfoundry.sh/cheatcodes/expect-revert#gotcha:~:text=%E2%9A%A0%EF%B8%8F%20Gotcha%3A%20Usage%20with...
HIGH
holdout_Solodit
HIGH severity: `BetFactory::setPool` should validate input pool is legitimate AaveV3 pool and supports input token. **Description:** `BetFactory::setPool` should validate input pool is legitimate AaveV3 pool and supports input token. This can be done by: 1) `BetFactory::constructor` should take as input the address of...
import {IPool} from "@aave-dao/aave-v3-origin/src/contracts/interfaces/IPool.sol"; import {IAToken} from "@aave-dao/aave-v3-origin/src/contracts/interfaces/IAToken.sol"; import {IPoolAddressesProvider} from "@aave-dao/aave-v3-origin/src/contracts/interfaces/IPoolAddressesProvider.sol"; contract BetFactory is Ownable {...
HIGH
holdout_Solodit
MEDIUM severity: TRST-MozBridge underestimates gas for sending of Moz messages. **Description:** The bridge calculates LayerZero fees for sending Mozaic messages using the function below: The issue is that the actual payload used for Mozaic messages is longer than the one calculated above. For example, REPORT_SNAPSHO...
function quoteLayerZeroFee(uint16 _chainId, uint16 _msgType, LzTxObj memory _lzTxParams) public view returns (uint256 _nativeFee, uint256 _zroFee) { bytes memory payload = ""; if (_msgType == TYPE_REPORT_SNAPSHOT) { payload = abi.encode(TYPE_REPORT_SNAPSHOT); } else...
MEDIUM
holdout_Solodit
LOW severity: `TokenLocker::getTotalWeightAt` should loop until input `week` not `systemWeek`. **Description:** `TokenLocker::getTotalWeightAt` should loop until input `week` not `systemWeek`: The current implementation returns the wrong output when `week < systemWeek` and the previous weekly writes have not occurred ...
- while (updatedWeek < systemWeek) { + while (updatedWeek < week) {
LOW
holdout_Solodit
HIGH severity: Attacker can bypass token sale `maxAllocationPerUser` restriction to buy out the entire tier. **Description:** An attacker can bypass the token sale `maxAllocationPerUser` restriction to buy out the entire tier by doing multiple small buys under this limit. **Impact:** Permanent grief for other users wh...
{ metadata: { name: "tier 8", description: "the eighth tier", }, totalTokenProvided: wei(1000), saleStartTime: timeNow.toString(), saleEndTime: (timeNow + 10000).toString(), claimLockDuration: "0", saleTokenAddress: saleToken....
HIGH
holdout_Solodit
HIGH severity: Mechanism to prevent donation attack can be gamed to cause withdrawals to revert causing assets to get stuck on the Strategy. **Description:** Each time a withdrawal occurs, a check is performed to ensure that TrancheShares `totalSupply()` doesn't fall below a pre-defined boundary (`MIN_SHARES`). But, th...
function _withdraw( ... ) internal override { ... _onAfterWithdrawalChecks(); emit Withdraw(caller, receiver, owner, assets, shares); } function _onAfterWithdrawalChecks () internal view { @> if (totalSupply() < MIN_SHARES) { revert MinSharesViolation(); ...
HIGH
holdout_Solodit
HIGH severity: Withdrawers of `sUSDe` always incur a loss because parameters passed from `Tranche::_withdraw` to `CDO::withdraw` are inverted. **Description:** Users can choose to withdraw either `sUSDe` or `USDe`. The system is in charge of making the proper calculations to determine how much `USDe` value will be with...
// Tranche::_withdraw() // function _withdraw( address token, address caller, address receiver, address owner, uint256 baseAssets, uint256 tokenAssets, uint256 shares ) internal virtual { ... //@audit => Burn Trancheshares for the full requested sU...
HIGH
holdout_Solodit
MEDIUM severity: TRST-Deviation from spec will result in dislocation of receiver delegate. **Description:** The LSP0 `universalReceiver()` function looks up the receiver delegate by crafting a mapping key type. Mapping keys are constructed of a 10-byte prefix, 2 zero bytes and a 20-byte suffix. However, followers of...
bytes32 lsp1typeIdDelegateKey = LSP2Utils.generateMappingKey( _LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX, bytes20(typeId));
MEDIUM
holdout_Solodit
HIGH severity: `Karma.sol` doesn't initialize signature variables. **Description:** Karma.sol only calls following initializers: However `ERC20VotesUpgradeable` inherits `ERC20PermitUpgradeable`: **Impact:** It means `Karma.sol` uses `name = ""` and `version = 0` for EIP712 signature, which makes it incompatible with...
contract Karma is Initializable, ERC20VotesUpgradeable, UUPSUpgradeable, AccessControlUpgradeable { function initialize(address _owner) public initializer { ... __ERC20_init(NAME, SYMBOL); __ERC20Votes_init(); __UUPSUpgradeable_init(); __AccessControl_init(); ... ...
HIGH
holdout_Solodit
MEDIUM severity: Pool address can be address(0) and revert due to the same. **Severity**: Medium **Status**: Resolved **Description** In Contract AFiStorage.sol, method getMinimumAmount(...) has the following check: Here, if tokenIn == midTok, the getPool will return address(0) as both of the addresses are the same...
else if(_tokenIn == (midTok) || _tokenOut == (midTok)){ address pool = IAFi(afiContract).getPool(_tokenIn, midTok); amountOut = IUniswapOracleV3(uniswapOracleV3).estimateAmountOutMin( _tokenIn, uint128(_amountIn), midTok, pool ); }else {
MEDIUM
holdout_Solodit
HIGH severity: Method `depositRequest(...)` allows the last deposit to be more than the set deposit cap. **Severity**: High **Status**: Resolved **Description** In Contract Branch.sol, the method `depositRequest()` checks if the `depositCap` has been reached before processing any deposit. However, the deposit cap r...
if (depositCapReached[id]) revert DepositCapReached(TAG, id); if (liquidity > capAmount[id]) { depositCapReached[id] = true; }
HIGH
holdout_Solodit
MEDIUM severity: Require function can't throw exceptions in UnmarshalTokenVesting. **Description** Function _addDistribution is internal. All distributions are declared when deploying the contract including tokens allotment and beneficiary address, so require can’t throw exceptions for _tokensAllotment > 0 and distrib...
require(_tokensAllotment > 0, "the investor allocation must be more than 0"); require(distribution.tokensAllotment == 0, "investor already added");
MEDIUM
holdout_Solodit
HIGH severity: Consolidate unnecessary code duplication in `ConvertFacet::_withdrawTokens`. `ConvertFacet::_withdrawTokens` duplicates the following code in [L119-132](https://github.com/BeanstalkFarms/Beanstalk/blob/dfb418d185cd93eef08168ccaffe9de86bc1f062/protocol/contracts/beanstalk/silo/ConvertFacet.sol#L119-L132) ...
if (a.tokensRemoved.add(amounts[i]) < maxTokens) { //keeping track of stalk removed must happen before we actually remove the deposit //this is because LibTokenSilo.grownStalkForDeposit() uses the current deposit info // @audit start duplicated code depositBDV = LibTokenSilo.removeDepositFromAccount( ...
HIGH
holdout_Solodit
MEDIUM severity: TRST-truncation in reward calculation could cause leakage of rewards. **Description:** In ComplexRewarder.sol, `updatePool()` call updates values in the specified pool. **reward** could be a fairly large number. The decimals of **reward * ACC_TOKEN_PRECISION** is 10**30, because of how ACC_TOKEN_PREC...
uint lpSupply = IVault(VAULT).balance(); if (lpSupply > 0) { uint time = block.timestamp - pool.lastRewardTime; uint reward = totalAllocPoint == 0 ? 0 : ((time * rewardPerSecond * pool.allocPoint) / totalAllocPoint); pool.accRewardPerShare = pool.accRewa...
MEDIUM
holdout_Solodit
LOW severity: [EIG-19] The EigenPod balance update function has to be permissioned. **Severity:** Medium **Path:** EigenPod.sol:verifyBalanceUpdate#L193-L274 **Description:** The `verifyBalanceUpdate()` function is permissionless and, therefore, could be called by anyone with valid proof of a validator's current b...
function verifyBalanceUpdate( uint64 oracleTimestamp, uint40 validatorIndex, BeaconChainProofs.StateRootProof calldata stateRootProof, BeaconChainProofs.BalanceUpdateProof calldata balanceUpdateProof, bytes32[] calldata validatorFields ) external onlyWhenNotPaused(PAUSED_EIGE...
LOW
holdout_Solodit
LOW severity: Inconsistent APR boundary validation between `AprPairFeed` and `Accounting`. **Description:** There is a mismatch between APR boundary validation constants in `AprPairFeed` and `Accounting` contracts. The `AprPairFeed` accepts negative APRs down to -50%, but the `Accounting` contract rejects any negative ...
// AprPairFeed int64 private constant APR_BOUNDARY_MAX = 2e12; // 200% int64 private constant APR_BOUNDARY_MIN = -0.5e12; // -50% /// @dev Validates that the given APR is within acceptable bounds function ensureValid(int64 answer) internal pure { require( APR_BOUNDARY_MIN <= answer && a...
LOW
holdout_Solodit
LOW severity: `SolidlyV2Pair::setPoolFee` fails to adequately consider fee setters defined by `SolidlyV2Factory`. **Description:** If a new `feeSetter` is registered by the owner of `SolidlyV2Factory`, then it is possible for the pool fee to be set below the minimum specified by the factory. This breaks the invariant t...
function setPoolFee(uint16 _poolFee) external { require(ISolidlyV2Factory(factory).isFeeSetter(msg.sender) || msg.sender == copilot, 'UA'); if (msg.sender == copilot) { require(_poolFee >= ISolidlyV2Factory(factory).minFee() && !copilotRevoked); // minimum fee enforced for copilot } else { r...
LOW
holdout_Solodit
MEDIUM severity: Auto redemption will not function due to slippage misconfiguration. **Description:** Both legacy and non-legacy vaults perform a call to `ISwapRouter::exactInput` when attempting to swap collateral to `USDs`, with the `amountOutMinimum` parameter being specified as the USD value of the collateral being...
calculator.tokenToUSD( ITokenManager(ISmartVaultManager(manager).tokenManager()).getTokenIfExists(_collateralAddr), _collateralAmount )
MEDIUM
holdout_Solodit
LOW severity: Lack of Consistency and Misleading Naming in Checks. **Severity** Low Risk **Description** There is a different check implementation in `onlyIfAlreadyClaimed` and `onlyIfAlreadyClaimedMultiple` modifiers for the same check. Additionally, both modifier names ensure that the execution will revert if the ...
if (dailyClaimedStatus[_msgSender()][eventid][logicid] > 0) { if (dailyClaimedStatus[_msgSender()][eventids[i]][logicids[i]] == _CLAIMED) {
LOW
holdout_Solodit