Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/03/21 12:0 a.m.•12 views

Chainlink pricer is using a deprecated API

Lines of code Vulnerability details Impact According to Chainlink's documentation, the latestAnswer function is deprecated. This function might suddenly stop working if Chainlink stop supporting deprecated APIs. And the old API can return stale data. Proof of Concept Tools Used None Recommended...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/21 12:0 a.m.•7 views

COLLATERAL_MINTER_ROLE can be granted by the deployer of QuantConfig and mint arbitrary amount of tokens

Lines of code Vulnerability details Impact function mintCollateralToken address recipient, uint256 collateralTokenId, uint256 amount external override require quantConfig.hasRole quantConfig.quantRoles"COLLATERALMINTERROLE", msg.sender , "CollateralToken: Only a collateral minter can mint...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/20 12:0 a.m.•43 views

Using deprecated Chainlink function latestAnswer

Lines of code Vulnerability details Proof of Concept According to Chainlink's documentation, the latestAnswer function is deprecated. This function does not error if no answer has been reached but returns 0. Besides, the latestAnswer is reported with 18 decimals for crypto quotes but 8 decimals f...

6.8AI 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.•11 views

[WP-M10] Wrong formula of getSharesForAmount() can potentially cause fund loss when being used to calculate the shares to be used in withdraw()

Lines of code Vulnerability details In Collateral, the getter functions getAmountForShares and getSharesForAmount is using totalAssets instead of strategyController.totalValue, making the results can be different than the actual shares amount needed to withdraw a certain amount of baseToken and t...

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

SingleStrategyController doesn't verify that new strategy uses the same base token

Lines of code Vulnerability details Impact When migrating from one strategy to another, the controller pulls out the funds of the old strategy and deposits them into the new one. But, it doesn't verify that both strategies use the same base token. If the new one uses a different base token, it...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/19 12:0 a.m.•11 views

Can steal collateral deposit

Lines of code Vulnerability details Impact The Collateral.deposit function mints initial shares equal to the deposited amount. The deposit / withdraw functions also use the strategyController.totalValue, which includes the strategy contract balance, to compute the shares. It's possible to increas...

6.6AI 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.•9 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/19 12:0 a.m.•11 views

getSharesForAmount returns wrong value when totalAssets == 0

Lines of code Vulnerability details Impact The getSharesForAmount function returns 0 if totalAssets == 0. However, if totalSupply == 0, the actual shares that are minted in a deposit are amount even if totalAssets == 0. Contracts / frontends that use this function to estimate their deposit when...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/19 12:0 a.m.•11 views

Market Expiration is Not Enforced Onchain

Lines of code Vulnerability details Impact The expiryTime variable is stored in the PrePOMarket.sol contract but not enforced anywhere in the contract. As a result, if a public offering never comes to fruition, then finalLongPrice will never be set and hence users will be expected to redeem...

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

[WP-H3] A malicious early user/attacker can manipulate the Collateral contract's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details function deposituint256 amount external override nonReentrant returns uint256 ... uint256 shares = 0; if totalSupply == 0 shares = amountToDeposit; else / of shares owed = amount deposited / cost per share, cost per share = total supply / total value. / shares ...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/19 12:0 a.m.•8 views

Withdrawal Requests Can Be Bypassed

Lines of code Vulnerability details Impact Withdrawals can be initiated by accounts by calling the initiateWithdrawal function. A block delay is enforced with an expiration to prevent flash loan attacks on the protocol. However, because withdrawal requests are conducted on the account's token...

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

Withdrawal delay can be circumvented

Lines of code Vulnerability details Impact After initiating a withdrawal with initiateWithdrawal, it's still possible to transfer the collateral tokens. This can be used to create a second account, transfer the accounts to them and initiate withdrawals at a different time frame such that one of t...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/19 12:0 a.m.•14 views

Block delays can be bypassed with two flash loans instead of one

Lines of code Vulnerability details The README.md states: Withdrawals must be requested in a prior block via initiateWithdrawaluint256 amount . The number of blocks until a request expires is settable by the vault owner . This is mainly for mitigating the feasibility of a flash loan attack. Impac...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/18 12:0 a.m.•7 views

First depositor can break minting of shares

Lines of code Vulnerability details Details The attack vector and impact is the same as TOB-YEARN-003, where users may not receive shares in exchange for their deposits if the total asset amount has been manipulated through a large ā€œdonationā€. Proof of Concept Attacker deposits 2 wei so that it i...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/18 12:0 a.m.•9 views

Malicious User can Manipulate 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.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/18 12:0 a.m.•11 views

Strategy Migration May Leave Tokens in the Old Strategy Impacting Share Calculations

