Lucene search
K
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2022/04/27 12:0 a.m.10 views

Swapper3Crv's swapping path can be suboptimal

Lines of code Vulnerability details Impact Swapper3Crv.swap result can be suboptimal as only paths with ETH are evaluated. Setting severity to medium as despite function availability not affected there can be some fund losses as a result. Proof of Concept tokenAmountOut uses fixed tokenIn, ETH,...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/27 12:0 a.m.10 views

BufferStored could be larger than BufferCap after _setBufferCap()

Judge @jack-the-pug has assessed the second item in QA Report 64 as Medium risk. The relevant finding follows: Impact In RateLimited.sol BufferCap should be the upper bound of BufferStored, However in setBufferCap it calls updateBufferStored before replacing the old BufferCap. If old BufferCap is...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/21 12:0 a.m.10 views

Should implement a periphery contract for user to mint indexToken

Lines of code Vulnerability details Impact User can lose their fund Proof of Concept When users want to mint an index token, users need to transfer their assets to addressvToken first, then call the mint function of IndexLogic.sol. If users make it into 2 transactions, miner can manipulate it/...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/21 12:0 a.m.10 views

Unchecked parameters in Chainlink latestRounddata() could lead to retrieve stale data

Lines of code Vulnerability details Impact Oracle can retrieve unchecked stale data Proof of Concept In ChainlinkpriceOracle.sol the function function refreshedAssetPerBaseInUQaddress asset public override returns uint AssetInfo storage assetInfo = assetInfoOfasset; , int basePrice, , , =...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/04/21 12:0 a.m.10 views

Potentially Incomplete or Stale Data from Oracle

Lines of code Vulnerability details Impact Calls to the Chainlink price oracle via refreshedAssetPerBaseInUQ in ChainlinkPriceOracle.sol use the correct function latestRoundData per Chainlink's documentation, but lacks the recommended validations to ensure that the round is complete and does not...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/20 12:0 a.m.10 views

The name of the function to setup a vesting in the interface IVesting.sol doesn’t match with the name of the function to setup a vesting in StakeCitadelVester.sol.

Lines of code Vulnerability details Impact Users will not be able to withdraw their funds . Proof of Concept When a user wants to withdraw his tokens from StakedCitadel.sol, vesting is supposed to be set and tokens are sent to the vesting contract where they are vested linearly for 21 days. This ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/20 12:0 a.m.10 views

withdrawal amount might be wrong

Lines of code Vulnerability details r is the user's part of the contract balance, but is supposed to be the user's part of the total funds, including the strategy funds. therefore the check at line 816 will always return false because the user's part of the contract balance is smaller than the...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/20 12:0 a.m.10 views

DoS at CitadelMinter.sol

Lines of code Vulnerability details Impact At CitadelMinter.sol, Funding Pool Weight can't be set at the beginning since totalFundingPoolWeight value is not assigned and Zero meanwhile being cached to newTotalWeight. Hence the substraction will not perform as it will yield to a negative value whi...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/20 12:0 a.m.10 views

TokenInLimit can be set higher than what the contract has to sell

Lines of code Vulnerability details Impact If totalTokenOutBought tokenOut.balanceOfaddressthis all tokens will be unclaimable and all funds would be lost. Proof of Concept TokenInLimit can be set arbitrarily high even if the contract doesn't have enough tokens to sell. Then users can buy more...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/19 12:0 a.m.10 views

TECH_OPERATIONS_ROLE is not initialized properly

Lines of code Vulnerability details Impact setGuestlist and setTokenInLimit are unavailable for use during KnightingRound to use due to a mistake in initializing roles. Proof of Concept The role TECHOPERATIONSROLE, created in L30 of GlobalAccessControl.sol , is not initialized in the initialize t...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

[WP-H22] Bad debts should not continue to accrue interest

Lines of code Vulnerability details uint256 debtAmount = getDebtAmountnftIndex; require debtAmount = getLiquidationLimitnftIndex, "positionnotliquidatable" ; // burn all payment stablecoin.burnFrommsg.sender, debtAmount; In the current design/implementation, the liquidator must fully repay the...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

Usage of deprecated Chainlink functions

