nameid stringlengths 9 36 ⌀ | content stringlengths 2.12k 40.5k ⌀ | tokens float64 511 10.1k ⌀ | LoC float64 60 990 ⌀ | Centain int64 0 128 | Security issue stringlengths 204 2.89k ⌀ | VulnNumber int64 1 376 |
|---|---|---|---|---|---|---|
35_ConcentratedLiquidityPosition.sol | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
import "../../interfaces/IBentoBoxMinimal.sol";
import "../../interfaces/IConcentratedLiquidityPool.sol";
import "../../interfaces/IMasterDeployer.sol";
import "../../interfaces/ITridentRouter.sol";
import "../../libraries/concentratedPool/FullMath... | 1,188 | 140 | 0 | 1. H-06: ConcentratedLiquidityPosition.sol#collect() Users may get double the amount of yield when they call collect() before burn() (Double Bonus)
When a user calls ConcentratedLiquidityPosition.sol#collect() to collect their yield, it calcuates the yield based on position.pool.rangeFeeGrowth() and position.feeGrowthI... | 3 |
44_Swap.sol | pragma solidity ^0.8.0;
import "../governance/EmergencyPausable.sol";
import "../utils/Math.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract Swap is EmergencyPausabl... | 2,733 | 264 | 1 | 1. H-01 Arbitrary contract call allows attackers to steal ERC20 from users' wallets (Unchecked external calls)
Swap.sol L220-L212 A call to an arbitrary contract with custom calldata is made in fillZrxQuote(), which means the contract can be an ERC20 token, and the calldata can be `transferFrom` a previously approved u... | 5 |
3_MarginRouter.sol | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "../libraries/UniswapStyleLib.sol";
import "./RoleAware.sol";
import "./Fund.sol";
import "../interfaces/IMarginTrading.sol";
import "./Lending.sol";
import "./Admin.sol";
import "... | 2,888 | 403 | 1 | 1. [H-01]: Re-entrancy bug allows inflating balance (Reentrancy, Lack of Input Validation)
One can call the MarginRouter.crossSwapExactTokensForTokens function first with a fake contract disguised as a token pair: crossSwapExactTokensForTokens(0.0001 WETH, 0, [ATTACKER_CONTRACT], [WETH, WBTC]). When the amounts are com... | 3 |
70_LiquidityBasedTWAP.sol | // SPDX-License-Identifier: Unlicense
pragma solidity =0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "../external/libraries/UniswapV2OracleLibrary.sol";
import "../interfaces/external/chainlink/IAggregatorV3.sol";
impor... | 3,695 | 493 | 0 | 1. H-03 Oracle doesn't calculate USDV/VADER price correctly in `_calculateVaderPrice`
Invalid values returned from oracle for USDV and VADER prices in situations where the oracle uses more than one foreign asset.
2. H-04 Vader TWAP averages wrong
The vader price in LiquidityBasedTWAP.getVaderPrice is computed using th... | 6 |
20_Pool.sol | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.3;
import "./interfaces/iBEP20.sol";
import "./interfaces/iUTILS.sol";
import "./interfaces/iDAO.sol";
import "./interfaces/iBASE.sol";
import "./interfaces/iDAOVAULT.sol";
import "./interfaces/iROUTER.sol";
import "./interfaces/iSYNTH.sol";
import "./interfac... | 4,067 | 418 | 0 | 1. [H-02]: Pool.sol & Synth.sol: Failing Max Value Allowance (Lack of input validation)
In the _approve function and `approveAndCall`, if the allowance passed in is type(uint256).max, nothing happens (ie. allowance will still remain at previous value). Contract integrations (DEXes for example) tend to hardcode this val... | 1 |
20_Synth.sol | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.3;
import "./Pool.sol";
import "./interfaces/iPOOLFACTORY.sol";
contract Synth is iBEP20 {
address public BASE;
address public LayerONE;
// Underlying relevant layer1 token
uint public genesis;
address public DEPLOYER;
string _name;... | 2,248 | 255 | 0 | 1. H-02: Pool.sol & Synth.sol: Failing Max Value Allowance (Lack of input validation)
In the `_approve` function, if the allowance passed in is `type(uint256).max`, nothing happens (ie. allowance will still remain at previous value). Contract integrations (DEXes for example) tend to hardcode this value to set maximum a... | 2 |
83_Shelter.sol | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IShelter } from "./interfaces/IShelter.sol";
import { IShelterClient } from "./interfaces/IShe... | 511 | 60 | 1 | 1. [H-03] Repeated Calls to Shelter.withdraw Can Drain All Funds in Shelter (L52-L57) (Reentrancy)
Anyone who can call `withdraw` to withdraw their own funds can call it repeatedly to withdraw the funds of others. withdraw should only succeed if the user hasn't withdrawn the token already.
2. [H-07] Shelter claimed ma... | 5 |
107_yVault.sol | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "../../interfaces/IContr... | 1,617 | 204 | 1 | 1. [H-01] yVault: First depositor can break minting of shares L148-L153 in `deposit` function
The attack vector and impact is the same as TOB-YEARN-003, where users may not receive shares in exchange for their deposits if the total asset amount has been manipulated through a large “donation”.
2. [H-04] Reentrancy issu... | 5 |
66_sYETIToken.sol | //SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "./BoringCrypto/BoringMath.sol";
import "./BoringCrypto/BoringERC20.sol";
import "./BoringCrypto/Domain.sol";
import "./BoringCrypto/ERC20.sol";
import "./BoringCrypto/IERC20.sol";
import "./BoringCrypto/BoringOwnable.sol";
import "./IsYETIRouter.sol";
in... | 3,607 | 345 | 1 | 1. [H-02] Yeti token rebase checks the additional token amount incorrectly (Timestamp manipulation)
The condition isn't checked now as the whole balance is used instead of the Yeti tokens bought back from the market. As it's not checked, the amount added to `effectiveYetiTokenBalance` during rebase can exceed the actua... | 2 |
20_synthVault.sol | // SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.3;
import "./interfaces/iBEP20.sol";
import "./interfaces/iDAO.sol";
import "./interfaces/iBASE.sol";
import "./interfaces/iPOOL.sol";
import "./interfaces/iSYNTH.sol";
import "./interfaces/iUTILS.sol";
import "./interfaces/iRESERVE.sol";
import "./interfaces/i... | 3,059 | 313 | 1 | 1. [H-01] SynthVault withdraw forfeits rewards
The `SynthVault.withdraw` function does not claim the user's rewards. It decreases the user's weight and therefore they are forfeiting their accumulated rewards. The synthReward variable in `_processWithdraw` is also never used - it was probably intended that this variable... | 4 |
28_SushiToken.sol | pragma solidity 0.6.12;
import "./ERC20.sol";
import "../interfaces/IMisoToken.sol";
import "../OpenZeppelin/access/AccessControl.sol";
// ---------------------------------------------------------------------
//
// SushiToken with Governance.
//
// From the MISO Token Factory
// Made for Sushi.com
//
// Enjoy. (c) ... | 2,538 | 317 | 1 | 1. H-02: SushiToken transfers are broken due to wrong delegates accounting on transfers (Delegatecall)
When minting / transferring / burning tokens, the SushiToken._beforeTokenTransfer function is called and supposed to correctly shift the voting power due to the increase/decrease in tokens for the from and to accounts... | 1 |
8_NFTXFeeDistributor.sol | // SPDX-License-Identifier: MIT
pragma solidity ^0.6.8;
import "./interface/INFTXLPStaking.sol";
import "./interface/INFTXFeeDistributor.sol";
import "./interface/INFTXVaultFactory.sol";
import "./token/IERC20Upgradeable.sol";
import "./util/SafeERC20Upgradeable.sol";
import "./util/SafeMathUpgradeable.sol";
import "... | 1,766 | 173 | 3 | 1. [M-05] Unbounded iteration in NFTXEligiblityManager.distribute over _feeReceivers (Gas Limit)
NFTXEligiblityManager.`distribute` iterates over all _feeReceivers. If the number of _feeReceivers gets too big, the transaction's gas cost could exceed the block gas limit and make it impossible to call distribute at all.
... | 3 |
29_IndexPool.sol | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0;
import "../interfaces/IBentoBoxMinimal.sol";
import "../interfaces/IMasterDeployer.sol";
import "../interfaces/IPool.sol";
import "../interfaces/ITridentCallee.sol";
import "./TridentERC20.sol";
/// @notice Trident exchange pool template with cons... | 3,822 | 387 | 2 | 1. [H-01] Flash swap call back prior to transferring tokens in indexPool
IndexPool.sol#L196-L223
In the IndexPool contract, `flashSwap` does not work. The callback function is called prior to token transfer. The sender won't receive tokens in the callBack function. ITridentCallee(msg.sender).tridentSwapCallback(context... | 11 |
16_Trader.sol | // SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
import "./Interfaces/ITracerPerpetualSwaps.sol";
import "./Interfaces/Types.sol";
import "./Interfaces/ITrader.sol";
import "./lib/LibPerpetuals.sol";
import "./lib/LibBalances.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECD... | 2,063 | 250 | 2 | 1. [M-05] Add reentrancy protections on function executeTrade (reentrancy)
As written in the to-do comments, reentrancy could happen in the `executeTrade` function of Trader since the makeOrder.market can be a user-controlled external contract.
2. [M-13] Trader orders can be front-run and users can be denied from trad... | 2 |
78_FlashGovernanceArbiter.sol | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "./Governable.sol";
import "hardhat/console.sol";
import "../facades/Burnable.sol";
///@title Flash Governance Arbiter
///@author Justin Goro
/**@notice LimboDAO offers two forms of governance: flash and proposal. Proposals are contracts that have authoriza... | 1,932 | 191 | 3 | 1. H-01: Lack of access control on `assertGovernanceApproved` can cause funds to be locked (Lack of Access Control)
Lack of access control on the `assertGovernanceApproved` function of FlashGovernanceArbiter allows anyone to lock other users' funds in the contract as long as the users have approved the contract to tran... | 6 |
12_Witch.sol | // SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "./utils/access/AccessControl.sol";
import "./interfaces/vault/ILadle.sol";
import "./interfaces/vault/ICauldron.sol";
import "./interfaces/vault/DataTypes.sol";
import "./math/WMul.sol";
import "./math/WDiv.sol";
import "./math/WDivUp.sol";
import ".... | 867 | 87 | 1 | 1. [M-03] Witch can't give back vault after 2x grab (Reentrancy)
The witch.sol contract gets access to a vault via the grab function in case of liquidation. If the witch.sol contract can't sell the debt within a certain amount of time, a second grab can occur. | 1 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 9