Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•22 views

Malicious user can create a dummy Lendgine contract by mimicing a salt with same encoding format but using a malicious AMM invariant function

Lines of code Vulnerability details Impact Lendgine contract address is created using a salt that is generated by a hash of pool parameters in Factory.sol. A malicious user can create a Lendgine exploit contract that uses the salt generated by exact same encoding but this contract inherits a Pair...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•22 views

Unsafe cast on uniswapV3SwapCallback can get all assets in the contract

Lines of code Vulnerability details Unsafe cast on uniswapV3SwapCallback can get all assets in the contract Summary Type cast with overflows doesn't throw an error / revert therefore, value can be transferred out just by calling the method. Contracts that inherit from SwapHelper:...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•22 views

Possible Reentrance & Unexpected Behaviour Vulnerabilities

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. No protection against reentrancy attacks, for example, the pay function called in the mintCallback function does not check for reentrancy before performing an external call. No checking of return values...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•22 views

Precision loss in the invariant function can lead to loss of funds

Lines of code Vulnerability details Impact An attacker can steal the funds without affecting the invariant. Proof of Concept We can say the function Pair.invariant is the heart of the protocol. All the malicious trades should be prevented by this function. Pair.sol 52: /// @inheritdoc IPair 53:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/29 12:00 a.m.•22 views

Attacker can steal the NFT bought by sending it to another vault he control

Lines of code Vulnerability details Impact The mitigation of H-08 try to validate the vault returned by market with the VaultRegistry. However, it only validated if the vault exists, but not if it is the correct vault. A similar attack described in code-423n4/2022-12-tessera-findings47 can be...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/27 12:00 a.m.•22 views

In TimeswapV2LiquidityToken.sol and TimeswapV2Token.sol, different positions might be minted to the same id.

Lines of code Vulnerability details Impact In this protocol, all positions should have unique ids to track and update their status. Currently, different positions might be minted to the same id and the main logic for the positions will be broken. Proof of Concept TimeswapV2LiquidityToken.mint set...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/27 12:00 a.m.•22 views

Malicious borrower can create pool imbalance by tricking the V2 pool to send lesser number of long tokens in exchange for short tokens

Lines of code Vulnerability details Impact Timeswap V2 Pool works on constant product AMM where total long tokens & short tokens follow the equation total long total short = L. Any increase in long tokens has to be accompanied with a proportionate drop in short tokens and viceversa to ensure that...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/26 12:00 a.m.•22 views

Upgraded Q -> M from #598 [1674741102558]

Judge has assessed an item in Issue 598 as M risk. The relevant finding follows: 2.minDepositAmount When the asset is btc, the minDepositAmount is too large when asset == btc , minDepositAmount = 0.1 btc , equal 2000 usd suggest: function minDepositAmount public view virtual overrideERC4626Cloned...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/26 12:00 a.m.•22 views

Upgraded Q -> M from #404 [1674736594739]

Judge has assessed an item in Issue 404 as M risk. The relevant finding follows: L‑04 latestAnswer is deprecated Use latestRoundData instead so that you can tell whether the answer is stale or not. The latestAnswer function returns zero if it is unable to fetch data, which may be the case if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/22 12:00 a.m.•22 views

Upgraded Q -> M from #113 [1674422768939]

Judge has assessed an item in Issue 113 as M risk. The relevant finding follows: During handling the open fees, the tigAsset is distributed to gov. But, it is not approved before to be consumed by gov. So, the first user's transaction to initiate a market order, will fail. During handling the clo...

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

User funds can be locked in RToken contract for a long time

Lines of code Vulnerability details Impact Unnecessary delay on the first issuance will lock the first issuer's deposit and other following deposits. Proof of Concept Users can issue new RTokens by depositing the necessary collaterals. The protocol is designed to limit issuance by some rate and t...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/19 12:00 a.m.•22 views

PublicVault Contract Allows Minting Tokens to a Null Address