Lines of code Vulnerability details Impact If a strategy does not have sufficient funds to withdraw for the full amount then it is possible that tokens will be left in this yield contract during migrate. It is common for withdrawal from a strategy to withdraw less than a user's balance. The reaso...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/18 12:0 a.m.•11 views

Market expiry behaviour differs in implementation and documentation

Lines of code Vulnerability details Description The docs say that ā€œIf a market has not settled by its expiry date, it will automatically settle at the lower bound of its Valuation Range.ā€ However, in the implementation, the expiry date is entirely ignored. The default settlement after expiry is a...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/18 12:0 a.m.•4 views

DoS attack the system and steal all the users' funds

Lines of code Vulnerability details Impact That exploit is possible because of the implementation of the deposit function of the SingleStrategyController contract. // Assumes approval to take amount has already been given by vault function deposituint256 amount external override onlyVault...

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

No use of upgradeable SafeERC20 contract in Controller.sol

Lines of code Vulnerability details Impact Controller.sol makes use of Open Zeppelins ReentrancyGuardUpgradeable.sol in the file but does not use an upgradeable version of SafeERC20.sol Proof of Concept Tools Used Manual code review Recommended Mitigation Steps Make use of Open Zeppelins...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/17 12:0 a.m.•15 views

Duplicate _tokenNameSuffix and _tokenSymbolSuffix will incorrectly update current Market

Lines of code Vulnerability details Impacted Function: createMarket Description: 1. Owner calls createMarket with tokenNameSuffix S1 and tokenSymbolSuffix S2 which creates a new market M1 with deployedMarketssalt pointing to M1. Here salt can be S which is computed using tokenNameSuffix and...

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

No use of upgradeable safeERC20 contracts in Controller.sol

Lines of code Vulnerability details Impact Controller.sol makes use of Open Zeppelins ReentrancyGuardUpgradeable.sol in the file but does not use an upgradeable version of SafeERC20.sol Proof of Concept Tools Used Manual code review Recommended Mitigation Steps Make use of Open Zeppelins...

7.1AI 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
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•9 views

Possible frontrun on deposits on LiquidityPool

Lines of code Vulnerability details Impact Rewards are given to a user for depositing either ERC20 tokens or their native token into the LiquidityPool. This reward is used to incentivize users to deposit funds into the liquidity pool when the pool is not in an equilibrium state. For regular users...

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

[WP-H14] LiquidityProviders.sol The share price of the LP can be manipulated and making future liquidityProviders unable to removeLiquidity()

Lines of code Vulnerability details function removeLiquidityuint256 nftId, uint256 amount external nonReentrant onlyValidLpTokennftId, msgSender whenNotPaused address tokenAddress, uint256 nftSuppliedLiquidity, uint256 totalNFTShares = lpToken.tokenMetadatanftId;...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•9 views

An owner can rug pull and or lock users' funds

Lines of code Vulnerability details Impact By implementing malicious versions of the interfaces required by the contracts used in the set functions, an owner can rug pull user positions. Even if the owner is benevolent the fact that there is a rug vector available may negatively impact the...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•10 views

A supported token can be unsupported and liquidity provider won't be able to withdraw their funds

Lines of code Vulnerability details Impact Liquidity provider will be unable to withdraw tokens that were previously supported Proof of Concept In liquidityProviders.sol users can provide liquidity only in supported tokens. This is checked when the user provides liquidity and checked again when h...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•10 views

FUNCTION SETBASEGAS LACKS BOUNDS CHECK AND EVENT EMIT AFFECTS TRANSFER

Lines of code Vulnerability details Impact Executors can, unintentionally, send a huge amount of ETH Proof of Concept The function setBaseGasuint128 gasLiquidityPool.sol should have bounds like MAXBASEGAS. Even worse this function lacks of event emit. As a result, executors can call sendFundsToUs...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•8 views

LiquidityPool:getAmountToTransfer() has incorrect calculation due to incorrect bracket placement

Lines of code Vulnerability details Impact In the scenario where the transfer fee exceeds the equilibrium fee, the excess gets credited to the incentive pool. The incentive pool fee added is incentivePooltokenAddress = incentivePooltokenAddress + amount transferFeePerc -...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•11 views

[WP-H17] Users will lose a majority or even all of the rewards when the amount of total shares is too large, due to precision loss

Lines of code Vulnerability details function getUpdatedAccTokenPerShareaddress baseToken public view returns uint256 uint256 accumulator = 0; uint256 lastUpdatedTime = poolInfobaseToken.lastRewardTime; uint256 counter = block.timestamp; uint256 i = rewardRateLogbaseToken.length - 1; while true if...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•8 views

sendFundsToUser() does not verify that the user has deposited anything

Lines of code Vulnerability details Impact Users can request arbitrary amounts when requesting funds from the executor, because the deposit hash is not checked against actual deposits. The user can be the executor him/herself if they wish to rug-pull directly. Proof of Concept function...

