Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•24 views

Changes not being stored in Delta.sol

Lines of code Vulnerability details Changes not being stored in Delta.sol Impact Functions working without proper storage dealing into unexpected behaviors Proof of Concept function combineInstance memory self, Instance memory delta internal pure if !self.skipCombine self.deltaInBinInternal +=...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•11 views

Admin can call claim fee multiple times with no restriction

Lines of code Vulnerability details Impact Admin can call claim fee multiple times to drain the fund in the pool Proof of Concept Admin can perform certain actions in the Pool.sol function adminActionuint256 action, uint16 val, address recipient external checkReentrancytrue, true; // reentrancy...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•18 views

Insufficient support for fee-on-transfer type of ERC20

Lines of code Vulnerability details Some ERC20 token implementations have a fee that is charged on each token transfer. This means that the transferred amount isn't exactly what the receiver will get. A call to IERC20token.transferrecipient, 100 with a fee-on-transfer FOT of 5% will entitle the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•20 views

Anyone can set the accountList object

Lines of code Vulnerability details Impact The setAccountList function which is the function that is responsible to set the account list object is made public with no access control on the AccountListCaller contract, Proof of Concept truffle console --networkId 555 compile attacker = "choose...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•17 views

A finding that cannot be disclosed at the moment

Lines of code Vulnerability details This finding couldn't be disclosed at the time when the contest was running. After consulting with CloudEllie, it was decided to create a stub report so the finding could be submitted after the contest is over. A checksum of the report:...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•20 views

userToDeposits is always increasing, can eventually reach cap

Lines of code Vulnerability details Impact In contract DepositRecord when a deposit is recorded through function recordDeposit: function recordDepositaddress sender, uint256 amount external override onlyAllowedHooks requireamount + globalNetDepositAmount amount globalNetDepositAmount -= amount;...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•12 views

TWA update is not correct

Lines of code Vulnerability details Impact Time-warped-price is updated incorrectly and this affects moving bins. Proof of Concept The protocol updates twa on every swap and uses that to decide how to move bins. But in the function swap, the delta's endSqrtPrice can not contribute negatively to t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•17 views

There is no option to cancel an EMERGENCY mode.

Lines of code Vulnerability details Impact There is no option to cancel an EMERGENCY mode in the pool. Once the pool is in an EMERGENCY mode, the pool can't work as normal forever. Proof of Concept The pool can be changed to an EMERGENCY mode by adminAction. function adminActionuint256 action,...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•19 views

Redeem should revert if the TokenSender.sol doesn’t have enough outputtoken to reimburse to users.

Lines of code https://github.com/prepo-io/prepo-monorepo/blob/49a7ed94272db013245d9364e69be713a8aef0a2/apps/smart-contracts/core/contracts/TokenSender.solL41 Vulnerability details According to the comments in the code of RedeemHook.hook function : Once a market has ended, users can directly settl...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•27 views

Overflow in BinMap can break pool

Lines of code Vulnerability details Impact The BinMap library performs multiplication on int32 values that can potentially overflow and cause the corresponding function calls to revert. The functions in question are used by essential Pool methods such as Pool.addLiquidity or Pool.swap and an...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•16 views

Pool._amountToBin() returns a wrong value when protocolFeeRatio = 100%.

Lines of code Vulnerability details Impact Pool.amountToBin returns a larger value than it should when protocolFeeRatio = 100%. As a result, bin balances might be calculated wrongly. Proof of Concept delta.deltaInBinInternal is used to update the bin balances like this. if tokenAIn binBalanceA +=...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•31 views

[NAZ-M2] Usage of send() Can Result In Revert

Lines of code Vulnerability details Impact Several functions are sendusing is used by the across several functions to transfer ETH/WETH. send uses a fixed amount of gas, which was used to prevent reentrancy. However this limit your protocol to interact with others contracts that need more than th...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•20 views

Owner can rug PrePOMarket using re-initialized finalLongPayout.

