10190 matches found
Solmate's safeTransfer function does not check the existence of the contract
Lines of code Vulnerability details Impact Miscalculation of transferred funds and finally, loss of funds Proof of Concept Solmate's safeTransfer and safeTransferFrom functions do not check the ext code size of the address of the recipient and so, it may lead to a miscalculation of funds as it...
Denial of service from malicious bidder by filling up the bid index up until 1000
Lines of code Vulnerability details Impact Denial of service from malicious bidder by filling up the bid index up until 1000 Proof of Concept Initially inside bid function there is a check condition if bidIndex = 1000 then it will revert, so this will limit the size of bid created by bidder to...
Attacker can drain the SizeSealed.sol contract.
Lines of code Vulnerability details Impact An attacker can drain the SizeSealed.sol contract buy creating fake auction and manipulating some contract logic. POC Assuming that the SizeSealed.sol initially contains 10000 DAI tokens, I’ll demonstrate how an attacker can steal these tokens. The bug i...
Providing the same address for the "base" and the "quote" tokens creates a risk of fund loss for the seller.
Lines of code Vulnerability details Impact The "createAuction" function requires the seller to input the address of a base and a quote token. However, there is no statement that checks whether or not these two provided addresses are the same. As a result, the seller could accidentally fill in an...
Casting to uint128 when valiue can exceed uint128.max
Lines of code Vulnerability details Impact In CommonTokenMath.tokensAvailableAtTime the result is cast to uint128 on line 62. Given that baseAmount close or at it's uint128.max, and cliffPercent is close or at it's max of 1e18 dictated on line 72 in SizeSealed.sol, cliffAmount can reach uint128.m...
[PNM-001] finalize with malicious input may allow multiple calls leading to fund draining
Lines of code Vulnerability details Description The finalize function of the contract SizeSealed is used to finalize an auction, allowing the auctioner or seller to be paid quote tokens and also eventually allowing successful bidders to withdraw base tokens. Once the finalize function is called,...
Contracts will not working correctly after February 2106. Vesting will be locked forever if withdrawn after February 2106.
Lines of code Vulnerability details Impact Contracts will not working correctly after February 2106. Migration takes costs and is risky. You shouldn't pass on this work to future programmers. You should fix it in the first place. In case anything went wrong during migration, a big fund loss will...
[PNM-003] finalize can be called by bidders, allows them to cancelBid
Lines of code Vulnerability details Description The finalize function is used to finalize the auction, locking all bids, and paying the seller. However, any user, including bidders can call finalize, as it is a public function, and there are no user checks. This may allow bidders to input malicio...
Can't cancel bid when in the reveal period.
Lines of code Vulnerability details Impact Expected: Only allow bid cancellations while not finalized or in the reveal period. Actual: Can't cancel bid when in the reveal period. Recommended Mitigation Steps Change the code in to if a.data.lowestQuote != typeuint128.max || block.timestamp...
quoteToken could be fee-on-transfer token
Lines of code Vulnerability details Impact Some ERC20 tokens could have fees for each transfer, they are known as "fee-on-transfer" tokens. While there is a check inside createAuction function that prevents these tokens from being baseToken, FoT tokens still allowed to be quoteToken which could...
Refinalization with theft of funds from other auctions
Lines of code Vulnerability details Vulnerability details Description There is a finalize function in the SizeSealed smart contract. The function traverses the array of the bids sorted by price descending. There is a prevention of the refinalization by the modifier atStateidToAuctionauctionId,...
Bidder can steal all the base token by repeatedly calling finalize()
Lines of code Vulnerability details Impact All the base token will be stolen by malicious bidder, even worse the bidder might pay nothing at the end. Proof of Concept Anyone can call finalize, and it can be called multiple times. FinalizeData memory data is local, which means in each call, data i...
Lack of notice period for critical operations
Lines of code Vulnerability details Impact All user assets can be locked or stolen. Proof of Concept All user assets can be locked or stolen if the L1ERC20Bridge or L1EthBridge is upgraded to a malicious contract. All user assets can be locked or stolen if governor is lost and...
Protocol won’t work with rebasing tokens
Lines of code Vulnerability details Proof of Concept Some tokens may make arbitrary balance modifications outside of transfers e.g. Ampleforth style rebasing tokens, Compound style airdrops of governance tokens, mintable / burnable tokens. If such a token as used, since in the protocol we cache t...
Return value of ecMul() not checked in encryptMessage()
Lines of code Vulnerability details Impact ecMul returns 1,1 if failed or with invalid parameters. But encryptMessage does not check for the return value of ecMul. If there is mistake of the private key or public key, the encrypted message will be useless and potentially fail the auction. Proof o...
Arbitrage Opportunity for Non-Sellers
Lines of code Vulnerability details Impact Non-sellers can flood the system with arbitrage auctions. Proof of Concept The seller can wait until 1 instant minute? before the end of the auction. Now the seller places a bid a couple percent above the current market price, enough to cover the seller'...
Bidder can abuse the bidIndices[] in finalize()
Lines of code Vulnerability details Impact finalize could be called by anyone, and the input array bidIndices is not sanity checked. Some malicious bidder can trick the bidIndices to always get the reserveQuotePerBase price. The seller would incur some loss. The other bidders are grieved, wasting...
Reentrancy in createAuction() function
Lines of code Vulnerability details Impact Some ERC20 tokens missing return values and don't fail in case of an unsuccessful transfer. Also, ERC777 tokens could call the tokens receivers during the transfer. If baseToken would be such a token that combines both properties - this could lead to a...
Malicious seller can finalize his/her auction without changing data.lowestQuote , then auction's state will not be updated to States.finalized and this seller can repeat finalize or cancel auction to steal tokens from contract
Lines of code Vulnerability details Vulnerable details In contract, an auction's state will beStates.Finalized if data.lowestQuote of this auction is different from typeuint128.max. L33-34 data.lowestQuote is assigned to equal clearingQuote when seller finalize auction. L238 This value will be...
Denial of service when baseAmount is equal to zero
Lines of code Vulnerability details Vulnerability details Description There is a finalize function in the SizeSealed smart contract. The function traverses the array of the bids sorted by price descending. On each iteration, it calculates the quotePerBase. When this variable is calculated, the...
Use of abi.encodePacked on SizeSealed.computeMessage can cause auctions to never finalize
Lines of code Vulnerability details Impact The usage of abi.encodePacked on the SizeSealed.computeMessage function might cause an incorrect packing of baseAmount and the random salt for some specific combinations of bid/salt, which will cause SizeSealed.finalize to always revert with...
Front-running of bid calls
Lines of code Vulnerability details Description There is bid function in the SizeSealed contract. The function accepts the auctionId, which does not contain any information about the auction itself. As a result, transactions of users can be front-runned to enforce them bid for the auction with th...
Seller can game the bidIndices[] in finalize()
Lines of code Vulnerability details Impact High bidders will be taken advantage of by malicious seller. It is likely that the high bidders will place bids above the market price, then the seller can effectively steal the price difference from them. And the other bidders are grieved, wasting time...
Any use of fee-on-transfer tokens as quote tokens in auctions will result in freeze or loss of funds for users.
Lines of code Vulnerability details Description SIZE auctions do not support fee-on-transfer tokens. The platform rejects taxed baseToken during createAuction: // Passes https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.solL9 // Transfer base tokens to auction contrac...
seller can change lowestBaseand lowestQuote and the seller can make it diffrent values causing a dos or loss of funds
Lines of code Vulnerability details Impact When I a seller finalizes the auction they change the lowestQuote and lowestBase.When users withdraw from the auction after the auction is finalized. QuoteBought is calculated with the new amounts which can cause dos or refund their leftover quote amount...
msg.sender token balance is not checked before calling safeTransferFrom function
Lines of code Vulnerability details Impact createAuction FUNCTION and bid FUNCTION: Without checking the msg.sender token balance the transfer function may be failed to transfer token from msg.sender to contract address . this may cause a transactions failures. Same instance in 2 times PROOF OF...
baseToken AND quoteToken CAN BE THE SAME ERC20 TOKENS, RESULTING IN TRICKING BIDDERS TO LOSE THEIR TOKENS
Lines of code Vulnerability details Impact createAuction can be called by anyone to create auctions. One of the input parameter that this function requires is auctionParams. Since the createAuction function doesn't check that baseToken AND quoteToken are same or not, an Adversary can create an...
SizeSealed.withdraw will revert on mulDivDown if a.data.lowest is the value zero, which can prevent withdraws for an auction
Lines of code Vulnerability details Proof of Concept The call to mulDivDown on L377 will revert if the third argument denominador is the value zero. See Solmate implementation. It's possible for a.data.lowestBase to receive the value zero, which will prevent the transfers from L381 and L384. Impa...
Low level call returns true if the address doesn’t exist
Lines of code Vulnerability details Impact the low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as part of the design of the EVM. Account existence must be checked prior to calling if needed. Proof of Concept...
Attacker can take all the winnings and fill up the bids and cause loss of funds or dos
Lines of code Vulnerability details Impact Attacker can fill up all the bids and steal and be the winner and cause a dos and then withdraw/refund the funds since when doing a refund the bid isn't taken off the array an attacker can make 1000 bids and cause dos and have 100 percent chance of winni...
Solmate's SafeTransferLib won't check if token has code, which can affect transfers in SizeSealed
Lines of code Vulnerability details Impact Not checking for token existence is a know issue for Solmate. This can cause unexpected contract functionality for transfers implemented in SizeSealed. Note that this might not be a problem for baseToken due to the check implemented in L103. However, thi...
Filling all auction slots to win the auction
Lines of code Vulnerability details Vulnerability details Description The number of bids for one auction is limited to 1000. It means that someone may make all 1000 bids and thus invalidate all other bids. Therefore, a malicious user can win the auction with the minimum possible bid. It may seem...
A bidder can buy baseToken with low price by exploiting the DOS prevention measure
Lines of code Vulnerability details Impact In order to prevent DOS attacks, the smart contract introduces a measure that limits the number of bids on an auction SizeSealed.solL157-L159. However, an attacker/bidder can exploit this measure to block others to place bids so that the attacker can buy...
Rebasing tokens as Base tokens for the auction could be stuck in the contract or mean loss of funds for the las person to withdraw
Lines of code Vulnerability details Impact Use of rebasing tokens is not checked and could result it stuck funds, inability to cancel an Auction or withdraw due amounts of base token for the last one to call withdraw Proof of Concept If a rebasing token is used for the base token the balance held...
Quotetoken can be address(0) or any EOA and still allow auctions and bids to be created
Lines of code Vulnerability details Impact createAuction in SizeSealed.sol performs no validation of the auction parameters AuctionParameters sent to it and will allow a Seller to create an auction with an ERC20 quoteToken of address0 putting at risk the baseToken that has real value. In addition...
Cancel auction does not get deleted leading to loss of quoteTokens
Lines of code Vulnerability details Impact A malicious seller can cancel the auction just after it has ended, receive their baseToken back and then call reveal to make bidders lose their tokens which is sent to address0. Since a.data.lowestQuote == typeuint128.max just before reveal call is made,...
Some cases maybe cause the bids unable to get their funds back.
Lines of code Vulnerability details Impact All of the following there cases maybe cause the bids unable to get their funds back. Details case1: If sellerwho is a bad man does not reveal in the reveal period, then all the bids will be unable to get their funds back. case2: If sellerwho is a bad ma...
VARIABLE BALANCE TOKEN ASSOCIATED WITH LOSS AND LOCKING OF FUNDS
Lines of code Vulnerability details Impact ERC20 tokens that are either deflationary or re-basing down could have their respective balance change. The balance could become insufficient at the time of withdraw, refund or cancel to the bidders whose funds will be locked due to DOS. The way to take...
Aliasing L1 sender on L2
Lines of code Vulnerability details Impact If a contract on L1 has the same address as a contract on L2 but doesn't have the same code, we will have a critical issue, as funds will be lost. Proof of Concept Both Optimism and Arbitrum implements applyL1ToL2Alias / undoL1ToL2Alias logic to prevent ...
Bridge should not allow ERC20 tokens with double-entry point
Lines of code Vulnerability details Impact If a token with double-entry point is escrowed in L1 bridge, the user could withdraw their token through the other entry point, thus rugpulling the bridge. And when they actually withdraw from L2, they will take other users' funds from the bridge. Proof ...
No incentive mechanism for allowed senders to call finalizeWithdrawal on behalf of withdrawers.
Lines of code Vulnerability details Impact Since finalizeWithdrawal is a permissioned function, if there are no mechanism in place for allowed senders to trigger it, withdrawers would not able to receive their funds in a timely fashion. Proof of Concept The withdrawal functions such...
Cross-chain replay attacks are possible with create2()
Lines of code Vulnerability details Impact Mistakes made on one chain can be re-applied to a new chain There is no chain.id in the create2 function data If a user does create2 using the wrong network, an attacker can replay the action on the correct chain, and steal the funds a-la the wintermute...
Upgraded Q -> H from 486 [1667781140997]
Judge has assessed an item in Issue 486 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Hacker can front-run the L2 ERC20 token deployment.
Lines of code Vulnerability details Impact hacker can front-run the L2 ERC20 token deployment to block L2 ERC20 token finalizeDeposit Proof of Concept I intend to prove this piece of code is front-runnable by hacker: /// @notice Finalize the deposit and mint funds /// @param l1Sender The account...
Upgraded Q -> M from 133 [1667781432368]
Judge has assessed an item in Issue 133 as Medium risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Upgraded Q -> M from 16 [1667781797574]
Judge has assessed an item in Issue 16 as Medium risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...
Add chainId to address creation.
Lines of code Vulnerability details Impact Although it may not be in the plan to deploy multiple zkSync rollups, it makes sense to include chainid in computeCreate2Address from the very start. It would be more EIP-155 compliant, and will prevent future replay attacks, where a tx of first zkSync...
ergs price problem
Lines of code Vulnerability details No mechanism has been defined for " l2TransactionBaseCost" function. On the other hand, any Oracle is not used in the whole project to get the price of gas, so this whole project will suffer in coordinating between the price of “ergs” in ZK layer and the real a...
Asymmetric level of transaction validation between L1 side and L2.
Lines of code Vulnerability details Impact May have double counting of deposits? Proof of Concept On L1 side, there are validations that ensure funds don't get lost nor double counted. For example, finalizeWithdrawal may be called multiple times by allowed callers in case previous calls fail...
Same function
Lines of code Vulnerability details Both functions do the same thing, while logically one of the functions should be for layer one and the other function should be in layer two to perform the same operation. --- The text was updated successfully, but these errors were encountered: All reactions...