Lines of code Vulnerability details Impact The Chainlink function latestAnswer is deprecated. Instead, use latestRoundData. As seen in the changelog, Chainlink encourages people to use the latestRoundData function. It's not clear when the support for deprecated functions ends. Here's the same iss...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

Update initializer modifier to prevent reentrancy during initialization

Lines of code Vulnerability details Impact The solution uses: "@openzeppelin/contracts": "^4.0.0", "@openzeppelin/contracts-upgradeable": "^4.3.2", These dependencies have a known high severity vulnerability: Which makes these contracts vulnerable: contracts/helpers/CryptoPunksHelper.sol: 19:...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

Use of deprecated Chainlink API

Lines of code Vulnerability details Impact The contract uses Chainlink’s deprecated API latestAnswer. Such functions might suddenly stop working if Chainlink stopped supporting deprecated APIs. Impact: Deprecated API stops working. Prices cannot be obtained. Protocol stops and contracts have to b...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

Uncontrolled usage of Chainlink API for core price retrieval

Lines of code Vulnerability details Impact Chainlink's latestAnswer usage can yield stale price information, which is crucial for borrowing and liquidation. latestAnswer is having less ways to be controlled compared to latestRoundData, which is advised for price sensitive operations. Staling pric...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/04/13 12:0 a.m.10 views

setDebtInterestApr() doesn't accrue interest before changing it

Lines of code Vulnerability details Impact Wrong interest can be charged if interest is changed without calling accrue Proof of Concept The function setDebtInterestApr updates the interest charged on debt without calling accrue before to compute previous interests. If someone takes debt at 2% and...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/12 12:0 a.m.10 views

Can steal yVault deposits due to bad initial shares calculation

Lines of code Vulnerability details Impact The yVault.deposit function mints initial shares equal to the deposited amount. The deposit / withdraw functions also use the balance, which includes the contract balance token.balanceOfaddressthis, to compute the shares. It's possible to increase the...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/12 12:0 a.m.10 views

Controller: Strategy migration will fail

Lines of code Vulnerability details Details The controller calls the withdraw method to withdraw JPEGs from the contract, but the strategy might blacklist the JPEG asset, which is what the PUSDConvex strategy has done. The migration would therefore revert. Proof of Concept Insert this test into...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/11 12:0 a.m.10 views

Tokens will be forever burned if contract call never success. Moreover, it may not retriable after OLD_KEY_RETENTION + 1 epochs has passed.

Lines of code Vulnerability details Impact Tokens will be forever burned if contract call never success. Moreover, it may not retriable after OLDKEYRETENTION + 1 epochs has passed. Just setting commandExecuted flag to false is not sufficient. As contract call never success, it will never got...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/07 12:0 a.m.10 views

When an attacker lends to a loan, the attacker can trigger DoS that any lenders can not buyout it

Lines of code Vulnerability details Impact If an attacker lender lends to a loan, the attacker can always revert transactions when any lenders try to buyout, making anyone can not buyout the loan of the attacker. Proof of Concept 1. A victim calls lend, trying to buyout the loan of the attacker. ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/06 12:0 a.m.10 views

NonCustodialPSM.mint ignores mint buffer reduced amount, mostly disabling mint rate control

Lines of code Vulnerability details Impact VOLT minting rate control doesn't happen when RateLimited's doPartialAction is true as NonCustodialPSM doesn't use the returned amount value, minting the full amount even when it was reduced by current mint buffer size limitation. There are two issues wi...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/06 12:0 a.m.10 views

Dangerous of one-step change of privileged roles

Lines of code Vulnerability details Impact Setting a new minter by old minter is happened in one step, and there is no way to correct it if old minter set a wrong address as new minter. Impact= high , likelihood= low -- Severity Risk = Medium owasp table Tools Used : manual analysis Recommended...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/06 12:0 a.m.10 views

Tokens with fee on transfer are not supported

Lines of code Vulnerability details There are ERC20 tokens that charge fee for every transfer / transferFrom. Vault.soladdValue assumes that the received amount is the same as the transfer amount, and uses it to calculate attributions, balance amounts, etc. But, the actual transferred amount can ...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/06 12:0 a.m.10 views

