Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

The users will receive a wrong liquidity token amount because there is an error in the token price calculation in the LiquidityPool::processDeposits() function

Lines of code Vulnerability details Impact The processDeposits helps to process the users deposits that were queued in the queueDeposit function. The processDeposits function iterates multiple queued deposits and increases the totalFunds storage variable which is used to the accountability of the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.5 views

Namespace: Fusing will only result in namespaces containing font class 0, irrelevant of fused tiles

Lines of code Vulnerability details H-02 Namespace: Fusing will only result in namespaces containing font class 0, irrelevant of fused tiles After minting trays, a user can fuse tiles from multiple trays into a namespace. A tray tile specifies a character font class, the character's index and the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

The KangarooVault liquidity providers receive a wrong vault token amount because an error in the processDepositQueue() function

Lines of code Vulnerability details Impact The KangarooVault.sol::processDepositQueue function helps to process the queued deposits. The deposits are queued if the KangarooVault vault doesn't have registered positions. The processDepositQueue function calls the getTokenPrice function to be able t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.7 views

Owner is able to mint 1 token more than 1000 prelaunch tokens due to wrong equality check

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Owner is able to mint 1 token more than 1000 prelaunch tokens due to wrong check here Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.6 views

A Smart Contract can repeatedly call mint, increasing gas costs due to storage

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The functions fuse and mint do not check if the caller is an EOA account. Therefore a smart contract can call fuse over and again Proof of Concept Provide direct links to all referenced code in GitHub...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.13 views

IRRETRIEABLE COLLATERAL FOLLOWING A COMPLETE SHORT TRADE CLOSE

Lines of code Vulnerability details Impact This may have been prevented in the UI, but users opting for external integrations might unintentionally input zero or inadequate amount of params.collateralAmount and end up having the collateral stuck in ShortCollateral.sol forever after completing a...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.8 views

set critical parameters like fee recipient in constrctor.

Lines of code Vulnerability details Impact Loss of fee at certain condition. This can happen, when user call deposit function immediately contracts are deployed. Or when admin forget to update the feeReceient address. There are lot of address that admin has to set once the contract is deployed. S...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

A user can override a namespace created by another user, using the same name

Lines of code Vulnerability details Impact Let's say: Julian, and Juliet minted separate trays of characters in the Tray contract Julian approves Alice to mint a Namespace subprotocol NFT with the name Ali😀 Juliet also approves Alite to mint a Namespace subprotocol NFT with the name Ali😀 If a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.11 views

Users can receive less collateral than expected from liquidations

Lines of code Vulnerability details Impact Users might receive very little or no collateral when liquidating extremely unhealthy short positions. Vulnerability Details When users liquidate a short position, they expect to get a reasonable amount of collateral in return. The collateral amount sent...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.14 views

Potential Risk of Accidentally Minting Tokens to Incorrect Accounts

Lines of code Vulnerability details Impact 1. the Intended recipient of the tokens might not receive them, which could lead to a loss of funds or a delay in the intended use of the tokens 2. incorrect account holder could receive the tokens by mistake, leading to a discrepancy in the total token...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.8 views

Registering non-emoji domains doesn't work

Lines of code Vulnerability details Impact When registering a name containing a non-emoji tile, all the tiles are mapped to emoji tiles before registering a name, so the registered name is invalid. This ruins the protocol, the users can't use it to register the desired names unless they are purel...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.16 views

KangarooVault.removeCollateral updates storage without actually removing collateral, resulting in lost collateral

Lines of code Vulnerability details The admin can call KangarooVault.addCollateral to add additional collateral to a Power Perp position. File: src/KangarooVault.sol 424: function addCollateraluint256 additionalCollateral external requiresAuth nonReentrant 425: SUSD.safeApproveaddressEXCHANGE,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.16 views

[H-3] Any account can mint or burn an unlimited number of vault tokens and drain the Kangaroo Vault.

Lines of code Vulnerability details Impact This is a failure in setting up access control. Anyone could set the vault address to their address and call the mint/burn function to mint and burn vault tokens. The impact is severe since all the funds in Kangaroo vault can be withdrawn by anyone. Proo...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