Lines of code Vulnerability details Impact The PublicVault contract allows the minting of tokens to a null address. When the redeemFutureEpoch function is called with a null address as the receiver, the function will still proceed with the minting of the underlying asset, but the tokens will not...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/17 12:00 a.m.•22 views

Liquidation bots are needed to stabilize the system.

Lines of code Vulnerability details Impact Allowing liquidation bots to arbitrage would stabilize the system. The majority of liquidations are done by liquidation bots. For liquidation bots to be viable there has to exist a secondary market where the assets can be instantly sold. This is especial...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/16 12:00 a.m.•22 views

Signature Replay no nonce

Lines of code Vulnerability details Impact There is a signature replay vulnerability. That means that the signature can be reused in the same contract from anyone calling. The vulnerability relies in the fact that there is no nonce specified for every caller. This means that you can take a...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/03 12:00 a.m.•22 views

The owner minipool count is not decreased in the case of a staking error

Lines of code Vulnerability details Impact When a node operator creates a new pool or the recreateMinipool function is called the minipool count of the owner is increased by 1 and when the staking ends the multisig calls the recordStakingEnd function which will decrease the owner minipool count b...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/01/03 12:00 a.m.•22 views

PROTOCOL MIGHT NOT BE ABLE TO OPERATE DUE TO LACK OF FUNDS

Lines of code Vulnerability details Impact Redeem/withdraw functionality will fail under certain conditions and users who want to redeem/withdraw their AVAX will not be able to. Proof of Concept Users stake their AVAX and in return get ggAVAX. The AVAX provided by the users is then staked by the...

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

PaprController.sol: reservoir oracle price equal to 0 allows bypassing NFT liquidations

Lines of code Vulnerability details Impact When there is a reservoir oracle message with the price of the NFT equal to zero, the debt of a vault will be reset in the PaprController.purchaseLiquidationAuctionNFT function when a NFT is bought in an auction. So the borrower can now withdraw all othe...

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

Upgraded Q -> M from #22 [1671528533640]

Judge has assessed an item in Issue 22 as M risk. The relevant finding follows: NC-2 Return values of approve not checked --- The text was updated successfully, but these errors were encountered: All reactions...

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

sellQuote might lead to unexpected reverts when returning zero

Lines of code Vulnerability details Impact the implementation of sellQuote follows the logic of getAmountOut from Uniswap V2 Library. However it doesn't add +1 as the original implementation, this could make the function return zero and lead to reverts. Proof of Concept Tools Used Manual review...

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

Token decimals may be above 18 leading to underflow issues

Lines of code Vulnerability details Impact In both StableVault and Trading, there is an assumption that token decimal amounts are =18. However this can break if token decimals are 18, resulting in underflow which can lead to unpredictable behaviors, and extreme amounts during deposits and...

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

Use safeTransferFrom instead of transferFrom for ERC721 transfers

Lines of code Vulnerability details Impact In the contract VRFNFTRandomDraw.sol every transfer of ERC721 are done with the transferFrom instead of the recommended safeTransferFrom. This transferFrom does not check whether the receiver is capable of proper handling of NFTs. Proof of Concept If the...

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

Access control for hook function in RedeemHook Contract is inconsistent with the implementation.

Lines of code Vulnerability details Impact Access control for hook function in RedeemHook Contract is inconsistent with the implementation. Since the function involves a transfer of fees to Treasury, I've marked it as MEDIUM RISK RedeemHook checks if sender is in a list of pre-approved accounts i...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/12/12 12:00 a.m.•22 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.•22 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/11/28 12:00 a.m.•22 views

DoS on claiming rewards in PirexRewards is possible

Lines of code Vulnerability details Proof of Concept The claim method in PirexRewards iterates over the rewardTokens array for a producerToken. Now this array is completely managed by the contract’s owner who can call addRewardToken which pushes a new value in that array, as many times as he...

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

Rewards calculation does not consider GMX reward rate fluctuation

Lines of code Vulnerability details Impact The current time based px rewards calculation system is not accurate, and not fair for users. Due to GMX protocol reward rate fluctuation, px users stake and claim at different time could get less or more rewards they deserve. Some users could abuse the...

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

