Dataset Viewer
Auto-converted to Parquet Duplicate
query
large_stringlengths
38
1.29k
positive
large_stringlengths
18
171k
hard_negative
large_stringlengths
0
171k
negative_type
large_stringclasses
10 values
source
large_stringclasses
10 values
severity
large_stringclasses
3 values
vuln_type
large_stringclasses
294 values
quality_tier
int64
1
4
__index_level_0__
int64
0
12k
LOW severity: Fees are set to 0 at the first instance. **Severity**: Low **Status**: Resolved **Description** When the `TokenBridgeBase.sol` smart contract is deployed, the `brc20TransferFee`, `runesTransferFee` and `btcTransferFee` are not being set, therefore they are 0. If the corresponding functions to modify ...
constructor( address _endpoint, address _btcBridge, address _superAdmin, address _btcDataFeed, address _nativeDataFeed, uint8 _nativeDecimals ) BridgeRoles(_superAdmin, _btcBridge) NonblockingLzApp(_endpoint) { btcDataFeed = AggregatorV3Interface(_btcDataFeed); ...
function _fractionOfShares( uint256 _assetAmount, uint256 _shares, uint256 _totalShares, bool _isRoundingUp ) internal pure returns ( uint256 amount ) { amount = _isRoundingUp ? _assetAmount.mulDivRoundingUp(_shares, _totalShares): _assetAmount.mulDiv(_shares, _totalShares); }
same_firm_diff_protocol
Solodit
LOW
2
0
HIGH severity: Use explicit sizes instead of `uint`. **Description:** While `uint` defaults to `uint256`, it is considered good practice to use the explicit types including the size and to avoid using `uint`: **Strata:** Fixed in commit [61f5910](https://github.com/Strata-Money/contracts/commit/61f591088754e2666355307...
predeposit/yUSDeDepositor.sol 65: uint beforeAmount = asset.balanceOf(address(this)); 73: uint pUSDeShares = pUSDeDepositor.deposit(asset, amount, address(this)); predeposit/MetaVault.sol 53: uint baseAssets = IERC4626(token).previewRedeem(tokenAssets); 54: uint shares = previewDeposit(base...
/** * @notice Preview the *gross* assets required to mint `shares` * @dev We gross-up the net assets (from base ERC4626 math) by adding the deposit fee on top. */ function previewMint(uint256 shares) public view virtual override returns (uint256) { require(shares > 0, "Cannot mint 0 shares"); // Net assets ...
same_firm_diff_protocol
Solodit
HIGH
2
1
HIGH severity: Fees can become stuck in `UniswapV4Wrapper`. **Description:** When a modification is made to Uniswap V4 position liquidity, such as in the case of a partial `UniswapV4Wrapper` unwrap which decreases liquidity, any outstanding fees are also transferred and required to be completely settled. For multiple h...
function test_finalLosesFeesPoC() public { int256 liquidityDelta = -19999; uint256 swapAmount = 100_000 * unit0; LiquidityParams memory params = LiquidityParams({ tickLower: TickMath.MIN_TICK + 1, tickUpper: TickMath.MAX_TICK - 1, liquidityDelta: liquidityDelta }); (uint256...
calculator.tokenToUSD( ITokenManager(ISmartVaultManager(manager).tokenManager()).getTokenIfExists(_collateralAddr), _collateralAmount )
same_firm_diff_protocol
Solodit
HIGH
2
2
HIGH severity: TRST-It’s never possible to vote for new pools until setMaxVotesForPool() is called. **Description:** The function `_vote()` allows voting on a pool only when the current amount of votes plus the new votes is lower or equal to the value returned by `_calculateMaxVotePossible()`: However, `_calculateMax...
require(_poolWeights <= _calculateMaxVotePossible(_pool), "Max votes exceeded"); return ((totalVotingPower * maxVotesForPool[_pool]) / 100);
- if (debtRatioE18 >= ONE_E18 && startLiqTimestamp == 0) { + if (debtRatioE18 >= IBasePositionViewer(_positionViewer).unmarkLiqDebtRatioE18() && startLiqTimestamp == 0) { // mark liquidatable if the position is unhealthy and is not marked yet pos.startLiqTimestamp = block.time...
same_firm_diff_protocol
Solodit
HIGH
2
3
LOW severity: TRST-_derivedBalance() doesn’t properly apply boosted rewards based on voting power. **Description:** The function `_derivedBalance()` is used to adjust the balance of a pool voter based on his percentage of voting power and LP deposited. However the adjustment is only applied to the Satin / $CASH LP g...
if (underlying != IVe(ve).token()) { return _derived; } if (underlying == IVe(ve).token()) { //⇐ IF EQUAL return _derived; }
function submitProposal(uint8 _actionType, bytes memory _payload) public onlyCouncil { uint256 proposalId = proposalCount; proposals[proposalId] = Proposal(msg.sender,_actionType, _payload, 0, false); proposalCount += 1; emit ProposalSubmitted...
same_firm_diff_protocol
Solodit
LOW
2
4
HIGH severity: Insufficient Validation of Referral Address in mint. **Severity**: High **Status**: Acknowledged **Description** The `mint` function allows users to specify a referral address to receive a discount on the minting fee. However, the referral address is not validated. This means that users can set the re...
_updateGlobalTimeThreshold(); nextMint[partnerNFTAddress][partnerNFTtokenId] = globalTimeThreshold; _updateGlobalTimeThreshold(); nextSignatureMint[signature] = globalTimeThreshold;
function pendingRewards(uint256 tokenId) external view returns (uint256) { StakingPosition storage position = _stakingPositions[tokenId]; uint256 accRewardsPerShare = _accRewardsPerShare; (,,uint256 lastRewardTime, uint256 reserve, uint256 poolEmissionRate) = master.getPoolInfo(address(this)); uint256 ...
same_firm_diff_protocol
Solodit
HIGH
2
5
LOW severity: Unsafe Downcasting in `TokenStableV6_V2`. **Severity**: Low **Status**: Resolved **Description** There is unsafe downcasting on line: 483 and 492. This can result in silent overflows or truncation of the number. **Recommendation**: It is advised to use a safecast library such as that of Openzeppel...
Line: 483 uint16 currentEpoch = uint16((block.number - epochStart) / epochTerm + 1); Line: 492 return uint16((block.number - epochStart) / epochTerm + 1);
function testPOCDeleteMapping() public { vm.startPrank(address(alice)); stakingToken.mint(address(alice), 1 ether); uint _amount = 1 ether; uint _locktype = 0; whitelistChecker.Signer memory _signer; _signer.userAddress = address(alice); _signer.contractAddress = address...
same_firm_diff_protocol
Solodit
LOW
2
6
LOW severity: `TroveNFT.tokenURI` `debt` and `coll` are static and will not reflect interest and redistributions. **Impact** `TroveNFT.tokenURI` is as follows: https://github.com/liquity/bold/blob/c84585881d8c6a5d11d38deee2943ba949a39962/contracts/src/TroveNFT.sol#L33-L48 Which is not using `getLatestTroveData` Th...
function tokenURI(uint256 _tokenId) public view override(ERC721, IERC721Metadata) returns (string memory) { (uint256 debt, uint256 coll,, ITroveManager.Status status,,,, uint256 annualInterestRate,,) = troveManager.Troves(_tokenId); IMetadataNFT.TroveData memory troveData = IMetadataNFT.Tro...
for (uint i = 0; i < _iterations.length; i++) { RedeemIteration memory iteration = _iterations[i]; checkValidRedemptionHint(vars.priceCache, iteration.trove); troveManager.applyPendingRewards(iteration.trove, vars.priceCache); /// @audit The Hint may be wrong NOW, the CR may be underwater now Si...
same_firm_diff_protocol
Solodit
LOW
2
7
HIGH severity: `FarmFacet` functions are susceptible to the draining of intermediate value sent by the caller via reentrancy when execution is handed off to an untrusted external contract. **Description:** The `FarmFacet` enables multiple Beanstalk functions to be called in a single transaction using Farm calls. Any fu...
// signals to Beanstalk functions that they should not refund Eth // at the end of the function because the function is wrapped in a Farm function modifier withEth() { if (msg.value > 0) s.isFarm = 2; _; if (msg.value > 0) { s.isFarm = 1; LibEth.refundEth(); } } function refundEth() ...
function test_deactivateSupplyGauge_usesExistingSpeed() public { // Set existing speeds comptroller.setRewardSpeeds(QITOKEN_1, 1000, 2000); // Only provide borrow gauge, not supply IDistributionGaugeVote.GaugeVote[] memory gauges = new IDistributionGaugeVote.GaugeVote[](1); gauges[0] = IDistributio...
same_firm_diff_protocol
Solodit
HIGH
2
8
LOW severity: Penalty fee can be higher than the user balance. **Severity** : Low **Status** : Resolved **Description** : In Contract locking.sol, the method unlock allows users to unlock their locked tokens but a penalty fee is incurred on them. The amount fee is calculated as follows: Here if the method calculat...
function calculatePenalty(address locker, uint256 balance, uint256 unlockTimestamp) public view returns (uint256) { if (emergencyExit) { return 0; } return (balance * calculatePenaltyFee(locker, unlockTimestamp)) / 10 ** 6; }
function testPOCDeleteMapping() public { vm.startPrank(address(alice)); stakingToken.mint(address(alice), 1 ether); uint _amount = 1 ether; uint _locktype = 0; whitelistChecker.Signer memory _signer; _signer.userAddress = address(alice); _signer.contractAddress = address...
same_firm_diff_protocol
Solodit
LOW
2
9
MEDIUM severity: [RSCO-5] Ecall parameters missing address range check. **Severity:** Medium **Path:** zkvm/src/exec/executor.rs **Description:** The executor’s ecall functions that correspond to their syscalls (`ecall_sha`, `ecall_halt`, `ecall_input`, `ecall_software`, `ecall_bigint`) are missing the security chec...
fn read_mem(&mut self, addr: u32, size: MemAccessSize) -> Option<u32> { if addr < TEXT_START || addr as usize >= SYSTEM.start() { return None; } ... } fn write_mem(&mut self, addr: u32, size: MemAccessSize, store_data: u32) -> bool { if addr < TEXT_START || addr as usize >= SYSTEM.start() { ...
requestsLength = depositQueue.length; while (requestsLength > 0) { [..] } function quexCallback(uint256 receivedRequestId, DataItem memory response) external { [..] { uint256 sharesToMint; uint256 amountToInvest; uint256 totalDeposit; bytes32 depositRequestHash; Queu...
same_firm_diff_protocol
Solodit
MEDIUM
2
10
HIGH severity: Collateral is reduced twice when a position is liquidated by a user different from `protocolLiquidator`.. **Severity**: Critical **Status**: Resolved **Description** The function `liquidatePosition()` within the `Escrow.sol` smart contract is used to liquidate a position. This function differentiate...
if (msg.sender != protocolLiquidator) { require(actualCollateralRequired <= _collateralAmount, "less collateral"); uint256 positionSize = position.size; require(positionSize >= _collateralAmount, "position size should be greater than collateral"); uint256 userleverage = posit...
for (uint i = 0; i < nfts.length; i++) { collectionWhitelist[nfts[i]] = whitelisted; } for (uint i = 0; i < dataLen; i++) { TokenPrice storage tokenPrice = collectionPrices[tokenIds[i]]; tokenPrice.priceWei = pricesWei[i]; tokenPrice.updatedAt = getBlockTimestamp(); ...
same_firm_diff_protocol
Solodit
HIGH
2
11
LOW severity: Dust due to rounding tax calculations will accumulate in `Angstrom` and cannot be recovered. **Description:** The sum of rewards owed to positions can be less than the total tax amount due to rounding. While it is correct to round down these proportional share calculations, any dust that is not accounted ...
// Distribute remainder to last range and update global accumulator. unchecked { cumulativeGrowthX128 += PoolRewardsLib.getGrowthDelta(taxInEther, liquidity); rewards[ticks.poolId].globalGrowthX128 += cumulativeGrowthX128; } function test_rewardDust() public { PoolKey memory key = initializePool(address(to...
/// @notice Iterates through supported vaults and redeems assets until the required amount of base tokens is obtained function redeemRequiredBaseAssets (uint baseTokens) internal { for (uint i = 0; i < assetsArr.length; i++) { IERC4626 vault = IERC4626(assetsArr[i].asset); uint totalBaseTokens = va...
same_firm_diff_protocol
Solodit
LOW
2
12
LOW severity: `MarketOrder` minimum lifetime can be easily bypassed. **Description:** `OrderBranch::createMarketOrder` validates the `marketOrderMinLifetime` of the previous pending market order before canceling it and opening a new market order: But in `OrderBranch::cancelMarketOrder` users can cancel the pending mar...
File: OrderBranch.sol // @audit `createMarketOrder` enforces minimum market order lifetime 210: marketOrder.checkPendingOrder(); 211: marketOrder.update({ marketId: params.marketId, sizeDelta: params.sizeDelta }); File: MarketOrder.sol 55: function checkPendingOrder(Data storage sel...
function setMinimumFee(uint256 _feeInWei) external onlyRole(MINIMUM_FEE_SETTER_ROLE) { uint256 previousMinimumFee = minimumFeeInWei; minimumFeeInWei = _feeInWei; emit MinimumFeeChanged(previousMinimumFee, _feeInWei, msg.sender); }
same_firm_diff_protocol
Solodit
LOW
2
13
LOW severity: `Angstrom:_computeAndCollectProtocolSwapFee` computation can be simplified. **Description:** `AngstromL2::_computeAndCollectProtocolSwapFee` currently performs the following computation: However, the highlighted line can be simplified to: **Sorella Labs:** Fixed in commit [aa90806](https://github.com/So...
uint256 fee = exactIn ? absTargetAmount * protocolFeeE6 / FACTOR_E6 @> : absTargetAmount * FACTOR_E6 / (FACTOR_E6 - protocolFeeE6) - absTargetAmount; fee128 = fee.toInt128(); absTargetAmount * protocolFeeE6 / (FACTOR_E6 - protocolFeeE6)
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...
same_firm_diff_protocol
Solodit
LOW
2
14
MEDIUM severity: [LID-21] Withdrawals accrued rewards are not distributed among stakers. **Severity:** Medium **Path:** PositiveTokenRebaseLimiter.sol **Description:** The PositiveTokenRebaseLimiter calculates the rewards to be taken from the vaults and the amount of shares to be burned for withdrawal requests. Ora...
sharesBurnLimit = (totalWithdrawalRequestETH / totalPooledETH) * totalShares TokenRebaseLimiterData memory tokenRebaseLimiter = PositiveTokenRebaseLimiter.initLimiterState( getMaxPositiveTokenRebase(), _preTotalPooledEther, _preTotalShares );
function withdraw(uint256 _amount, address _recipient) external onlyOwner { pool.withdraw(asset, _amount, _recipient); }
same_firm_diff_protocol
Solodit
MEDIUM
2
15
LOW severity: Array length validation is not necessary. **Description:** [`RiskOracle::publishBulkRiskParameterUpdates`](https://github.com/ChaosLabsInc/risk-oracle/blob/9449219174e3ee7da9a13a5db7fb566836fb4986/src/RiskOracle.sol#L117-L142) currently validates that the lengths of all input arrays are equal. This valid...
function publishBulkRiskParameterUpdates( string[] memory referenceIds, bytes[] memory newValues, string[] memory updateTypes, bytes[] memory markets, bytes[] memory additionalData ) external onlyAuthorized { require( referenceIds.length == newValues.length && newValues.length == updateT...
function activateAccount(bytes calldata _signature) external { address account = _msgSender(); bytes32 hash = keccak256(abi.encode(account)); // @account simple hash, no EIP-712 if (authorizedSigner() != ECDSA.recover(hash, _signature)) { revert InvalidSignature(); } _activateAccount(accou...
same_firm_diff_protocol
Solodit
LOW
2
16
LOW severity: Unexpected behavior if user stakes in the same block as when the first pool is created. If there is only 1 rewards pool and a user has staked in exactly the same block as when the pool was created, then both and will return `true`. The problem is the first check is in the `if` of `getCurrentShareRaw`, w...
(pool[pool.length - 1].time) <= timeLizardLocked[_tokenId]
require(requests[_requestId].exists, 'RandomProvider: requestId not found'); _core.resolveClaimer(requests[_requestId].listingId, randomWords[0]); emit RequestFulfilled(_requestId, requests[_requestId].listingId, randomWords); + delete requests[_requestId];
same_firm_diff_protocol
Solodit
LOW
2
17
HIGH severity: Use `ReentrancyGuardTransient` for faster `nonReentrant` modifiers. **Description:** Use [ReentrancyGuardTransient](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/ReentrancyGuardTransient.sol) for faster `nonReentrant` modifiers: **Lido:** Fixed in commit...
Vault.sol 10:import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; 32:abstract contract Vault is ERC4626, ERC20Permit, AccessControl, ReentrancyGuard, Pausable {
it("audit small rewards not distributed while reserves and exchange rate increasing", async () => { const swellTreasuryRewardPercentage = parseEther("0.1"); await swETH_Deployer.setSwellTreasuryRewardPercentage( swellTreasuryRewardPercentage ); await swETH_Deployer.deposit({ va...
same_firm_diff_protocol
Solodit
HIGH
2
18
HIGH severity: BPS_TO_DECIMAL conversion is wrong, leading users to dramatically overpay for options. The constant value used to convert bips to decimals is defined as: `10e14` is equivalent to `1e15`, which when multiplied by `10_000 bips` equals `1e19`, which is 10x higher than it should be. The result is that the ...
uint256 constant BPS_TO_DECIMAL = 10e14; function testZach__ConversionMakesBidTooLow() public { vm.warp(block.timestamp + 20 days); uint TIME_TO_EXPIRY = 2 weeks; uint VOL_DEC = 0.5e18; uint SPOT_DEC = 10e18; uint STRIKE_DEC = 12e18; int RATE_DEC = 0.05e18; (ui...
function testZach_CanReceiveEth() public { uint before = address(lidoSplit).balance; payable(address(lidoSplit)).transfer(1 ether); assertEq(address(lidoSplit).balance, before + 1 ether); }
same_firm_diff_protocol
Solodit
HIGH
2
19
HIGH severity: Immediate stake cache updates enable reward distribution without P-Chain confirmation. **Description:** The middleware immediately updates stake cache for reward calculations when operators initiate stake changes via `initializeValidatorStakeUpdate()`, even though these changes remain unconfirmed by the ...
// In initializeValidatorStakeUpdate(): function _initializeValidatorStakeUpdate(address operator, bytes32 validationID, uint256 newStake) internal { uint48 currentEpoch = getCurrentEpoch(); nodeStakeCache[currentEpoch + 1][validationID] = newStake; nodePendingUpdate[validationID] = true; // @audit P-...
impl AirdopOnChain for AirdropData { fn new(instruction_data: &[u8]) -> Result<&Self, DeriverseError> { bytemuck::try_from_bytes::<Self>(instruction_data) .map_err(|_| drv_err!(InvalidClientDataFormat)) // Only format check } } amount = ((amount as f64) * data.ratio) as u64; // No validat...
same_firm_diff_protocol
Solodit
HIGH
2
20
LOW severity: Missing storage gap in upgradeable parent contract causes storage slot collision risk. **Description:** The `VaultDeployer` abstract contract is designed to be upgradeable and inherited by child contracts `SegregatedVaultDeployer` and `SecuritizeVaultDeployer`. However, `VaultDeployer` lacks storage gap v...
abstract contract VaultDeployer is IVaultDeployer, BaseContract { bytes32 public constant AGGREGATOR_ROLE = keccak256("AGGREGATOR_ROLE"); address public navProvider; address internal admin; address public upgradeableBeacon; + // Reserve storage slots for future VaultDeployer upgrades + uint256[47]...
function test_maxRedeem_WhenWithdrawalsPaused() external { // user1 deposits $1000 USDe into the main vault uint256 user1AmountInMainVault = 1000e18; USDe.mint(user1, user1AmountInMainVault); vm.startPrank(user1); USDe.approve(address(pUSDe), user1AmountInMainVault); uint256 user1MainVaultShare...
same_firm_diff_protocol
Solodit
LOW
2
21
LOW severity: BATCH DEBT FIXES - Rebase is economicall unfeasible.
SHARES * 1e16 // DENOM 9999999.0 SHARES * 1e14 // DENOM 99999.0 SHARES * 1e13 // DENOM 9999.0 SHARES * 1e9 // DENOM 1.0 SHARES * 1e8 // DENOM 0.0 SHARES * 1e10 // DENOM 10.0 SHARES * 2e8 // DENOM 0.0 SHARES * 9e8 // DENOM 0.0 SHARES * 1.9e8 // DENOM 0.0 SHARES * 1.9e9 // DENOM 1.0 0.06 * 1e9 / 1e18 6e-11 0.06 * 1e9 / 1...
bytes wrongCheck = "a54D3c09E34aC96807c1CC397404bF2B98DC4eFb"; bytes rightCheck = "a54d3c09E34aC96807c1CC397404bF2B98DC4eFb"; function test_bytes_checksum() public { bytes32 kak1 = keccak256(wrongCheck); bytes32 kak2 = keccak256(rightCheck); assertEq(kak1, kak2, "same res"); } byt...
same_firm_diff_protocol
Solodit
LOW
2
22
MEDIUM severity: Calculated commission cut does not align with the expected percentages. **Severity**: Medium **Status**: Resolved **Description** The `getComissionCut()` function within the `Treasury.sol` smart contract is used to calculate the commission that must be taken from the players. After some calculation...
if (tier == 4) { //10-20% comissionCut = 3000; } else if (tier > 0) { //30% comissionCut = 1000 + 500 * tier - 1; }
if (block.timestamp - updatedAt > STALENESS_THRESHOLD) revert ChainlinkPriceFeedStale(); mapping(address => uint256) private s_stalenessTresholds; function _getAssetOraclePrice(address asset) internal view returns (uint256) { AggregatorV3Interface priceFeed = s_assetConfigs[asset].chainlinkPriceFeed; (, int25...
same_firm_diff_protocol
Solodit
MEDIUM
2
23
HIGH severity: Anyone can make new bids always revert after a window expires. **Impact:** High, as all new bidding will revert until auction ends **Likelihood:** High, as anyone can execute the attack without rare preconditions **Description** The `fulfillWindow` method is a `public` method that is also called inter...
if (hasExpired) { window = _window[auctionId][windowExpiration(auctionId)]; } if (window.processed) { revert WindowFulfilled(); }
if ((block.timestamp - reward.claimedAt) < claimTimeout) revert ClaimTimeout(reward.claimedAt + claimTimeout);
same_firm_diff_protocol
Solodit
HIGH
2
24
HIGH severity: Users can purchase vaults by paying less amount of funds than expected, even by the least. **Severity**: Critical **Status**: Acknowledged **Description** Users call to `purchaseFirstVaults()` or `purchaseMoreVaults()` in `NodeSale.sol` in order to buy vaults. These functions receive `numberOfVaults...
function testPOCByPassIncreasePrice() public { vm.startPrank(randomUser); (uint256 price, uint256 amountUntilNextPrice) = lumiaVault.pricePerVault(); paymentToken.dispense(); paymentToken.approve(address(lumiaVault), price * (amountUntilNextPrice - 1)); string memory referralC...
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...
same_firm_diff_protocol
Solodit
HIGH
2
25
LOW severity: Admin has unlimited power to mint new OHM. While the SiloAMO system appears to have many checks and balances, in the form of a permissionless `update()` function and a `maximumToDeploy` cap on OHM deployed, all these checks can be circumvented by a malicious admin. While I don't see an incentive for the ...
function setMaximumToDeploy(uint256 newMaximum_) external onlyRole("lendingamo_admin") { maximumToDeploy = newMaximum_; } function setRateModel(address newRateModel_) external onlyRole("lendingamo_admin") { rateModel = newRateModel_; } function setUpdateInterval(uint256 newInterval_) external onlyRole("lendin...
function setGauge(address token, address gauge) external onlyGovernanceOrFactory { if (token == address(0)) revert ADDRESS_NULL(); if (gauge == address(0)) revert ADDRESS_NULL(); gauges[token] = gauge; /// Approve trough the locker. locker.safeExecute(token, 0, abi.encodeWithSignature("approve(add...
same_firm_diff_protocol
Solodit
LOW
2
26
MEDIUM severity: `BorrowerOperations` alters user debt but enforces prices are not stale only for debts that are being actively altered. **Impact** A common pattern used in Apollon for price validation looks as follows: https://github.com/blkswnStudio/ap/blob/8fab2b32b4f55efd92819bd1d0da9bed4b339e87/packages/contract...
function addColl( TokenAmount[] memory _colls, address _upperHint, address _lowerHint, bytes[] memory _priceUpdateData ) public payable override { address borrower = msg.sender; (ContractsCache memory contractsCache, LocalVariables_adjustTrove memory vars) = _prepareTroveAdjustment( borr...
/// will be 0 on the second retrieval and the require will fail. require( /// @audit Pretty sure OZ does this valid && recoveredAddress != address(0), "RecoverySpell: Invalid signature" ); assembly ("memory-safe") { valid := tload(recoveredAddress...
same_firm_diff_protocol
Solodit
MEDIUM
2
27
HIGH severity: Redundant condition in `LibSilo::_mow` can be removed. There is a [line](https://github.com/BeanstalkFarms/Beanstalk/blob/c7a20e56a0a6659c09314a877b440198eff0cd81/protocol/contracts/libraries/Silo/LibSilo.sol#L355) within `LibSilo::_mow` which performs some validation on the last update for a given accou...
- if (lastUpdate <= s.season.rainStart && lastUpdate <= s.season.current) { + if (lastUpdate <= s.season.rainStart) {
function setAllowedDeviationBps(...) external onlyRole(CONFIGURER_ROLE) { if (bps >= BPS_DENOMINATOR) revert InvalidDeviationBps(); prices[token].allowedDeviationBps = bps; emit AllowedDeviationSet(token, bps); } function setDefaultAllowedDeviationBps(...) public onlyRole(CONFIGURER_ROLE) { if (bps == 0) rever...
same_firm_diff_protocol
Solodit
HIGH
2
28
LOW severity: Admin user can `unstake` without fulfilling the staking period. **Severity**: Low **Status**: Resolved **Description** In contract TradableStaking, the method _unstake(...) implemented the following logic Here it means that the admin user can unstake without fulfilling the staking period. **Recommend...
if (user != ITradableSettings(settingsProvider).getAdminUser()) { uint256 timeDiff = block.timestamp - (uint256(_stakes.timestamp)); require( timeDiff > uint256(stakingSettings.stakingPeriod), "period" ); // console.log("timeDiff: %d", timeDiff); }
require( priceTimestamp - game.endTime <= 10 minutes || block.timestamp - priceTimestamp <= 10 minutes, "Old chainlink report" );
same_firm_diff_protocol
Solodit
LOW
2
29
HIGH severity: Yield spread cannot be decrease without causing significant loss to the stUSDC pool. **Details** [StUsdc.sol#L313-L324](https://github.com/stakeup-protocol/stakeup-contracts/blob/b4d8a83e9455efb8c7543a0fc62b5aea598c7f49/src/token/StUsdc.sol#L313-L324) function _liveTbyValue(IBloomPool pool) interna...
function _liveTbyValue(IBloomPool pool) internal view returns (uint256 value) { uint256 startingId = lastRedeemedTbyId(); // Because we start at type(uint256).max, we need to increment and overflow to 0. unchecked { startingId++; } uint256 lastMintedId = pool.lastMintedId(); if (lastMintedId == type(uint256).max) retur...
function prepareCondition( ... ) public returns (ConditionID) { // Limit of 256 because we use a partition array that is a number of 256 bits. if (outcomeSlotCount < 2 || outcomeSlotCount > 255) revert InvalidOutcomeSlotsAmount(); // If not prepared, initialize, and emit the event, otherwise just return existing condi...
same_firm_diff_protocol
Solodit
HIGH
2
30
HIGH severity: Arbitrary amount can be withdrawn (stolen). **Severity**: Critical **Status**: Resolved GatewayManagerFacet.sol - A vulnerability is identified in the `releaseRewardForRelayer` function. The issue allows for arbitrary amount inputs without proper validation, potentially leading to unauthorized fund dra...
function releaseRewardForRelayer(uint256 amount) external nonReentrant { if (amount == 0) { revert CannotReleaseZero(); } (bool registered, Subnet storage subnet) = LibGateway.getSubnet(msg.sender); if (!registered) { revert NotRegisteredSubnet(); } ...
function decimals() public view virtual override returns (uint8) { return _decimals; }
same_firm_diff_protocol
Solodit
HIGH
2
31
HIGH severity: Remove obsolete return statements when using named return variables. **Description:** Remove either the named return value or the `return` statement. * [`BasisTradeVault::requestWithdraw`](https://github.com/buttonxyz/button-protocol/blob/9002f2b0d05ba80039bd942c809dbe5bc1a252c9/src/BasisTradeVault.sol#...
function requestWithdraw(uint256 assets) external returns (uint256 queuePosition) { // ... return requestRedeem(shares); } function requestRedeem(uint256 shares) public requirePocket returns (uint256 queuePosition) { // ... return queuePosition; } function exec(address target, bytes call...
function rate() external view override returns (uint256) { uint8 oracleDecimals = priceFeed.decimals(); uint8 assetDecimals = asset.decimals(); int256 rsRate = priceFeed.latestAnswer(); require(rsRate != 0, 'Rate must not be zero'); // @audit Checks raw value only // @audit normalized rate never z...
same_firm_diff_protocol
Solodit
HIGH
2
32
LOW severity: Protocol will leak value to users due to rounding in `SecuritizeSwap::buy`. **Description:** Protocols should always round against users in favor of the protocol. The `buy` function in the `SecuritizeSwap.sol` is rounding the stable coin need it in favor of the user: With this rounding down, in theory a ...
function buy(uint256 _dsTokenAmount, uint256 _maxStableCoinAmount) public override whenNotPaused { ... uint256 stableCoinAmount = calculateStableCoinAmount(_dsTokenAmount); <---- dsToken.issueTokensCustom(msg.sender, _dsTokenAmount, block.timestamp, 0, "", 0); emit Buy(msg.sender, _dsTo...
function recalculateNftPower(uint256 tokenId) public override returns (uint256 newPower) { // @audit execution allowed to continue when // block.timestamp == powerCalcStartTimestamp if (block.timestamp < powerCalcStartTimestamp) { return 0; } // @audit getNftPower() returns 0 when // blo...
same_firm_diff_protocol
Solodit
LOW
2
33
HIGH severity: Incorrect Check For Early Stakers. **Severity** - High **Status** - Resolved **Description** For the first 99 stakers the minimum staking amount is 8e6 ether tokens (compared to 16e6 ether tokens for non-early stakers) , the code which verifies if the staker is an early staker is → It checks if the s...
function canUseReducedStakingAmount(address stakerAddress) public view returns (bool eligible, uint256 requiredStakingAmount) { EarlyStaking earlyStaking = EarlyStaking(payable(getContractAddress("EarlyStaking"))); int256 stakerIndex = earlyStaking.getIndexOf(stakerAddress); bool isEarlyStaker = stakerIndex...
console.log("Withdrawable Tokens: %s", tokensAvailable); console.log("Everyday Percentage: %s, Days: %s, Current Unlock %: %s",everyDayReleasePercentage, noOfDays, currentUnlockedPercentage);
same_firm_diff_protocol
Solodit
HIGH
2
34
MEDIUM severity: Require check in `MultiSig_V2` can be bypassed. **Severity**: Medium **Status**: Resolved **Description** In the MultiSig contract, the require check statement of `_numConfirmationsRequired <= _whiteWallet.length` could be bypassed if `DeregisterWhiteWallet()` is used. For example, if the wallet `_...
require( _numConfirmationsRequired > 0 && _numConfirmationsRequired <= _whiteWallet.length, "invalid number of required confirmations" );
if (userMaxAllc > maxAllocation) { return maxAllocation;
same_firm_diff_protocol
Solodit
MEDIUM
2
35
MEDIUM severity: User can join after the first question is revealed to gain an advantage over other users. **Description:** Users can join a game while the game is ongoing: `SessionManager::startAndRevealGameQuestion` both moves the game to the `Ongoing` state and reveals the first question. **Impact:** A user can ge...
function joinGame(uint256 _gameId) external { require( games[_gameId].state == SessionState.Created || games[_gameId].state == SessionState.Ongoing, InvalidGameState(SessionState.Created, games[_gameId].state) ); } function joinGame(uint256 _gameId) external { - require...
File: Goldivault.sol 159: if(remainingTime > 0) { 160: SafeTransferLib.safeTransfer(depositToken, msg.sender, amount * (1000 - _fee) / 1000); 161: SafeTransferLib.safeTransfer(depositToken, multisig, amount * _fee / 1000); //@audit rounding loss 162: emit OwnershipTokenRedemption(msg.sender, amoun...
same_firm_diff_protocol
Solodit
MEDIUM
2
36
LOW severity: Missing Signer and New Account Validation for `asset_token_program_acc` in `new_instrument`. **Description:** The `new_instrument` instruction lacks validation checks for `asset_token_program_acc` when creating a new asset token account. Unlike `new_base_crncy` which explicitly validates that the program ...
if is_new_account(asset_token_acc) { let decimals = *asset_mint .data .borrow() .get(MINT_DECIMALS_OFFSET) .ok_or_else(|| drv_err!(DeriverseErrorKind::InvalidClientDataFormat))? as u32; if !(MIN_DECS_COUNT..=MAX_DECS_COUNT).contains(&decimals)...
function _handleRewards(IInfraredVault.UserReward[] memory _rewards) internal { IIsolationModeVaultFactory factory = IIsolationModeVaultFactory(VAULT_FACTORY()); for (uint256 i = 0; i < _rewards.length; ++i) { if (_rewards[i].amount > 0) { if (_rewards[i].token == UNDERLYING_TOKEN()) { ...
same_firm_diff_protocol
Solodit
LOW
2
37
HIGH severity: Users may lose value when transferring ERVault tokens cross-chain. **Description:** Both the `VaultV0` and `VaultV3` ERC-4626 tokens are designed to be transferable across chains and therefore implement the LayerZero cross-chain OFT standard. When a token is transferred cross-chain, the `_debit` functio...
function _debit(address _from, uint256 _amountLD, uint256 _minAmountLD, uint32 _dstEid) internal virtual override returns (uint256 amountSentLD, uint256 amountReceivedLD) { (amountSentLD, amountReceivedLD) = _debitView(_amountLD, _minAmountLD, _dstEid); _burn(_from, amountSentLD); } function _credit(address _t...
// In `client_community.rs` `update()` during deposit if available_tokens != self.header.drvs_tokens { // 50,000 != 0 - TRUE community_state.header.upgrade()?.drvs_tokens += 50,000; if self.header.slot <= community_state.header.voting_start_slot { // 0 <= 60 - TRUE self.header.current_voti...
same_firm_diff_protocol
Solodit
HIGH
2
38
HIGH severity: Operator is not removed in Registry when validator has `owedAmount == 0`. **Description:** `CasimirManager::withdrawValidator()` function is designed to remove a validator after a full withdrawal. It checks whether the final effective balance of the removed validator is sufficient to cover the initial 32...
uint256 owedAmount = VALIDATOR_CAPACITY - finalEffectiveBalance; if (owedAmount > 0) { uint256 availableCollateral = registry.collateralUnit() * 4; owedAmount = owedAmount > availableCollateral ? availableCollateral : owedAmount; uint256 recoverAmount = owedAmount / 4; for (uint256 i; i < validator.oper...
struct DepositReturnData { uint256 shares; @> uint256 amount0; @> uint256 amount1; } ... struct WithdrawReturnData { @> uint256 amount0; @> uint256 amount1; } ... struct SwapReturnData { uint160 updatedSqrtPriceX96; int24 updatedTick; @> uint2...
same_firm_diff_protocol
Solodit
HIGH
2
39
LOW severity: `Timelock` checks for `1` instead of `DONE_TIMESTAMP`. This should be `DONE_TIMESTAMP` https://github.com/solidity-labs-io/kleidi/blob/1a06ac16bc99d0b4081281329d03064c3737f5e4/src/Timelock.sol#L430-L431
require(timestamp != 1, "Timelock: operation already executed");
batchDebtSharesDelta = currentBatchDebtShares * debtIncrease / _batchDebt; _latestTroveData.recordedDebt = _latestBatchData.recordedDebt * batchDebtShares / totalDebtShares; // SPDX-License-Identifier: MIT pragma solidity 0.8.18; import "./TestContracts/DevTestSetup.sol"; contract Redemptions is DevTestSetup { ...
same_firm_diff_protocol
Solodit
LOW
2
40
LOW severity: TRST-Fee mismatch between contracts can make strategies unusable. **Description:** In CoW Swap strategies, fee is set in the strategy contracts and then passed to `initiateSwap()`. It is built in `_buildInitiateSwapExecutable()`: There is a mismatch between the constraints around fees between the stra...
// Generate executable to initiate swap on DCACoWAutomation return Types.Executable({ callType: Types.CallType.DELEGATECALL, target: dcaCoWAutomation, value: 0, data: abi.encodeCall( DCACoWAutomation.initiateSwap, (params.tokenIn, params.tokenOut, swapRecipient, amountIn, minAmountOut, swapFee) ...
uint256 _pool = balance(); if (_pool + _amount > underlyingCap) { revert NYProfitTakingVault__UnderlyingCapReached(underlyingCap); } uint256 _before = underlying.balanceOf(address(this)); underlying.safeTransferFrom(msg.sender, address(this), _amount); uint2...
same_firm_diff_protocol
Solodit
LOW
2
41
LOW severity: Blacklisted addresses will count towards total slope if they vote before rollover. When we roll over to a new period, we calculate the `rewardPerVote` by taking the `rewardPerPeriod` and dividing by the total bias (votes) for the gauge. In order to ensure these calculations are accurate, blacklisted addr...
uint256 gaugeBias = _getAdjustedBias(bounty.gauge, bounty.blacklist, currentPeriod); rewardPerVote[bountyId] = rewardPerPeriod.mulDiv(_BASE_UNIT, gaugeBias); gaugeBias = gaugeController.points_weight(gauge, period).bias; for (uint256 i = 0; i < length;) { // Get the user slope. userSlope = gaugeController.vot...
if (nouns.getPriorVotes(proxy, nouns.proposalCreationBlock(proposalId)) == 0) revert NoVotes;
same_firm_diff_protocol
Solodit
LOW
2
42
MEDIUM severity: Uninitialized CCTP domain mapping can send USDC to the incorrect blockchain. **Description:** `USDCBridgeV2::chainIdToCCTPDomain` maps Wormhole chain IDs to Circle's CCTP domain IDs: **Impact:** When this mapping isn't initialized for a wormhole chain id, it returns 0 by default (Solidity's default va...
mapping(uint16 => uint32) public chainIdToCCTPDomain; function getCCTPDomain(uint16 _chain) internal view returns (uint32) { return chainIdToCCTPDomain[_chain]; // @audit returns 0 if not set! } circleTokenMessenger.depositForBurn( _amount, getCCTPDomain(_targetChain), // @audit 0 by defa...
if ( !pledgeRoundConcluded && SafeCast.toUint32(block.timestamp) < deadline ) { refundAmount -= (refundAmount * earlySellPenalty) / 1e6; _propertyToken.adminTransferFrom( signer, holderWallet, numTokens, ...
same_firm_diff_protocol
Solodit
MEDIUM
2
43
MEDIUM severity: Allowance check in `FiveFiftyRule::canTransfer` is inverted. **Description:** The following snippet from `FiveFiftyRule::canTransfer` has inverted logic. This is also present in `FiveFiftyRule::checkCanTransfer`. **Impact:** No transfers to entities are possible except in the rare cases that `allowan...
if (iTo.isEntity) { // if entity @> if (entityData[to].allowance <= amount) { entityData[to].allowance -= SafeCast.toUint64(amount); iTo.lastBalance += SafeCast.toUint64(amount); emit FiveFiftyApproved(from, to, amount); retur...
function getInitialLPFee(uint24 self) internal pure returns (uint24) { // the initial fee for a dynamic fee pool is 0 if (self.isDynamicFee()) return 0; self.validate(); return self; } function test_zeroInitialLPFee() public { PoolKey memory key = initializePool(address(token), 10, 3); assertEq...
same_firm_diff_protocol
Solodit
MEDIUM
2
44
HIGH severity: Precision loss can result in funds becoming stuck in incentive logic contracts. **Description:** In all three incentive logic contracts, the `ratePerSec` of deposited rewards is computed by performing a division of the `amount` to distribute by the `duration`: If the token to distribute has a small amou...
function depositRewards(IncentivizedPoolId id, address token, uint256 amount, uint256 duration) external override nonReentrant { ... uint32 endTimestampCache = _state.endTimestamp; if (endTimestampCache < block.timestamp) { if (duration < MIN_DURATION) rev...
int256 currentLastInterpolationPossible = type(int256).max; for (uint i; i < local.currentWeights.length; ) { // ... if (blockMultiplier > int256(0)) { weightBetweenTargetAndMax = upperGuardRail - local.currentWeights[i]; // ... blockTimeUntilGuardRailHit = weightBetweenTargetAndMax / ...
same_firm_diff_protocol
Solodit
HIGH
2
45
HIGH severity: If `feeScaled` is set too high in the constructor, the protocol will be bricked. When `feeScaled` is set using the `setFeeScaled()` function, we perform a check to ensure it is lower than `1e18`: However, when the value is set from the constructor, there is no such check: This means that it is possible...
function setFeeScaled(uint256 _feeScaled) external onlyOwner { if (_feeScaled > SCALAR) { revert AMKTVaultFeeTooLarge(); } tryInflation(); feeScaled = _feeScaled; } constructor( IIndexToken _indexToken, address _owner, address _feeRecipient, uint256 _feeScaled ) { indexToke...
uint256 feeDiff = boost + stakeDaoTotalFee > convexTotalFee ? stakeDaoTotalFee + boost - convexTotalFee : 0;
same_firm_diff_protocol
Solodit
HIGH
2
46
HIGH severity: Precision loss in `swETH::_deposit` from unnecessary hidden division before multiplication. **Description:** `swETH::_deposit` [L170](https://github.com/SwellNetwork/v3-contracts-lst/blob/a95ea7942ba895ae84845ab7fec1163d667bee38/contracts/implementations/swETH.sol#L170) contains a hidden unnecessary [div...
uint256 swETHAmount = wrap(msg.value).mul(_ethToSwETHRate()).unwrap(); // @audit expanding this out // wrap(msg.value).mul(_ethToSwETHRate()).unwrap(); // wrap(msg.value).mul(wrap(1 ether).div(_swETHToETHRate())).unwrap(); // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import {UD60x18, wrap} from "@prb/math...
File: PriorityPool.sol 103: token.safeApprove(_stakingPool, type(uint256).max);
same_firm_diff_protocol
Solodit
HIGH
2
47
MEDIUM severity: `getUserStake` function failure for non-staker accounts. **Description:** The function `getUserStake` in the smart contract throws an error when invoked for an address that does not have any stakes. Specifically, the function fails due to a division by zero error. This occurs because the divisor, `user...
function getUserStake(address userAddress) public view returns (uint256 userStake) { userStake = Math.mulDiv(users[userAddress].stake0, rewardStakeRatioSum, users[userAddress].rewardStakeRatioSum0); }
function performUpkeep(bytes calldata performData) external { if (lastRequestId == bytes32(0)) { triggerRequest(); } } uint256 _usdsBalance = USDs.balanceOf(address(this)); minted -= _usdsBalance;
same_firm_diff_protocol
Solodit
MEDIUM
2
48
MEDIUM severity: CRV claimed as an extraRewardToken will be stuck in Strategy. When rewards are harvested via the strategy (either `OnlyBoost.sol` or `Strategy.sol`, depending on whether the optimizer is set or not), the goal is to claim all rewards and pass them along to the appropriate reward distributor. The logic ...
function _claimExtraRewards(address gauge, address rewardDistributor) internal virtual returns (uint256 _rewardTokenClaimed) { /// If the gauge doesn't support extra rewards, skip. if (lGaugeType[gauge] > 0) return 0; // Cache the reward tokens and their balance before locker address[8] mem...
bytes32 claimHash = keccak256(claimEncoded); bytes32 prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", claimHash)); bytes32 claimLen = len(claimEncoded); bytes32 prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", claimLen, claimEncoded));
same_firm_diff_protocol
Solodit
MEDIUM
2
49
HIGH severity: The `SecuritizeRedemption.updateLiquidityProvider` function emits the wrong information.. **Description:** The `SecuritizeRedemption.updateLiquidityProvider` function emits the information that `oldProvider` is updated to `liquidityProvider`. But the function allocates `_liquidityProvider` to `oldProvide...
File: securitize_dev-bc-redemption-sc-32e23d5318be\contracts\redemption\SecuritizeRedemption.sol 65: function updateLiquidityProvider(address _liquidityProvider) onlyOwner external override { 66: address oldProvider = address(_liquidityProvider); 67: liquidityProvider = ILiquidityProvider(_liquidity...
if (spec == NONE) { return (recipients, amounts, spec, royaltyAddress, addToCache); }
same_firm_diff_protocol
Solodit
HIGH
2
50
MEDIUM severity: Misplaced stake limit validation in stake function of `LockedStakingPools` contract. **Severity**: Medium **Status**: Resolved **Description** The following check inside the stake function from `LockedStakingPools` contract attempts to restrict users from having more than 100 active stakes in any g...
if (userStakeIds[poolId][msg.sender].length == 0) { if (userStakeIds[poolId][msg.sender].length > 100) revert TooManyStake(); noUsersStaked[poolId] += 1; }
function clearTokenConfig(address _token) external override { _onlyGov(); require(whitelistedTokens[_token], "Token not whitelisted"); totalTokenWeights = totalTokenWeights.sub(tokenWeights[_token]); // Properly removing the token from allWhitelistedTokens array for (uint i = 0; i < allWhitelis...
same_firm_diff_protocol
Solodit
MEDIUM
2
51
HIGH severity: `transferERToTreasury` won't work as intended if `assetToken` is a multiple-address token. **Likelihood:** Low, because it requires using a multiple-address token and a malicious/compromised admin **Impact:** High, because users can use 100% of their deposits **Description** Some ERC20 tokens on the b...
require(tokenAddress != _assetTokenAddress, "IP: Asset transfer");
uint256 percentage = 100000 - slippage; uint256 glpPrice = priceFeed.getGLPprice().mul(percentage).div(100000); uint256 glpOut = amountOut.mul(10**12).mul(tokenPrice).div(glpPrice).div(10**30);
same_firm_diff_protocol
Solodit
HIGH
2
52
LOW severity: [TOKE-31] New NAV per share calculation when setting streaming fee could be stale. **Severity:** Low **Path:** AutopoolFees.sol:setStreamingFeeBps **Description:** When setting a new streaming fee, the `navPerShareLastFeeMark` is reset to the current share rate so that the new streaming fee is not appl...
function setStreamingFeeBps(IAutopool.AutopoolFeeSettings storage feeSettings, uint256 fee) external { if (fee >= FEE_DIVISOR) { revert InvalidFee(fee); } feeSettings.streamingFeeBps = fee; IAutopool vault = IAutopool(address(this)); // Set the high mark when we ch...
func ProcessDeposit(beaconState state.BeaconState, deposit *ethpb.Deposit, verifySignature bool) (state.BeaconState, bool, error) { [...] index, ok := beaconState.ValidatorIndexByPubkey(bytesutil.ToBytes48(pubKey)) if !ok { [...] if contractExist { contracts = [][]byte{make([]byt...
same_firm_diff_protocol
Solodit
LOW
2
53
HIGH severity: Avoid unnecessary initialization to zero in `BeefyVaultConcLiq::deposit`. **Description:** `BeefyVaultConcLiq::deposit` declares the `shares` variable on [L127](https://github.com/beefyfinance/experiments/blob/14a313b76888581b05d42b6f7b6097c79f3e65c6/contracts/protocol/concliq/vault/BeefyVaultConcLiq.sol...
uint256 shares = _amount1 + (_amount0 * price / PRECISION);
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...
same_firm_diff_protocol
Solodit
HIGH
2
54
HIGH severity: Failure to pass \_withdraw_only to \_getBalanceTXs allows any withdrawing user to drain vault assets through sandwich attack. **Details** [AdapterVault.vy#L1045-L1060](https://github.com/adapter-fi/AdapterVault/blob/3c2895a69ad5eb2c4be16d454f63a6f2f074f351/contracts/AdapterVault.vy#L1045-L1060) def...
def _balanceAdapters( _target_asset_balance: uint256, pregen_info: DynArray[Bytes[4096], MAX_ADAPTERS], _withdraw_only : bool = False, _max_txs: uint8 = MAX_BALTX_DEPOSIT ): # Make sure we have enough assets to send to _receiver. txs: BalanceTX[MAX_ADAPTERS] = empty(BalanceTX[MAX_ADAPTERS]) blocked_adapters: address[MA...
try optionsContract.unlock( params.optionId, params.closingPrice, publisherSignInfo.timestamp, params.isAbove ) {} catch Error(string memory reason) { emit FailUnlock(params.optionId, params.targetContract, reason); continue; }
same_firm_diff_protocol
Solodit
HIGH
2
55
HIGH severity: Signatures on `TokenBank` and `AllowList` can be reused in perpetuity an infinite amount of times. **Description:** `TokenBank` allows buyers to purchase tokens by getting an off-chain signature, which specifies the token and the amount they are allowed to buy. When buying using a signature, the buyer do...
//TokenBank.sol// // Handle payment off chain, including referral discount function buyTokenOCP( address signer, address tokenAddress, uint256 amount, bytes memory signature ) external nonReentrant { ... if (!verifySignature(signer, sender, tokenAddress, amoun...
function _calculateOperatorShare(uint48 epoch, address operator) internal { // ... uptime checks ... uint96[] memory assetClasses = l1Middleware.getAssetClassIds(); // @audit Gets CURRENT asset classes for (uint256 i = 0; i < assetClasses.length; i++) { uint256 operatorStake = l1Middleware.getOpera...
same_firm_diff_protocol
Solodit
HIGH
2
56
HIGH severity: Mismatch in multiplier position causes incorrect weight calculations in `QuantAMMWeightedPool`. **Description:** The primary feature of QuantAMM weighted pools is to periodically update weights based on various trading rules set during pool creation. These weights are updated by a singleton contract, `Up...
/// @dev Update weight runner gives all weights in a single array shaped like [w1,w2,w3,w4,w5,w6,w7,w8,m1,m2,m3,m4,m5,m6,m7,m8], we need it to be [w1,w2,w3,w4,m1,m2,m3,m4,w5,w6,w7,w8,m5,m6,m7,m8] uint256 tokenLength = weights.length / 2; splitWeights = new int256[][](2); splitWeights[0] = new int256[](8); for (uint i;...
//here vote has been included even if end time has been passed of this period match data.choice { VoteOption::DECREMENT => { community_account_header.voting_decr += voting_tokens; } VoteOption::INCREMENT => { community_account_header.voting_inc...
same_firm_diff_protocol
Solodit
HIGH
2
57
LOW severity: [OIN8-8] Self-exchange is possible. **Severity:** Low **Path:** programs/fusion-swap/src/lib.rs#L106-L258 **Description:** `fusion-swap` does not prevent the fulfillment of orders with identical maker and taker accounts. Although this was not observed to be directly exploitable, this allows for self-fu...
... pub fn fill(ctx: Context<Fill>, order_id: u32, amount: u64) -> Result<()> { ... ++ require!( ++ ctx.accounts.maker.key() != ctx.accounts.taker.key(), ++ EscrowError::MakerAndTakerIdentical ); ... } ...
func ProcessDeposit(beaconState state.BeaconState, deposit *ethpb.Deposit, verifySignature bool) (state.BeaconState, bool, error) { [...] index, ok := beaconState.ValidatorIndexByPubkey(bytesutil.ToBytes48(pubKey)) if !ok { [...] if contractExist { contracts = [][]byte{make([]byt...
same_firm_diff_protocol
Solodit
LOW
2
58
LOW severity: Proxy-Based self-liquidation creates bad debt for lenders. **Description:** When calling [`Licredity::seize`](https://github.com/Licredity/licredity-v1-core/blob/e8ae10a7d9f27529e39ca277bf56cef01a807817/src/Licredity.sol#L550-L558) to liquidate an unhealthy position, the contract checks that the position ...
// prevents owner from purposely causing a position to be underwater then profit from seizing it // side effect is that positions cannot be seized by owner contract, such as non-fungible position manager, which is acceptable if (position.owner == msg.sender) { assembly ("memory-safe") { mstore(0x00, 0x7c474...
gi - lgi = rgo[10] - rgo[0] - lgi = 0 - 3 - 997 = 997 - 997 = 0 gi - lgi == G - rgo[0] - rgo[10] - lgi == 10 - 3 - 10 - 997 == 997 - 997 == 0 gi - lgi == rgo[0] - rgo[10] - lgi == 7 - 10 - 997 == 997 - 997 == 0
same_firm_diff_protocol
Solodit
LOW
2
59
HIGH severity: State update performed after external call in `MembershipER:mint`. **Description:** When `MembershipERC1155::mint` is invoked during a call to `MembershipFactory::joinDAO`, the `totalSupply` increment is performed after the call to `ERC1155::_mint`: While there does not appear to be any immediate impact...
function mint(address to, uint256 tokenId, uint256 amount) external override onlyRole(OWP_FACTORY_ROLE) { _mint(to, tokenId, amount, ""); totalSupply += amount * 2 ** (6 - tokenId); // Update total supply with weight } if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, am...
File: audit-farcaster\src\KeyManager.sol 123: vault = _initialVault; 124: emit SetVault(address(0), _initialVault); ... 211: function setVault(address vaultAddr) external onlyOwner { 212: if (vaultAddr == address(0)) revert InvalidAddress(); 213: emit SetVault(vault, vaultAddr); 214:...
same_firm_diff_protocol
Solodit
HIGH
2
60
HIGH severity: `RewardDistributor#claim` will revert for tokens with expired locks leading to loss of rewards. **Details** [RewardsDistributor.sol#L277-L287](https://github.com/hyperstable/contracts/blob/35db5f2d3c8c1adac30758357fbbcfe55f0144a3/src/governance/RewardsDistributor.sol#L277-L287) function claim(u...
function claim(uint256 _tokenId) external returns (uint256) { if (block.timestamp >= time_cursor) _checkpoint_total_supply(); uint256 _last_token_time = last_token_time; _last_token_time = _last_token_time / WEEK * WEEK; uint256 amount = _claim(_tokenId, voting_escrow, _last_token_time); if (amount != 0) { @> ...
function rewardPerToken(address _ibToken) public view returns (uint256) { if (totalSupply[_ibToken] == 0) { return rewardPerTokenStored[_ibToken]; }
same_firm_diff_protocol
Solodit
HIGH
2
61
LOW severity: Stale Issuance Records After `Burn` and `Seize` Operations. **Description:** The `recordBurn()` and `recordSeize()` functions in `ComplianceServiceRegulated.sol` do not clean up issuance records when tokens are burned or seized. This causes stale issuance records to persist in the system, which can lead t...
function recordBurn(address _who, uint256 _value) internal override returns (bool) { if (compareInvestorBalance(_who, _value, _value)) { adjustTotalInvestorsCounts(_who, CommonUtils.IncDec.Decrease); } return true; }
// SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: Copyright 2024 ADDPHO pragma solidity 0.8.25; contract MockAvalancheL1Middleware { uint48 public constant EPOCH_DURATION = 4 hours; uint48 public constant SLASHING_WINDOW = 5 hours; address public immutable L1_VALIDATOR_MANAGER; address public...
same_firm_diff_protocol
Solodit
LOW
2
62
LOW severity: Aave rewards incentives lost as there is no way to claim them. **Description:** When a bet uses an Aave pool, funds are supplied to Aave and can accrue [incentive rewards](https://aave.com/docs/aave-v3/aptos/smart-contracts/incentives), but the contracts provide no way to claim or forward these rewards (n...
function aave_claimRewards(address reward) external { address[] memory assets = new address[](1); assets[0] = _bet.asset; rewardsController.claimRewards( assets, type(uint256).max, _treasury, reward ); }
function setUp() public virtual { // prevent Foundry from setting block.timestamp = 1 which can cause // errors in this protocol vm.warp(1659973223); // SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {AdminVoting} from "../../../contracts/dao/AdminVoting.sol"; // test setup import {TestSetup...
same_firm_diff_protocol
Solodit
LOW
2
63
HIGH severity: Lack of ERToken Transfer Validation. **Severity**: Medium **Status**: Resolved **Location:** Admin.sol, TokenSaleUSDB.sol **description** Function `createPoolNew()` initiates ERC20 token transfers without validating the return value of the transfer operation. This oversight can result in unhandled tr...
310 IERC20D(_params.tokenAddress).transferFrom(msg.sender, instance, (_params.totalSupply + _params.tokenLiquidity)); 236 if(params.tokenLiquidity - tokenAmount > 0) IERC20D(params.tokenAddress).transfer(creator, params.tokenLiquidity - tokenAmount); ... 246 if (liquidity > 0) IERC20D(pair).transfer(creator,liquidity)...
(uint80 roundID, int256 answer, , uint256 timestamp, uint80 answeredInRound) = _btcUsdFeed.latestRoundData(); require(answeredInRound >= roundID, "Stale price"); require(timestamp != 0,"Round not complete");
same_firm_diff_protocol
Solodit
HIGH
2
64
LOW severity: `PledgeManager::pricePerToken` can only support a maximum price of `$4294`. **Description:** `PledgeManager::pricePerToken` uses `uint32` and indicates in the comment it represents USD price using 6 decimals of precision: **Impact:** Since the maximum value of `uint32` is 4294967295, with 6 decimals of p...
uint32 public pricePerToken; //in usd (6 decimals)
# Guard (fails if PRIVATE_KEY not provided) @if [ -z "$(PRIVATE_KEY)" ]; then \ echo "$(RED)ERROR: PRIVATE_KEY not set$(NC)"; \ exit 1; \ fi # Usage (Sepolia) forge script script/Deployer.s.sol:Deployer \ --rpc-url $(BASE_SEPOLIA_RPC) \ --private-key $(PRIVATE_KEY) \ --broadcast \ --verify \ --ethers...
same_firm_diff_protocol
Solodit
LOW
2
65
MEDIUM severity: Setting a peer `NttManager` contract for the same chain can cause loss of user funds. **Description:** The current implementation of `NttManager::setPeer` allows the owner to set the NTT Manager as a peer for the same chain ID as the current chain. If the NTT Manager owner accidentally (or otherwise) s...
function testTransferToOwnChain() external { uint16 localChainId = nttManager.chainId(); DummyToken token = DummyToken(nttManager.token()); uint8 decimals = token.decimals(); nttManager.setPeer(localChainId, toWormholeFormat(address(0x999), decimals); address user_A = address(uint160(uint256(keccak2...
// NormalizedTokenDecimalsVPCalc.sol function _normalizeVaultTokenDecimals(address vault, uint256 votingPower) internal view virtual returns (uint256) { return votingPower.scale(IERC20Metadata(_getCollateral(vault)).decimals(), BASE_DECIMALS); //@audit BASE_DECIMALS = 24 } //Scaler.sol function scale(uint256 value...
same_firm_diff_protocol
Solodit
MEDIUM
2
66
MEDIUM severity: Maximum preclaim limit can be easily bypassed to preclaim entire token allocation. **Description:** The `AllocationVesting` contract allows token recipients to preclaim up to a maximum of their total token allocation, however this limit can easily by passed allowing recipients to preclaim their entire ...
function test_transferPoints_BypassVestingViaPreclaim() external { AllocationVesting.AllocationSplit[] memory allocationSplits = new AllocationVesting.AllocationSplit[](2); uint24 INIT_POINTS = 50000; // allocate to 2 users 50% 50% allocationSplits[0].recipient = users.user1; allocationSpl...
function mint( uint256 shares, address receiver //@audit receiver could be not whitelisted? ) public override onlyWhitelisted(msg.sender) returns (uint256 assets) { ... } function test_mint_non_whitelist_receiver() public { uint256 amount = 100 ether; vm.startPrank(user...
same_firm_diff_protocol
Solodit
MEDIUM
2
67
End of preview. Expand in Data Studio

SCAR Training Pairs (Extended)

11,961 contrastive pairs — an expanded version of scar-pairs augmented with Solodit API ingestion and additional lower-quality sources.

⚠️ For training, use scar-pairs (the 7,552 curated subset). All final SCAR checkpoints were trained on the curated set. The paper documents that quality outperformed quantity for this task — expanding training data with noisier sources reduced standalone R@10. This extended set is published for transparency, ablation studies, and downstream experiments where larger training data is helpful for other purposes.

Format

Same schema as scar-pairs:

Column Description
query Audit finding: "SEVERITY: [title]. [description]"
positive Vulnerable Solidity code snippet
hard_negative Different vulnerability from same protocol
source Dataset origin
severity HIGH / MEDIUM / LOW / CRITICAL
vuln_type Vulnerability category

What's added vs scar-pairs

The extra ~4,400 pairs come primarily from Solodit API ingestion — direct queries to the Solodit findings index for protocol-specific vulnerabilities. These pairs have wider variation in:

  • Severity labeling: less consistent than the curated MSC/FORGE sources
  • Finding-description granularity: some Solodit reports use terse summaries, others verbose multi-paragraph analyses
  • Code-snippet quality: a fraction reference cross-contract calls or oracle interactions where the "positive" snippet alone underspecifies the vulnerability

These factors explain why training on the expanded set under-performed the curated set — see the paper §5.4 (Negative Results and Design Insights).

Usage

from datasets import load_dataset
ds = load_dataset("Farseen0/scar-pairs-extended", split="train")

Related

Paper

This dataset accompanies SCAR: Sparse Code Audit Retriever via SAE-LoRA Adaptation (Farseen Shaikh, 2026).

Citation

@inproceedings{shaikh2026scar,
  title  = {SCAR: Sparse Code Audit Retriever via SAE-LoRA Adaptation},
  author = {Shaikh, Farseen},
  year   = {2026},
  note   = {Under review at EMNLP 2026 (ACL ARR March cycle)},
  url    = {https://openreview.net/forum?id=moD8Hxq9hN}
}

License

Apache 2.0 — free for research and commercial use with attribution.

Downloads last month
22

Collection including Farseen0/scar-pairs-extended