Lines of code Vulnerability details Description In PrePOMarket.sol, the finalLongPayout represents the finalized value of a single long token in the market. It is settled post ICO / IPO according to predetermined rules. The issue is that this value may be re-initialized as many times as owner...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•13 views

WithdrawHook doesn't check that userWithdrawLimitPerPeriod is less than globalWithdrawLimitPerPeriod

Lines of code Vulnerability details Impact WithdrawHook doesn't check that userWithdrawLimitPerPeriod is less than globalWithdrawLimitPerPeriod. It allows to user withdraw more then globalWithdrawLimitPerPeriod per period. Proof of Concept Function WithdrawHook.hook should not allow to withdraw...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•21 views

TWA Price should be updated in addLiquidity, removeLiqudity and swap and migrateBinsUpStack and transferLiquidity

Lines of code Vulnerability details Impact TWA Price should be updated in addLiquidity, removeLiqudity and swap and transferLiquidity Proof of Concept I want to quote from the documentation: In Maverick, the AMM smart contract tracks the time-weighted average price TWAP with a configurable lookba...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•12 views

WithdrawHook.hook doesn't validate amount when lastUserPeriodReset + userPeriodLength < block.timestamp

Lines of code Vulnerability details Impact WithdrawHook.hook doesn't validate amount when lastUserPeriodReset + userPeriodLength block.timestamp. As result user can withdraw more than he is allowed. Proof of Concept Function WithdrawHook.hook should not allow users to withdraw more than is allowe...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•18 views

In WithdrawHook.hook(), withdraw limits can be bypassed.

Lines of code Vulnerability details Impact In WithdrawHook.hook, withdraw limits can be bypassed. As a result, users might withdraw more amount of the base token at a time than they should. Proof of Concept WithdrawHook.hook checks the withdraw limits like below. if lastGlobalPeriodReset +...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•24 views

Wrong variable is used for the first parameter of depositHook.hook()

Lines of code Vulnerability details Impact Recipient is treated wrongly as sender. Proof of Concept As written here See DepositHook.solL43-L52, the first accepted parameter should be the sender. However, recipient See Collateral.solL53 is passed in here. Tools Used Manual Recommended Mitigation...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•14 views

Deposit record does not update properly for withdrawals

Lines of code Vulnerability details Impact A side effect of calling deposit in the Collateral contract is that the userToDeposits map in the DepositRecord contract is updated. However, when the user withdraws funds, this userToDeposits map is not updated to reflect their total deposited amount. T...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•21 views

Pool with any fee tier can be created

Lines of code Vulnerability details Impact Pool with any fee tier can be created Proof of Concept There is a section in this medium: In Fee Structure: Maverick AMM supports initializing pools with arbitrary fee rates, but it is expected that LPs will choose from one of the following ā€œstandardā€ fe...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•14 views

Mint might result in too few tokens minted

Lines of code Vulnerability details mint of PrePOMarket.sol allows the team to mint new short and long tokens in exchange for collateral tokens. Long and short tokens are default ERC20 tokens with 18 decimals, while the collateral ERC20 token uses the decimals of the underlying base token. Howeve...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•20 views

Liquidity cannot be removed by an approved address via Router

Lines of code Vulnerability details Impact Using the Router, liquidity can only be removed by the owner of an NFT, which significantly limits liquidity management. The Pool contract, however, does allow approved addresses to remove liquidity. Proof of Concept The Router contract is a higher level...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•23 views

depositAndTrade function is incomplete & does not use returnValue of UniswapV3 router

Lines of code Vulnerability details Impact depositAndTrade function seems to be incomplete - the tokenOutput from swapRouter is currently owned by DepositTradeHelper account and needs to be transferred back to msg.sender who initiated this transaction. Since this contract doesn't seem to be part ...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•13 views

Lack of access control in AllowedMsgSenders contract.

Lines of code Vulnerability details Impact setAllowedMsgSenders lacks access control. This enables anyone to set themselves as an allowed message sender and call the send in tokenSender.sol to transfer out any amount bypassing all the checks imposed in the hooks. Proof of Concept...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•15 views