A POSITION WILL BE FULLY LIQUIDATABLE AS SOON AS IT BECOMES LIQUIDATABLE

Lines of code Vulnerability details Impact A specific position can be liquidated if canLiquidate returns true. However, the function logic of maxLiquidatableDebt is going to make it fully liquidatable even if safetyRatio == 1e18. Proof of Concept Let's assume the following setup: collRatio = 1.5e...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.11 views

No access control in mint function

Lines of code Vulnerability details Impact Canto Bio Protocol: Should allow the association of a single biography to an identity address The mint function does not have any access control mechanism in place, allowing anyone to mint multiple Bio NFTs. This could lead unwanted minting of bios. Tool...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

Centralization privileges could cause revenue loss or DDoS

Lines of code Vulnerability details Impact DISCLAIMER: I understand that this was under known issues M-1, and I'm submitting this on another angle which is in case owner is compromised. Namespace and Tray contract allow the owner to execute some privilege actions which give flexibility but at the...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.10 views

ProfilePicture subprotocol is immutably linked by subprotocolName to the CID protocol

Lines of code Vulnerability details Impact Besides having to re-register the protocol, it will also have to be redeployed. Proof of Concept A protocol is registered by name in the SubprotocolRegistry. Quoting the Canto Identity Protocol contest details: "In theory, someone can front-run a call to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.10 views

KangarooVault.removeCollateral doesn't remove collateral from the EXCHANGE

Lines of code Vulnerability details Impact The owner of the KangarooVault can't receive collateral from EXCHANGE when he wants to remove collateral from the vault. Proof of Concept KangarooVault.removeCollateral doesn't remove collateral from the EXCHANGE. KangarooVault interacts with EXCHANGE, a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.11 views

Attacker can artificially inflate the token price and and gets more profit

Lines of code Vulnerability details Impact Attacker can cause the artificial inflation in token price and gets more profit Proof of Concept Let assume the inital values totalFunds = 10000000000 , VAULTTOKEN.totalSupply = 100000000000 , totalQueuedWithdrawals= 1000000 function initiateDepositaddre...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.11 views

Users can lose funds due to stuck NFT's

Lines of code Vulnerability details Impact If msg.sender is a contract could also be smart contract wallet that does not implement the onERC721Received method, in the current implementation of fuse Namespace.sol && mint Bio.sol, the tx will still be successful, and the token will be minted. In th...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.7 views

Bio Protocol - Cross-Site Scripting via tokenURI SVG image

Lines of code Vulnerability details Impact It is possible to inject bio that is a valid javascript code into generated on-chain SVG image. Attacker might pass following payload as bio: alert1234 which will result in generation of SVG image with the code: text font-family: sans-serif; font-size:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.18 views

(Pseudo) Random Number Generator can be gamed, allowing a user to target desirable NFT traits

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The iteratePRNG function in the Utils.sol library is used in Tray.sol:drawing, which is used to determine the tile data that a user gets when they purchase an NFT in Tray.sol:buy. An attacker can exploi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.16 views

sybil attack vulnerability (via Shitcoin)

Lines of code Vulnerability details Impact Attacker can create worthless shitcoin/NFT to mint PFP and as much as possible. Thereby acquiring outrageous and undeserved amount of PFP . Hence attacker is well positioned for further sybil attack/ farming. This is unhealthy to the contract and its...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.9 views

Multiple Mint of PFP with same NFTID

Lines of code Vulnerability details Impact Malicious user having only one NFT can mint PFP severally. Hence one user with only one NFT but multiple PFP. This isn't the intended implementation. Proof of Concept Is self-understandable. POC not required Recommended Mitigation Steps storing used NFT'...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.7 views

Fuse function only allows creation of emoji typed characters, and does not allow creation of other font classes like text.

Lines of code Vulnerability details Impact The fuse function only allows creation of emoji typed characters due to this line in the fuse function: bytes memory charAsBytes = Utils.characterToUnicodeBytes0, tileData.characterIndex, characterModifier;, which only accepts a fontClass of 0 as the fir...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.9 views