Add reward token existence check in order to avoid user reward lost.

Lines of code Vulnerability details Impact The user can lost his rewards if the reward token is removed from the producerTokensproducerToken.rewardTokens list. If the reward token is removed, the rewardToken length is going to be zero, the user rewards going to be zero and the for statement will...

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

ETH can get stuck (and possibly be stolen as well).

Lines of code Vulnerability details Impact The Turnstile contract contains a distributeFees function which can only be called by owner to assign and distribute fee for a tokenId. However the function does not validates the tokenId input value. So it is possible for the owner to provide any uint25...

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

Unsafe ERC20 operations due to lack of contract length check

Lines of code Vulnerability details Impact Functions executeERC20DirectTransfer and executeERC20TransferFrom replicates solmate libraries methods. The problem with this is that these functions does not check existence of code at the token address. If executeERC20DirectTransferand...

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

Native funds on the aggregator contract balance is a free grab

Lines of code Vulnerability details Native funds on the aggregator contract balance is a free grabLooksRareAggregator's execute returns the native balance of the contract to the caller even when nothing was provided with the call. This happens when LooksRareAggregator's execute is called directly...

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

Chainlink USD price feeds can have more than 8 decimals

Lines of code Vulnerability details Impact Collateral value is overestimated by orders of magnitude if asset that has a chainlink oracle USD price feed with more than 8 decimals is added. A borrower can borrow much more than allowed in an EscrowedLine Proof of Concept In Oracle.sol the USD price...

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

Owner can steal all the rewards token from the WardenPledge.sol smart contract and break the internal accounting

Lines of code Vulnerability details Impact The owner of the WardenPledge.sol smart contract can steal all the reward tokens from the contract and break the internal accounting. With the recoverERC20 function, the owner can transfer to him/herself the whole balance of the token. The check at L654...

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

Pledge creator can extend pledge without paying in edge cases.

Lines of code Vulnerability details Impact Pledge creator can extend pledge without paying in edge cases. Proof of Concept When pledge creators wants to extend their pledges, they must transfer an additional reward amount and fee: uint256 totalRewardAmount = pledgeParams.rewardPerVote...

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

Compromised or malicious owner of WardenPledge contract can steal pledge creator's deposited reward token amount

Lines of code Vulnerability details Impact There is no guarantee that the owner of the WardenPledge contract does not become compromised or malicious in the future. If this owner becomes compromised or malicious, after a pledge is created and the corresponding reward token amount is deposited, su...

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

Fees charged from entire theoretical pledge amount instead of actual pledge amount

Lines of code Vulnerability details Description Paladin receives a 5% cut from Boost purchases, as documented on the website "Warden takes a 5% fee on Boost purchases, and 5% on Quest incentives. However, there are various pricing tiers for Quest creators. Contact the Paladin team for more info."...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/25 12:00 a.m.•22 views

LayerZero Channel can be blocked by an attacker

Lines of code Vulnerability details Impact According to the LayerZero docs, the default behavior is that when a transaction on the destination application fails, the channel between the source and destination is blocked. Before any new transactions can be executed, the failed transaction has to b...

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

PA1D._payoutTokens() won't work for USDT and other inconsistent ERC20 tokens.

Lines of code Vulnerability details Impact Some ERC20 tokens USDT, BNB, OMG do not return a boolean on succesful transfer. Checking the returned value of transfer for these tokens will always fail. Proof of Concept Usage of ERC20 interface and require statement in PA1D.sol. Recommended Mitigation...

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

Reentrancy can increase allowance can be used to take more funds than expected

Lines of code Vulnerability details Reentrancy can increase allowance can be used to take more funds than expected In the same way as the typical front run of ERC20 approve/transferFrom, you would be able to take money when calling maliciousERC20.beforeApprove hook, this would realize a...

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

Upgraded Q -> H from 744 [1666621202565]

