Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/05/22 12:0 a.m.10 views

Check if the token of projectId matches the projectToken of the JBXBuybackDelegate

Lines of code Vulnerability details Impact At line 202, the amountReceived returned by the swap function is based on the projectToken defined in JBXBuybackDelegate. This will incorrectly trigger the mint function and because there is no verification of projectToken, it will mistakenly mint...

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

Some Functions Should Be Marked payable As They Handling ETH

Lines of code Vulnerability details Impact functions should be payable otherwise shows unintentional errors Proof of Concept These below functions are should be payable, function mintJBDidPayData calldata data, uint256 amount internal IJBController controller =...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.13 views

transfer() method can lead to re-entrancy attack

Lines of code Vulnerability details Impact The contract in scope has a withdraw function namely ‘uniswapV3SwapCallback’ which sends funds to the calling address. The calling address can be a malicious contract. Currently transfer sends more gas than 2300 creating a potential attack vector for...

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

TEST Med

Lines of code L1 Vulnerability details test medium Assessed type Access Control --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.9 views

Failure to check reservedRate can lead to a decrease in assets

Lines of code Vulnerability details Impact The payParams function takes the data parameter, which contains the reservedRate. If reservedRate exceeds MAXRESERVEDRATE, then this causes nonReservedToken to be incremented. This results in a decrease in assets and a larger mint. Proof of Concept...

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

Malicious user can Mint infinite amount of project tokens as anyone can call payParams function through malicious input and set the _tokenCount .

Lines of code Vulnerability details Impact Malicious user can Mint infinite amount of project tokens as anyone can call payParams function through malicious input and set the tokenCount. The payparams function calculates the tokenCount variable which refers to the amount of token to be minted or...

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

Improper configuration in JBXBuybackDelegate can cause swaps to fail everytime

Lines of code Vulnerability details Impact Improperly configured direction of swap in JBXBuybackDelegate can cause the calls to swap tokens in Uniswap V3 pool to fail everytime. So if the ideal path is token swap over minting, swaps will fail and new project token will be minted instead Proof of...

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

Invalid

Lines of code Vulnerability details Assessed type Other --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.12 views

didPay() front-running

Lines of code Vulnerability details Impact The minting flow of tokens in JBXBuybackDelegate is divided into separate external functions: payParams and didPay. The didPay function can only be called by jbxTerminal, while payParams can be called by anyone without restrictions. The payParams functio...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.13 views

Delegate should check that terminal is operating with ETH as the terminal token

Lines of code Vulnerability details Delegate should check that terminal is operating with ETH as the terminal token The JBXBuybackDelegate implementation is only prepared to operate with ETH as the terminal token. The implementation should check that the JuiceBox terminal matches this case. Impac...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.10 views

TEST Med 2

Lines of code L1 Vulnerability details test medium Assessed type Access Control --- The text was updated successfully, but these errors were encountered: All reactions...

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

M-01 Unmitigated

Lines of code L1 Vulnerability details Lines of code L1 Vulnerability details Confirmed --- The text was updated successfully, but these errors were encountered: All reactions...

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

Swap leftovers are locked in the JBXBuybackDelegate

Lines of code Vulnerability details Vulnerability details In case that the project JBToken address is bigger than WETH address, projectTokenIsZero is set to false. The test cases of buyback delegate only cover the situation, where the JBToken is lower than WETH. constructor IERC20 projectToken,...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.16 views

Incorrect setting of sqrtPriceLimitX96 in protocol

Lines of code Vulnerability details Impact The pool.swap function in the swap attempts to execute a swap. As the code below ,The sqrtPriceLimitX96 is set based on the value of projectTokenIsZero. If projectTokenIsZero is true, sqrtPriceLimitX96 is set to TickMath.MAXSQRTRATIO - 1; otherwise, it i...

7.4AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.11 views

Mutexes can be tampered with to increase gas costs

