Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/12/12 12:0 a.m.16 views

Pool cannot recover from the emergency mode

Lines of code Vulnerability details Impact Pool cannot recover from the emergency mode. If the admin turn on the emergency mode, the user cannot swap or addLiqudity in the pool any more. Proof of Concept In the Pool Contract, the admin factory owner can set the status of the pool to ermergency:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.14 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:0 a.m.11 views

position's wrong profit and loss or incorrect distribution of funds in contract PrePoMarket because it doesn't consider expiryTime for setting the value of finalLongPayout and calculating redeem amounts based on positions and Markets never expire

Lines of code Vulnerability details Impact according to the docs: "The expiry date of the market. If a market has not settled by its expiry date, it will automatically settle at the lower bound of its Valuation Range." but Contract PrePOMarket doesn't consider expiryTime in its logic and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.6 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:0 a.m.11 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:0 a.m.22 views

Unsafe usage of ERC20 methods

Lines of code Vulnerability details There are many weird ERC20 tokens that don't follow the standard ERC20 interface. Depending on the ERC20 token, some transfer errors may result in passing unnoticed, or some successful transfers may be treated as failed. The current implementation assumes that...

7.3AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.11 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:0 a.m.12 views

PrePOMarket.sol : a sender who is not included in the account list can front run and mint prior to setting the _mintHook

Lines of code Vulnerability details Impact a sender who is not included in the account list can front run and mint prior to setting the mintHook. Proof of Concept The contract says, Minting will only be done by the team, and thus relies on the mintHook to enforce access controls. This is also why...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.13 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:0 a.m.11 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:0 a.m.15 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:0 a.m.18 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:0 a.m.19 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:0 a.m.14 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:0 a.m.11 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:0 a.m.9 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:0 a.m.10 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:0 a.m.10 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:0 a.m.16 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:0 a.m.17 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:0 a.m.9 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:0 a.m.13 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:0 a.m.11 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:0 a.m.15 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:0 a.m.22 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/12 12:0 a.m.12 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:0 a.m.12 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:0 a.m.23 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:0 a.m.19 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/11 12:0 a.m.8 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:0 a.m.8 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:0 a.m.19 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:0 a.m.8 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/11 12:0 a.m.14 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:0 a.m.10 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/10 12:0 a.m.15 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:0 a.m.8 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:0 a.m.10 views

Missing ReEntrancy Guard to executeAcceptBidWithCredit function

Lines of code Vulnerability details Impact if the mint was initiated by a contract, then the contract is checked for its ability to receive ERC721 tokens. Without reentrancy guard, onERC721Received will allow an attacker controlled contract to call the mint again, which may not be desirable to so...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.8 views

Use of payable.transfer() may lock user funds

Lines of code Vulnerability details Impact The use of payable.transfer is heavily frowned upon because it can lead to the locking of funds. The transfer call requires that the recipient has a payable callback, only provides 2300 gas for its operation. This means the following cases can cause the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.15 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:0 a.m.11 views

PoolAdmin can steal NFT from NTokens

Lines of code Vulnerability details Impact The executeAirdrop function allow pool admin to execute arbitrary call to arbitrary contract, including a transferFrom call to the underlying NFT contract. This can be used by the pool admin to steal NFT inside the NToken contracts. Since the rescueERC72...

7.5AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.13 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
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.10 views

Not possible to finish LPDA after endTime

Lines of code Vulnerability details Vulnerability details The only way to finish the sale is when newId == temp.finalId, making not possible to finish LPDA even if the endTime is already over POC There isn't any function to finalize the LPDA sale even if already finished the sale, the only way to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.8 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:0 a.m.10 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:0 a.m.9 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:0 a.m.8 views

MintableIncentivizedERC721 and NToken do not comply with ERC721, breaking composability

Lines of code Vulnerability details Description MintableIncentivizedERC721 implements supportsInterface as below: / @dev See IERC165-supportsInterface. / function supportsInterfacebytes4 interfaceId external view virtual overrideIERC165 returns bool return interfaceId ==...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.8 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:0 a.m.13 views

NFTs mintable after Auction deadline expires

Lines of code Vulnerability details Impact The buy function on the LPDA.sol contract is not validating if the auction is still running, allowing a purchase to be made after the stipulated time. The endtime variable used to store the end date of the auction is not used at any point to validate...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.8 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
Total number of security vulnerabilities10190