Judge has assessed an item in Issue 744 as High risk. The relevant finding follows: 1. writeCheckpoint will fail to insert an initial checkpoint Due to solidity 0.8 overflow/underflow protection, accessing checkpointstoTokenIdnCheckpoints - 1 will throw if nCheckpoints == 0. As it is not possible...

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

Wrong calculation in function LBRouter._getAmountsIn make user lose a lot of tokens when swap through JoePair (most of them will gifted to JoePair freely)

Lines of code Vulnerability details Vulnerable detail Function LBRouter.getAmountsIn is a helper function to return the amounts in with given amountOut. This function will check the pair of token and tokenNext is JoePair or LBPair using binStep. If binStep == 0, it will be a JoePair otherwise it...

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

Atomicity Literally NOT Guaranteed

Lines of code Vulnerability details Impact According to the Arbitrum documentation, "... Cross chain and cross shard interoperability is a hard problem, ... It's important to differentiate between calls from Ethereum to Arbitrum and calls from Arbitrum to Ethereum. Ethereum contracts can send...

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

No check transferFrom() return value

Lines of code Vulnerability details Impact The smart contract doesn’t check the return value of token.transferFrom, some erc20 token might not revert in case of error but return false. Proof of Concept as seen in several contests, for ex: Tools Used Visual inspection Recommended Mitigation Steps...

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

UNSAFE USAGE OF ERC20 TRANSFERFROM

Lines of code Vulnerability details Impact Ignores return value from L1GraphTokenGateway.finalizeInboundTransfer and L1GraphTokenGateway.outboundTransfer Not tracking values returned by token transfer from. finalizeInboundTransfer When escrow not approve for L1GraphTokenGateway or allowance is no...

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

Missing zero value check in AlgebraPool.initialize() would cause reverts preventing minting and swapping.

Lines of code Vulnerability details Impact The initialize function in AlgebraPool contract sets the globalState price and tick for the Algebra Pool. However, due to a missing check to ensure the price is not set to zero, a revert would occur always when calculating amounts for liquidity in...

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

Limited supply of VariableSupplyERC20Token can be bypassed to mint an infinite amount of tokens

Lines of code Vulnerability details Limited supply of VariableSupplyERC20Token can be bypassed to mint an infinite amount of tokens VariableSupplyERC20Token is defined as A ERC20 token contract that allows minting at will, with limited or unlimited supply. No burning possible In the case of a...

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

Overflow can make a claim impossible to revoke by the admin and fully withdraw by the recipient

Lines of code Vulnerability details Impact In contract VTVLVesting.sol, the multiplication in function baseVestedAmount can overflow for big enough values of truncatedCurrentVestingDurationSecs and linearVestAmount. This means the claim could be successfully created by the admin, but could NEVER ...

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

Employee can be unable to withdraw claimable amount that she or he deserves after admin revokes her or his claim

Lines of code Vulnerability details Impact When an employee has an active claim, this employee can call the following withdraw function to withdraw the claimable amount that she or he is entitled to, which would increase her or his claim's amountWithdrawn. Because the employee is free to call...

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

[NAZ-M3] Use safeTransferFrom() instead of transferFrom() for ERC721 transfers

Lines of code Vulnerability details Impact The transferFrom method is used instead of safeTransferFrom, presumably to save gas. I however argue that this isn’t recommended because: OpenZeppelin’s documentation discourages the use of transferFrom, use safeTransferFrom whenever possible. Given that...

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

DoS with (Unexpected) revert or Gas Limit DoS on a Contract via Unbounded Operations

Lines of code Vulnerability details Impact According to SWC-113, external calls can fail accidentally or deliberately, which can cause a DoS condition in the contract. To minimize the damage caused by such failures, it is better to isolate each external call into its own transaction that can be...

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

Potential DoS in _claim()

Lines of code Vulnerability details Impact An attacker could call claim in an infinite loop to conduct DoS attack. Proof of Concept Here is the implementation of claim: // User provides the the cToken & the amount they should get, and it is verified against the merkle root for that cToken ///...

6.9AI score
SaveExploits0
Total number of security vulnerabilities5000