371 matches found
Incorrect calculation
Lines of code Vulnerability details Impact On line 119, the result of the conversion is always going to be zero. Therefore, functions that apply onlyDriver modifier will never be executed. Proof of Concept Please deploy the code below to test the modifier's broken implementation. //...
Incorrect calculation
Lines of code Vulnerability details Impact On line 119, the result of the conversion is always going to be zero. Therefore, functions that apply onlyDriver modifier will never be executed. Proof of Concept Please deploy the code below to test the modifier's broken implementation. //...
Burning a ERC1155Enumerable token doesn't remove it from the enumeration
Lines of code Vulnerability details The ERC1155Enumerable base contract used in the TimeswapV2Token and TimeswapV2LiquidityToken tokens provides a functionality to enumerate all token ids that have been minted in the contract. The logic to remove the token from the enumeration if the last token i...
Unsecured usage of msg.sender in smart contract functions TimeswapV2Pool.sol.
Lines of code Vulnerability details Impact The bug is related to the use of the msg.sender in the smart contract functions. The msg.sender is a built-in variable in the Solidity programming language, which represents the address of the account that called the function, the msg.sender is used to...
Lack of input validation: The contract does not perform any checks on the inputs passed to the functions, which could allow an attacker to pass malicious data and trigger wrong behavior or errors.
Lines of code Vulnerability details Impact function readInt208 ReturndataPointer rdPtr internal pure returns int208 value assembly returndatacopy0, rdPtr, 0x20 value := mload0 This function reads the int208 at rdPtr in returndata. However, it does not perform any checks on the input rdPtr to ensu...
_locateCurrentAmount function, there is an unchecked block which skips underflow checks as startTime <= block.timestamp < endTime
Lines of code Vulnerability details Impact In the locateCurrentAmount function, there is an unchecked block which skips underflow checks as startTime = block.timestamp endTime, but if the condition is not upheld, the duration, elapsed, and remaining variables will underflow and can cause unexpect...
_locateCurrentAmount function, there is an assembly operation that is dividing by duration without a zero check
Lines of code Vulnerability details Impact In the locateCurrentAmount function, there is an assembly operation that is dividing by duration without a zero check, which could cause a division by zero error. Proof of Concept // Check for division by zero requireduration != 0, "Division by zero...
Incorrect Encoding of Order Hashes
Lines of code Vulnerability details Impact The order hashes are incorrectly encoded during the encodeOrderHashes mechanism, causing functions such as encodeRatifyOrder and encodeValidateOrder to misbehave. Proof of Concept The order hashes encoding mechanism appears to be incorrect as the...
Optimizer Bug Regarding Memory Side Effects of Inline Assembly
Lines of code Vulnerability details Impact This bug only occurs under very specific conditions: the legacy optimizer must be enabled rather than the IR pipeline true for the current project configuration, and the affected assembly blocks must not refer to any local Solidity variables Proof of...
Lack of proper input validation in fulfillAvailableAdvancedOrders function
Lines of code Vulnerability details Impact fulfillAvailableAdvancedOrders function is designed to fulfill orders on the marketplace, an attacker could pass an AdvancedOrder struct with a much higher value than the intended order, allowing them to gain an unfair advantage, or they could pass a...
Missing Function Definition in tryPrice() leading to contract failure.
Lines of code Vulnerability details Impact basketRange in the contract. The function tryPrice calls the function basketRange from the library RecollateralizationLibP1, which is not defined in the contract. As a result, when tryPrice is executed, it will cause the contract to revert and throw an...
Compilation Error: Undefined function 'shiftl_toFix' in CTokenFiatCollateral Contract
Lines of code Vulnerability details Impact return shiftltoFixrate, shiftLeft; It should be noted that the function "shiftltoFix" is not defined in the contract and not imported from any library, this means that the compiler will throw an error when trying to deploy the contract and this function...
abi.encodePacked Allows Hash Collision
Lines of code Vulnerability details Impact From the solidity documentation: If you use keccak256abi.encodePackeda, b and both a and b are dynamic types, it is easy to craft collisions in the hash value by moving parts of a into b and vice-versa. More specifically, abi.encodePacked"a", "bc" ==...
JumpRateModelV2 may return wrong values
Lines of code Vulnerability details JumpRateModelV2 may return wrong values Impact Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision. Vulnerability Details In general, this is a problem due to precision mostly if...
getStakers() and getMinipools() could return wrong values (Access Control)
Lines of code Vulnerability details Impact Staking.sol and MinipoolManager.sol contracts use the eternal storage pattern. The contracts are a key-value store that all protocol contracts can write to and read. more info: Functions getStakers.staking and getMinipools.MinipoolManager are implemented...
Rounding down leads to breakage of the xy curve calculation
Lines of code Vulnerability details Impact When needing to calculate the inputAmount required to receive a certain amount of fractional tokens called outputAmount, we are deriving from the xy = k curve used on the Uniswap V2 protocol. Proof of Concept Some maths: The so-called curve equation is: ...
Truncate of values can be avoided
Lines of code Vulnerability details Truncate of values can be avoided Summary Solidity integer division might truncate. As a result, performing multiplication before division can sometimes avoid loss of precision. Details In general, this is a problem due to precision. In this case, it also affec...
integer overflow or underflow
Lines of code Vulnerability details Impact If an integer overflow or underflow occurs in the contract, it could lead to incorrect calculations and potentially unintended consequences, such as the transfer of incorrect amounts of tokens or the allocation of incorrect amounts of rewards. This could...
Asset removal leaks previous asset prices which will be used again when asset is re-added.
Lines of code Vulnerability details Description NFTFloorOracle retrieves ERC721 prices for ParaSpace. Recordings of prices are managed in assetFeederMap, mapping between address and FeederRegistrar: struct FeederRegistrar // if asset registered or not bool registered; // index in asset list uint8...
Ownership of EscherERC721.sol contracts can be changed, thus creator roles become useless
Lines of code Vulnerability details Impact creator = has a CREATORROLE in Escher.sol non-creator = doesn't have a CREATORROLE in Escher.sol Currently creating an ERC721 edition via the Escher721Factory.sol contract requires a user to have the CREATORROLE in the main Escher.sol contract. This...