Inconsistent use of oracle

Lines of code Vulnerability details Impact Throughout the protocol, oracles are relied upon to keep Volt stable, calculate payouts to users, and judge whether actions are eligible to be carried out. On the NonCustodialPSM contract, oracle is updated with the updateOracle function. However, there ...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/06 12:0 a.m.10 views

Faulty logic at _setBufferCap() function

Lines of code Vulnerability details Impact setBufferCap function sets the bufferCap. It first calls the updateBufferStored function which updates the bufferStored variable. However, calculation of bufferStored depends on bufferCap value: Math.minbufferStored + rateLimitPerSecond elapsed, bufferCa...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/05 12:0 a.m.10 views

Chain ID Is Not Resistant To Hard Fork and Other Token Supports In The Oracle Contract

Lines of code Vulnerability details Impact During the code review, It has been observed only the following chain ids are supported for the chainlink. 1 and 42 - The contracts are not upgradeable therefore If there is any hard fork or new chain support, the contract should be deployed again with...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/04 12:0 a.m.10 views

Users Can Bypass Emergency Restrictions on updateUserRewardState()

Lines of code Vulnerability details Impact The emergencyWithdraw function intends to withdraw their tokens regardless if they are locked up for any duration. This emergency must be triggered by the owner of the contract by calling triggerEmergencyWithdraw. A number of functions will revert when t...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

Function getUserPastLock may return incorrect values

Lines of code Vulnerability details Impact userLocks array can contain elements with the same fromBlock properties, but different total locked amounts. This edge case is not considered in the implementation of getUserPastLock function, which returns a value as soon as it finds a UserLock with...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

UserLock information can be found during emergency mode

Lines of code Vulnerability details When the contract is in blocked state emergency mode, the protocol wants to return an empty UserLock info, on calling the function getUserLock. However, there is another way, by which the users can find the same information. The below function is not protected...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

admin can rug

Lines of code Vulnerability details In the function transferToken, the admin can steal all the money. --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

User withdrawal can be stuck

Lines of code Vulnerability details Impact Any transfer will lead to updation of cooldown period for the recipient. This can become a problem if recipient wished to withdraw some amount using unstake. Proof of Concept 1. User A wished to withdraw amount 100 2. User A is pending 1 more day where...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

Past state query results are susceptible to manipulation due to multiple states with same block number

Lines of code https://github.com/code-423n4/2022-0...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/04/02 12:0 a.m.10 views

Function cooldown() is not protected when protocol in emergency mode

Lines of code Vulnerability details Function cooldown is not protected when protocol is in emergency mode. Its behavior is not consistent with the other major functions defined. Impact While other major functions like stake, unstake, lock, unlock, etc., of this contract is protected by checking f...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/04/01 12:0 a.m.10 views

Duplicate NFTs Can Be Minted if payableToken Has a Callback Attached to it

Lines of code Vulnerability details Impact The mintToken function is called to mint unique tokens from an ERC721 collection. This function will either require users to provide a merkle proof to claim an airdropped token or pay a fee in the form of a payableToken. However, because the payableToken...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

LenderPool: Principal withdrawable is incorrectly calculated if start() is invoked with non-zero start fee

Lines of code Vulnerability details Details & Impact The principalWithdrawable calculated will be more than expected if start is invoked with a non-zero start fee, because the borrow limit is reduced by the fee, resulting in totalSupplyid not being 1:1 with the borrow limit. function...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

[WP-M10] Lack of access control allow anyone to withdrawInterest() for any lender

Lines of code Vulnerability details function withdrawInterestuint256 id, address lender external nonReentrant withdrawInterestid, lender; function withdrawInterestuint256 id, address lender internal address strategy = pooledCLConstantsid.borrowAssetStrategy; address borrowAsset =...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

Use safeTransfer

Lines of code Vulnerability details Impact The return value of the transfer is not checked. You already imported SafeERC20 into this contract, so you can use it to resolve this issue. Proof of Concept Tools Used manual code review Recommended Mitigation Steps IERC20borrowAsset.safeTransferto, fee...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

PooledCreditLine: termination likely fails because _principleWithdrawable is treated as shares