Lines of code Vulnerability details Impact An attacker can set mintedAmount and reservedRate to 0 which incurs greater gas fees when calling payParams. In the worst case this might cause the transaction to revert if the gas limit was tightly set to the expected gas cost. Proof of Concept...

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

Partial fill when swapping can cause ETH amount that is difference between _delegateAllocation.amount and _amountToSend to be locked in JBXBuybackDelegate contract

Lines of code Vulnerability details Impact When calling the following JBPayoutRedemptionPaymentTerminal31.pay function, if delegateAllocations.length != 0 is true, delegateAllocation.delegate.didPayvalue: payableValuedata can be executed, which sends delegateAllocation.amount as msg.value to the...

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

[M-01] Access control in *payParams* function

Lines of code Vulnerability details Impact Anyone can call this function and change mutex parameters. In this case we have a potential risk that malicious user can try to send several transactions: one from terminal and parallel one from other address and try front-run them to play for example wi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.10 views

REENTRANCY IN THE ERC777 PROJECT TOKEN, CAN LEAD TO INCONSISTENT STATE OF THE CONTRACT DURING TRANSACTION

Lines of code Vulnerability details Impact In the JBXBuybackDelegate.swap function there is a possbile reentrancy vulnerability. If the projectToken is a ERC777 token then the data.beneficiary can reenter the contract by calling the JBXBuybackDelegate.payParams external function to mint more...

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

Delegate architecture forces users to set zero slippage

Lines of code Vulnerability details Delegate architecture forces users to set zero slippage The design of the delegate forces users to set a zero value for the minReturnedTokens parameter when calling pay in the terminal. Technical details In order to implement the swap functionality, the...

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

Contributors will be unable to fund a project if UNISWAP token swapping is recommended over minting in JBXBuybackDelegate data source

Lines of code Vulnerability details Impact A core function of the juice-buyback contract, which is to maximise the project tokens received by the contributor, won't work whenever a swap from Uniswap V3 pool provides more tokens over minting because the transaction will revert. This can cause the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.9 views

JBXBuybackDelegate swap pathway always reverts unless slippage is set to 100%

Lines of code Vulnerability details Impact The swap pathway will never work and it will revert due to a validation error unless the user specifies a slippage of 100%. This would be extremely harmful as it would let users be targeted by MEV bots. Proof of Concept This is the pathway to payParams:...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.5 views

MALICIOUS USER CAN USE LOCKED ETH OF THE CONTRACT TO MINT HIGHER NUMBER OF TOKENS OR SWAP AND RECIEVE MORE TOKENS THAN HE IS ELIGIBLE

Lines of code Vulnerability details Impact In the JBXBuybackDelegate contract, the terminal token is considered to be ETH as of now according to documentation. Hence both the mint and swap functionality uses the data.amount.value as the ETH amount for new token minting or swapping. In the...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.10 views

If the controller for _data.projectId is not defined, it can lead to incorrect execution of _swap() and theft of funds by the beneficiary.

Lines of code Vulnerability details Impact If the controller is not defined in the swap function, then it becomes impossible to mint and burn tokens, which leads to incorrect execution of the function. IJBController controller = IJBControllerjbxTerminal.directory.controllerOfdata.projectId; Proof...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.11 views

Missing "if (beneficiaryTokenCount < _minReturnedTokens) revert INADEQUATE_TOKEN_COUNT();" check in the _mint() function of the JBXBuybackDelegate.sol + DoS for the pay() function in the JBPayoutRedemptionPaymentTerminal3_1.sol (or the JBETHPaymentTerminal3_1.sol)

Lines of code Vulnerability details Impact The issue contains 2 parts: 1. The mint function has the "if beneficiaryTokenCount minReturnedTokens revert INADEQUATETOKENCOUNT;" check missing. This check is used to identify whether the beneficiaryTokenCount amount is greater than or equal to the...

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

No deadline for swaps