7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•9 views

Frontrunning of setPerTokenWalletCap edge case

Lines of code Vulnerability details Impact The setPerTokenWalletCap function in WhitelistPeriodManager.sol contains a comment stating: Special care must be taken when calling this function There are no checks for perTokenWalletCap since it's onlyOwner, but it's essential that it should be = max l...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•9 views

Sending tokens close to the maximum will fail and user will lose tokens

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept When a user calls the deposit function the reward amount is calculated and an event is emited with amount+reward as the transfer amount. The function checks amount is smaller than the m...

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

[WP-H8] Wrong formula for the fee to be added to the incentivePool

Lines of code Vulnerability details The protocol takes part of the fees to incentivize liquidity, which is recorded as incentivePooltokenAddress on LiquidityPool.sol. However, the formula used to calculate the updated amount of incentivePooltokenAddress in the current implementation is wrong...

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

Reward and base token decimals difference isn't accounted for in LiquidityFarming

Lines of code Vulnerability details Impact Reward and base token decimals can differ, while this difference isn't accounted for in the reward amount calculations, which will lead to either missing rewards or sending the whole rewards balance to the first eligible user. For example: If reward is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•8 views

LiquidityFarming.withdraw permanently freezes any unpaidRewards left

Lines of code Vulnerability details Impact Remainder nft.unpaidRewards are lost and cannot be retrieved after LiquidityFarming.withdraw. I.e. it is not possible to extractRewards for unpaidRewards later if withdraw being called when balance wasn't sufficient to fulfil the full withdraw of the...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•8 views

Reward calculations can be rendered to zero due to the lack of precision

Lines of code Vulnerability details Impact On a combination of high enough token value and low enough decimals there can be not enough precision to store reward amount, which can be permanently hid from a user as a result. I.e. on such a combination there will effectively be no rewards for some...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•10 views

Executors can steal funds meant to be sent to users

Lines of code Vulnerability details Impact The executor can provide any value it wants as the tokenGasPrice when it calls sendFundsToUser since it is not included in the hash checks. The executor can set the value to be exactly the number that will take all of the funds the user is requesting...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•9 views

Renouncepauser function is dangerous

Lines of code Vulnerability details Impact If pauser makes an error all the protocol will be unusable Proof of Concept The funtion renouncePauserPausable.sol which affect several contracts is dangerous. function renouncePauser external virtual onlyPauser emit PauserChangedpauser, address0; pauser...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/16 12:0 a.m.•6 views

[WP-H4] Deleting nft Info can cause users' nft.unpaidRewards to be permanently erased

Lines of code Vulnerability details function withdrawuint256 nftId, address payable to external whenNotPaused nonReentrant address msgSender = msgSender; uint256 nftsStakedLength = nftIdsStakedmsgSender.length; uint256 index; for index = 0; index...

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

Fee-on-transfer/deflationary tokens cause problems

Lines of code Vulnerability details Some ERC20 tokens, such as USDT, allow for charging a fee any time transfer or transferFrom is called. If a contract does not allow for amounts to change after transfers, subsequent transfer operations based on the original amount will revert due to the contrac...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/15 12:0 a.m.•8 views

Can deposit native token for free and steal funds

Lines of code Vulnerability details Impact The depositErc20 function allows setting tokenAddress = NATIVE and does not throw an error. No matter the amount chosen, the SafeERC20Upgradeable.safeTransferFromIERC20UpgradeabletokenAddress, sender, addressthis, amount; call will not revert because it...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/15 12:0 a.m.•9 views

incentivePool increase is broken

Lines of code Vulnerability details Impact When updating the incentivePool it divides the previous value by BASEDIVISOR. On each update, the incentivePool basically resets itself to only the increment and loses the previous incentive pool. // @audit divides entire previous incentivePool by...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2022/03/13 12:0 a.m.•9 views

Wrong formula when add fee incentivePool can lead to loss of funds.

Lines of code Vulnerability details Impact The getAmountToTransfer function of LiquidityPool updates incentivePooltokenAddress by adding some fee to it but the formula is wrong and the value of incentivePooltokenAddress will be divided by BASEDIVISOR 10000000000 each time. After just a few time,...

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

DDOS - csanuragjain

Duplicate of 119 --- The text was updated successfully, but these errors were encountered: All reactions...

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

Oracle - csanuragjain

Duplicate of 46 --- The text was updated successfully, but these errors were encountered: All reactions...

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

DDOS - throttle

Contained in report. Duplicate of 119 --- The text was updated successfully, but these errors were encountered: All reactions...

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

Too many amms - omik

Duplicate of 97 --- The text was updated successfully, but these errors were encountered: All reactions...

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

CL - throttle

Duplicate of 46 --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Total number of security vulnerabilities10190