Lines of code Vulnerability details Details & Impact principalWithdrawable is denominated in the borrowAsset, but subsequently treats it as the share amount to be withdrawn. // notBorrowed = borrowAsset amount that isn't borrowed // totalSupplyid = ERC1155 total supply of id // borrowedTokens =...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

DoS: Attacker May Front-Run CoreFactory.createProject() With A _projectId Causing Future Transactions With The Same _projectId to Revert

Lines of code Vulnerability details Impact A projectId may only be used once in CoreFactory.createProject since the modifier onlyAvailableProject will revert if project.creator != 0. The result is an attacker may front-run any createProject transaction in the mem pool and create another...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/03/31 12:0 a.m.10 views

Fee in start() can be avoided

Lines of code Vulnerability details Impact A fee is collected in start that does not get collected if the borrowLimit is reached in lend. Proof of Concept if a start gets called and the amount - fee minBorrowAmount then a fee gets collected before accept is called. if maxLent is met in lend then...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/30 12:0 a.m.10 views

If contract holds balance of any ERC20 token, any user can take it

Lines of code Vulnerability details Impact If the LiFiDiamond contract ends up holding any ERC20 token, any user is able to perform a swap from the held asset to another asset, and the swap will use the contracts' funds as input instead of their own. The result is that a user can take all of the...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/30 12:0 a.m.10 views

onlyOwner modifier missing

Lines of code Vulnerability details Impact Function is missing onlyOwner modifier meaning any user could register without need to be an owner Proof of Concept registerSelf function is missing the onlyOwner modifier. Recommended Mitigation Steps Change definition to function registerSelf...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/30 12:0 a.m.10 views

admin can rug

Lines of code Vulnerability details admin can steal all user funds --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/30 12:0 a.m.10 views

Fixed Amount of Gas Sent in Call May Be Insufficient

Lines of code Vulnerability details Impact The function attemptETHTransfer makes a call with a fixed amount of gas, 30,000. If the receiver is a contract this may be insufficient to process the receive function. As a result the user would be unable to receive funds from this function. Proof of...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/24 12:0 a.m.10 views

Mint spread collateral-less and conjuring collateral claims out of thin air with implicit arithmetic rounding and flawed int to uint conversion

Lines of code Vulnerability details Impact This report presents 2 different incorrect behaviour that can affect the correctness of math calculations 1. Unattended Implicit rounding in QuantMath.sol div and mul 2. Inappropriate method of casting integer to unsigned integer in SignedConverter.sol...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/03/24 12:0 a.m.10 views

[WP-H2] EIP712MetaTransaction.executeMetaTransaction() failed txs are open to replay attacks

Lines of code Vulnerability details Any transactions that fail based on some conditions that may change in the future are not safe to be executed again later e.g. transactions that are based on others actions, or time-dependent etc. In the current implementation, once the low-level call is failed...

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

Option create can be denied

Lines of code Vulnerability details Proof of Concept A griefer can frontrun the createOption from a user and user's tx will revert. This line will revert because of this Recommended Mitigation Steps One gas efficient way to prevent this is to mix msg.sender into salt. --- The text was updated...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/19 12:0 a.m.10 views

Inflate collateral token and partial bypass minting fee by directly transferring to _strategyController

Lines of code Vulnerability details Impact This bug enables partial bypass of fee while minting Collateral tokens through Collateral.deposit. Attackers can also utilize this bug to inflate prices of Collateral tokens, creating "unfair advantages" for early minters of Collateral tokens. Proof of...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/19 12:0 a.m.10 views

First user can prevent later users receiving collateral shares

Lines of code Vulnerability details Impact All users after the first the attacker will receive no collateral shares in return for their deposit, losing their tokens. Proof of Concept On the first mint of Collateral tokens the amount to be minted is equal to the amount of tokens deposited, on late...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/03/17 12:0 a.m.10 views

Manipulating PreCT Mint Logic with Direct Base Token Transfer

Lines of code Vulnerability details Impact A bad actor can steal funds from future depositors by sending the base token directly to the Strategy or StrategyController contracts. This exploit is more effective the less shares that have already been distributed, perhaps early into the launch of the...

6.8AI score
Exploits0
Total number of security vulnerabilities5000