Exchange._liquidate function can cause liquidator to burn too much powerPerp tokens

Lines of code Vulnerability details Impact When calling the following Exchange.liquidate function, uint256 totalCollateralReturned = shortCollateral.liquidatepositionId, debtRepaying, msg.sender is executed. function liquidateuint256 positionId, uint256 debtRepaying internal uint256...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.15 views

LiquidityPool.sol#L657 : setFees() could be abused to steal the funds when there is huge transacion is happening.

Lines of code Vulnerability details Impact Set fee functions can be set to any arbitrary value when the transaction is happening. There are more possibility that user could lose most of all of their hard earned funds. Proof of Concept Below functions can be called by autheraised person to fix the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.16 views

Division by zero error causes KangarooVault to be DoS with funds locked inside

Lines of code Vulnerability details KangarooVault can be DoS with funds locked in the contract due to a division by zero error in getTokenPrice as it does not handle the scenario where getTotalSupply is zero. Impact Funds will be locked within the KangarooVault as shown in the PoC below and it is...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.9 views

Hard coding ChainID is error prone

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Recommended Mitigation Steps --- The...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.13 views

KangarooVault.sol : anyone can call the processWithdrawalQueue. This would hurt the user when the token price is low

Lines of code Vulnerability details Impact When the price is low, user would get less amount. Proof of Concept processWithdrawalQueue can be called by any one. function processWithdrawalQueueuint256 idCount external nonReentrant for uint256 i = 0; i availableFunds current.returnedAmount =...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.16 views

Bio Protocol - tokenURI JSON injection

Lines of code Vulnerability details Impact The Bio Protocol allows users to mint Bio NFTs that represent user's bio. Once NFT is minted anyone can trigger tokenURI to retrieve JSON data with the bio and generated svg image. Example JSON content decoded from Base64: "name": "Bio 1", "description":...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.10 views

Tray tile characterIndex values (via PRNG) can be manipulated by miners

Lines of code Vulnerability details Impact By manipulating the ordering of transactions in blocks, miners could manipulate the characterIndex values of a Tray's tiles. This could result in miners being able to specifically select characterIndex values that they want for specific Tray tiles, rathe...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.14 views

Disabling self-transfer may cause integration issues with other protocols

Lines of code Vulnerability details Impact Integration errors with other protocols Proof of Concept The changes made for H-01 causes transfers to revert if from == to. This is problematic because this is non-standard ERC20 behavior that can cause integration risk/issues with other protocols. I...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.6 views

Need to check with quantity also in _beforeTokenTransfers

Lines of code Vulnerability details Impact In Tray.sol, we can see tokenId checking in beforTokenTransfers. In the current code, it assumes that quantity is 1. But we need to take care with bunch transfer. Proof of Concept function beforeTokenTransfers address, / from/ address to, uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.14 views

Mint Bio NFT with mismatched SVG

Lines of code Vulnerability details Impact The tokenURI function of a given NFT contract must represent truth about the given tokenid. The Bio contract allows for minting of NFTs using a bio string. The tokenURI of a minted Bio NFT in turn generates a JSON response. This JSON payload includes the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.14 views

Short positions can be burned while holding collateral

Lines of code Vulnerability details Impact Users can permanently lose a portion of their collateral due to a malicious attacker or their own mistake. Vulnerability Details In the ShortToken contract, adjustPosition is used to handle changes to a short position's short or collateral amounts. The...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.6 views

The range of iteratePRNG limits the number of Zalgo distortions

Lines of code Vulnerability details Impact Only a tiny fraction of all Zalgo distortions are accessible. Proof of Concept In characterToUnicodeBytes, for font class 7 i.e. Zalgo, the characterModifier determines the Zalgo distortion. The distortion is pseudo-randomly calculated by using...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.7 views

Hedging during liquidation is incorrect

Lines of code Vulnerability details Impact Hedging will not work as expected, and LiquidityPool will lose funds without expectation. Proof of concept 1. When a short position is liquidated in contract Exchange, function liquidate will be triggered. It will burn the power perp tokens and reduce th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.6 views

Implementation error in Namespace.fuse() leads to a wrong unicode representation