Pool prices can be greatly skewed and exploited

Lines of code Vulnerability details Impact Token prices in the pool can be manipulated and set to values with great deviation from its originally intended ratio right after the pool has been created. With all key parameters already initialized at the constructor, liquidity in the pool is deemed...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•16 views

Lack of access control for sweepToken, refundETH, unwrapWETH9 in Router.sol

Lines of code Vulnerability details Impact Lack of access control for sweepToken, refundETH, unwrapWETH9 in Router.sol, any WETH token, ETH and ERC20 sent to Router.sol is lost and claimable to anyone. Proof of Concept the function unwrapWETH9 and sweepToken and refundETH has no access control an...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•21 views

Pool.sol : Lack of slippage protection for swap

Lines of code Vulnerability details Impact Due to lack of slippage protection, user may suffer and incur loss of func in adverse condition. Proof of Concept Swap function is used to swap one toke for another token. While the swap function has check to ensure for exactOutput, but it does not have...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•16 views

function mint() in PrePOMarket shouldn't accept deposits after expiryTime of Market

Lines of code Vulnerability details Impact Function mint Mints Long and Short tokens in exchange for amount collateral and according to the comment in the IPrePOMarket: "Minting is not allowed after the market has ended." but there is no check or restriction in the code that to make sure minting ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•31 views

Infinite approval given to DepositTradeHelper contract can be misused by malicious actors

Lines of code Vulnerability details Impact depositAndTrade function in DepositTradeHelper account has infinite approval to spend baseTokens & collateralTokens of user using offChain signatures. However, once swapRouter executes UniV3 swap transaction on line 33, the contract does not give up its...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•12 views

Pool: The EMERGENCY state cannot be recovered

Lines of code Vulnerability details Impact The owner can call Pool.adminAction to set the Pool contract state to EMERGENCY, and in the EMERGENCY state, no liquidity can be added or transferred, and no swaps can be made. However, the Pool contract does not have a function to recover the EMERGENCY...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•21 views

Re-entrancy issue when executing safeTransfer in sweepToken function

Lines of code Vulnerability details Impact In the sweepToken function, we don't have a re-Entrancy check which will introduce the token lost by calling sweepToken multiple times during one request. Proof of Concept We don't have any check for the token and the token itself may call back into the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•13 views

Upgraded Q -> M from #268 [1670783513081]

Judge has assessed an item in Issue 268 as M risk. The relevant finding follows: Use of selfdestruct in FixedPrice.sol and OpenEdition.sol --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•23 views

Upgraded Q -> M from #81 [1670783437328]

Judge has assessed an item in Issue 81 as M risk. The relevant finding follows: After carefully reading all submissions related to the use of selfdestruct, I will change my stance on this kind of issue. Changing the severity back to Medium. --- The text was updated successfully, but these errors...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•15 views

Upgraded Q -> M from #34 [1670783427149]

Judge has assessed an item in Issue 34 as M risk. The relevant finding follows: Selfdestruct is prone to being changed in a future hard fork --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/11 12:00 a.m.•13 views

Upgraded Q -> M from #506 [1670783534926]

Judge has assessed an item in Issue 506 as M risk. The relevant finding follows: selfDestruct will probably be deactivated soon --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/10 12:00 a.m.•17 views

Value can be extracted from LPs

Lines of code Vulnerability details Impact Maverick allow liquidity to be moved based on TWAP to increase capital efficiency. However, the increased capital efficiency is not free. Consider a "right" move, the LP sell at lower price and move their liquidity to higher price, thus buying at higher...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•20 views

wrong configuration can lock eth in LPDA contract forever

Lines of code Vulnerability details When creating an LPDA auction there are some sanity checks of the values used for the auction. But there is no check that the auction will not cause the price calculation to underflow after a while. This calculation of the price can underflow in getPrice in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•18 views