Lines of code Vulnerability details Impact No deadline for swaps allows transactions to be executed later, unfavourably or maliciously. Proof of Concept When tokens are to be swapped rather than minted, slippage is controlled in uniswapV3SwapCallback by minimumAmountReceived which is calculated...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.9 views

Return values of weth.transfer() not checked

Lines of code Vulnerability details Impact Return values of weth.transfer not checked Proof of Concept The function weth.transfer has a boolean return value function transferaddress dst, uint wad public returns bool return transferFrommsg.sender, dst, wad; and they indicate errors that way instea...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.9 views

Delegate uses incorrect parameter for the token amount

Lines of code Vulnerability details Delegate uses incorrect parameter for the token amount The delegate implementation uses the incorrect "amount" parameter from the JBDidPayData struct that is sent to the didPay function. Impact The implementation of the pay function in the terminal builds the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.10 views

DoS while calling pay() for the first time when the JBXBuybackDelegate.sol would not have any project's token

Lines of code Vulnerability details Impact 1. Let us assume a user calls the pay function in the JBPayoutRedemptionPaymentTerminal31.sol or the JBETHPaymentTerminal31.sol for the first time. By "for the first time", I mean that the JBXBuybackDelegate.sol does not have any of the project's tokens ...

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

JBXBuybackDelegate.didPay() allows for positive slippage theft

Lines of code Vulnerability details Impact The JBXBuybackDelegate.didPay calls swap which utilizes the Uniswap's swap function. JBXBuybackDelegate incorporates a negative slippage check in uniswapV3SwapCallback. However, it fails to consider the deadline parameter of the transaction. The deadline...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.12 views

Invalid conversion uint256 -> int256

Lines of code Vulnerability details Impact Invalid conversion uint256 - int256 in pool.swap.... The number may be incorrectly converted uint256 data.amount.value - int256 amountSpecified. As a result, number truncation may occur. Proof of Concept typeuint256.max =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.9 views

contract might not function due to lack of funds

Lines of code Vulnerability details Impact when the contract receives a Uniswap pool callback the contract performs some checks before it proceeds to call the weth.deposit with a msg.value that is equal to amountToSend to wrap eth and transfer it to the pool, however the contract is not guarantee...

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

ETH CAN GET LOCKED IN THE CONTRACT DURING THE EXECUTION OF _swap() FUNCTION

Lines of code Vulnerability details Impact In the JBXBuybackDelegate delegate contract, if the swap option is selected after comparing the quote, the JBXBuybackDelegate.swap function will swap the data.amount.value amount of ETH in the following pool.swap call. try pool.swap recipient: addressthi...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.13 views

Anyone can front-rundidPay calling payParams to grief swaps and mints

Lines of code Vulnerability details Impact The payParams function in the IJBPayDelegate contract does not currently have any form of access control implemented. This could allow a malicious user to manipulate the mintedAmount and reservedRate state variable, which can interfere with the correct...

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

WETH transfer may fail silently in 'uniswapV3SwapCallback' function and execution may stop without any reverts or notification.

Lines of code Vulnerability details Impact WETH transfer may fail silently in 'uniswapV3SwapCallback' function and execution may stop without any reverts or notification. Proof of Concept In the 'uniswapV3SwapCallback' function There's no checks if the WETH transfer have failed or not . If the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/22 12:0 a.m.11 views

Setting the slippage tolerance incorrectly can result in users losing funds

Lines of code JBXBuybackDelegate.solL156 Vulnerability details Impact Since the slippage parameter is also passed from the frontend, we need to validate the magnitude of the parameter value,if slippage == SLIPPAGEDENOMINATOR ,users may be vulnerable to sandwich attacks during the Uniswap swapping...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/21 12:0 a.m.8 views

Unsafe cast in swap and uniswapV3SwapCallback functions can lead to attack

Lines of code Vulnerability details Impact The swap and uniswapV3SwapCallback functions performs an unsafe cast of a uint256 type to a signed integer. amountReceived = uint256-projectTokenIsZero ? amount0 : amount1; Note that amount is chosen by the caller and when choosing amount = 2256 - 1, thi...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/21 12:0 a.m.9 views