Lines of code Vulnerability details Impact The font class of a tile will be always considered as 0 emoji when a user registers a name. Proof of Concept To register a name, fuse is used taking as input the data of the characters. The name to register is a string created by converting the character...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

Exchange.sol#L87 : openTrade is returning incorrect totalCost value which has accounting issue when open or closing the trade.

Lines of code Vulnerability details Impact It returns the incorrect value. Any operation done based on this function,either at front end of at contract level , could end with incorrect output. Proof of Concept User can interact with Exchangle.sol to trade. He/she will call the openTrade. openTrad...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.15 views

Incorrect calculation of usedFunds in LiquidityPool leads to lower than expected token price

Lines of code Vulnerability details In LiquidityPool.sol, the functions openLong, closeLong, openShort and closeShort do not deduct hedgingFees from usedFunds to offset the hedgingFees that was added due to hedge. Impact The missing deduction of hedgingFees will increase the usedFunds in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.8 views

characterModifier is uint8 but encodes 1.38e24 different Zalgo distortions.

Lines of code Vulnerability details Impact Only 256 Zalgo distortions are possible, which is a miniscule fraction of the actual combinations possible. Proof of Concept A Zalgo tile is defined by a letter and a modification consisting of a combination of characters above, over and below the letter...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.10 views

JSON context breaking in Bio.tokenURI

Lines of code Vulnerability details Impact Bio.tokenURI function returns an encoded JSON which is supposed to be parsed by a browser or another tool. The field description contains unsanitized user input and can be fully controlled by a hacker when they create an NFT via Bio.mintstring calldata...

6.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.10 views

[term-fix] Mitigation Error

Lines of code Vulnerability details Note - The term refactoring has been made for the following reason: Our main KIBT is intended to be backed by 1-year treasury bill tokens, however, a bond issued on 1 Jan 2023 does not have the same amount of seconds compared to a 1-year treasury bill issued on...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.13 views

Uneven deduction of performance fee causes some KangarooVault users to lose part of their token value

Lines of code Vulnerability details In KangarooVault.resetTrade, a performanceFee is charged upon closing of all positions, on the premiumCollected. This is inconsistent with getTokenPrice as premiumCollected is factored in the token price computation, while the performanceFee is not. This leads ...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.5 views

If the underlying NFT is burned, getPFP may returns incorrect results

Lines of code Vulnerability details Impact ProfilePicture.getPFP will return information about the underlying NFT and when addressRegistry.getAddresscidNFTID ! = ERC721nftContract.ownerOfnftID, it will return 0. But if the underlying NFT is burned, getPFP may return incorrect information function...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.12 views

Lack of token approval reverts the overall trade

Lines of code Vulnerability details Impact Since the user has not approved the params.collateralAmount, calling the safeTransferFrom function will result in a revert due to the lack of token approval. The Exchange contract not receive any collateralAmount. Proof of Concept...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.7 views

Potential front-running attacks in buy function

Lines of code Vulnerability details Impact The buy function generates new trays and stores them in the tiles mapping based on the value of lastHash. Since the value of lastHash is publicly accessible and can be predicted, an attacker could potentially front-run other users to mint specific trays...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.11 views

The user may lose the remaining tokens once the partial withdraw completed in processWithdraws() function. Unable to access the old withdrawalQueue once the queuedWithdrawalHead incremented

Lines of code Vulnerability details Impact User lose the tokens once partial withdraw completed. Proof of Concept function processWithdrawsuint256 count external override nonReentrant whenNotPaused"POOLPROCESSWITHDRAWS" assertqueuedWithdrawalHead + count - 1 nextQueuedWithdrawalId; for uint256 i ...

6.5AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/20 12:0 a.m.5 views

Namespace.sol fuse() function incorrectly calculates fused bytes

Lines of code Vulnerability details Impact The fuse function in Namespace.sol incorrectly calculates fused bytes. The first parameter to the characterToUnicodeBytes function is font class, which is always set to 0. This leads to an incorrect calculation of the tokenToName value, resulting in a...

6.6AI score
SaveExploits0
Total number of security vulnerabilities10190