Users can lose funds if they call buy with _amount larger than type(uint48).max.

Lines of code Vulnerability details Impact The function buy take amount of type uint256 as input. amount is used to check if msg.value is correct depending on the sale price as follows: requireamount sale.price == msg.value, "WRONG PRICE"; but is not casted to uint48 as done to calculate the newI...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•15 views

LPDA price is not calculated correctly such that it won't end at the final price as expected

Lines of code Vulnerability details Impact LPDA price is not calculated correctly such that it won't end at the final price as expected Proof of Concept function getPrice public view returns uint256 Sale memory temp = sale; uint256 start, uint256 end = temp.startTime, temp.endTime; if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•18 views

User can pass auction recovery health check easily with flashloan

Lines of code Vulnerability details Description ParaSpace features an auction mechanism to liquidate user's NFT holdings and receive fair value. User has the option, before liquidation actually happens but after auction started, to top up their account to above recovery factor 1.5 instead of 1 an...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•38 views

Funds reserved for refunding users can be steal in LPDA sale

Lines of code Vulnerability details Impact LPDA sale works like a Dutch Auction, where early buyers will get refund after the sale ended. In addition, in buy function, when last NFT is saled, it is automatically ending the LPDA sale and send payments to sale receiver, fee to fee receiver. And the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•27 views

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

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•19 views

There isn't an end time on FixedPrice and LPDA sales, and the sale can't be canceled after the sale start.

Lines of code Vulnerability details Impact The sale can't be canceled after the sale start. Moreover, the sale won't end, which contradict the fact that typical NFT sales nowadays have an end time. Even your OpenEdition have an end time. Proof of Concept struct Sale // slot 1 uint48 currentId;...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•14 views

overflow in buy function

Lines of code Vulnerability details Impact the function doesn't check if the input is more the supply Proof of Concept the function doesn't have any condition check of amount Tools Used manually Recommended Mitigation Steps check the input for maximum or requirement for max supply --- The text wa...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•21 views

Attacker can drain pool using executeBuyWithCredit with malicious marketplace payload.

Lines of code Vulnerability details Description Paraspace supports leveraged purchases of NFTs through PoolMarketplace entry points. User calls buyWithCredit with marketplace, calldata to be sent to marketplace, and how many tokens to borrow. function buyWithCredit bytes32 marketplaceId, bytes...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•16 views

Bad debt will likely incur when multiple NFTs are liquidated.

Lines of code Vulnerability details Description getUserBalanceForERC721 in GenericLogic gets the value of a user's specific ERC721 xToken. It is later used for determining the account's health factor. In case isAtomicPrice is false such as in ape NTokens, price is calculated using: uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•13 views

Possible malicious _uri in initialize() of Escher721.sol

Lines of code Vulnerability details Impact Loss of user funds if user approves malicious transaction Description Trace: createContract of Escher721.Factory.sol calls initialize of Escher721.sol The initialize function sets tokenUriDelegate to the passed in uri address. There's no input validation...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•12 views

In Escher721Factory.createContract any address can be provided as _uri for cloning

Lines of code Vulnerability details Impact The Escher721Factory.createContract function accepts any address as the uri parameter. This parameter is used to clone the uri contract, the address of the new clone is then passed to the Escher721.initialize function. The contract should verify the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•15 views

Denial of Service on the LPDA.sol contract due to incorrect validation of parameters.

Lines of code Vulnerability details Impact The impact is that the contract will be on Denial Of Service, not allowing anyone to get ether out, neither the creator or people via refund. Proof of Concept The functions buyuint256 amount and refund of the LPDA.sol contract both call the function...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/09 12:00 a.m.•16 views

Rewards are not accounted for properly in NTokenApeStaking contracts, limiting user's collateral.

Lines of code Vulnerability details Description ApeStakingLogic.sol implements the logic for staking ape coins through the NTokenApeStaking NFT. getTokenIdStakingAmount is an important function which returns the entire stake amount mapping for a specific BAYC / MAYC NFT. function...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190