Should check for _data.amount.value

Lines of code Vulnerability details Impact msg.value is not checked in didPay, if swap is not successful, the eth amount sent back to the terminal is data.amount.value, which is provided by the user. If there is leftover eth in the contract, the fund could be stolen. Proof of Concept Some eth cou...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/21 12:0 a.m.9 views

eth is being sent to an arbitrary user

Lines of code Vulnerability details Impact unauthorized access to this function could lead to unauthorized balance modifications Dangerous calls: — jbxTerminal.addToBalanceOfvalue: data.amount.valuedata.projectId,data.amount.value,JBTokens.ETH,,new bytes0 Tools Used Slither Analysis Recommended...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/21 12:0 a.m.12 views

Minting exposes beneficiaries to unlimited slippage while minting the token out, sending back the token in the terminal.

Lines of code Vulnerability details Impact The amount of tokens minted/assets received when minting can be manipulated to an unlimited extent by manipulating the reserves of the pool. Proof of Concept Here the mint function mints the tokens out to the beneficiary. However the Delegate can't speci...

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

mintedAmount and reservedRate mutex not working

Lines of code Vulnerability details Impact File: JBXBuybackDelegate.sol 101 / 102 @notice The amount of token created if minted is prefered 103 104 @dev This is a mutex 1-x-1 105 / 106 uint256 private mintedAmount = 1; 107 108 / 109 @notice The current reserved rate 110 111 @dev This is a mutex...

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

Upgraded Q -> 2 from #597 [1684599598059]

Judge has assessed an item in Issue 597 as 2 risk. The relevant finding follows: L4 --- The text was updated successfully, but these errors were encountered: All reactions...

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

The return value of an external transfer call is not checked on the function uniswapV3SwapCallback in the contract named JBXBuybackDelegate

Lines of code Vulnerability details Impact Several tokens do not revert in case of failure and return false. If one of these tokens is used in MyBank, deposit will not revert if the transfer fails, and an attacker can call deposit for free...

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

Always mint 1 wei when _data.preferClaimedTokens is false

Lines of code Vulnerability details Impact File: JBXBuybackDelegate.sol 183 function didPayJBDidPayData calldata data external payable override --skip-- 188 uint256 tokenCount = mintedAmount; 189 mintedAmount = 1; --skip-- 200 if data.preferClaimedTokens --skip-- 206 else 207 mintdata, tokenCount...

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

Overflow in _swap() change the behavior of pool.swap()

Lines of code Vulnerability details Impact In swap, amountSpecified is set to int256data.amount.value. But data.amount.value is an uint256. If data.amount.value is bigger than typeint256.max, amountSpecified becomes a negative value due to overflow. And a negative amountSpecified means a complete...

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

Upgraded Q -> 2 from #597 [1684599709636]

Judge has assessed an item in Issue 597 as 2 risk. The relevant finding follows: L9 --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/19 12:0 a.m.11 views

Attacker can front-run didPay() by calling payParams() to set mintedAmount & reservedRate, reducing output amount

Lines of code Vulnerability details Impact Attacker can front-run didPay by calling payParams to set mintedAmount & reservedRate. This will reduce the output amount the caller to didPay was expecting to receive. Proof of Concept Anyone can call payParams and provide arbitrary input to set...

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

New finding

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 Assessed...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/19 12:0 a.m.11 views

TEST-medium

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 Assessed...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/19 12:0 a.m.14 views

TEST-high risk

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 Assessed...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/05/18 12:0 a.m.9 views

Upgraded Q -> 2 from #255 [1684436602164]

Judge has assessed an item in Issue 255 as 2 risk. The relevant finding follows: QA-03: Anyone can memorialize LP positions from another user Description The function PositionManager.memorializePositions contains no access control. This means anyone can memorialize other LP's positions, provided...

6.8AI score
SaveExploits0
Total number of security vulnerabilities10190