Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’7 views

Uninitialized local variables

Lines of code Vulnerability details Impact Configuration -Check: uninitialized-local -Severity: Medium -Confidence: Medium -Description:.Lender.approveaddress,uint256,address.i Lender.sol87 is a local variable never initialized.A smart contract with uninitialized local variables may lead to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’9 views

IStaking(contracts[i]).canBatchContracts() will revert due to the fact that contracts[i] can contain address(0)

Lines of code Vulnerability details Issue: canBatchContracts will revert due to the fact that contractsi can contain address0 as an address which will revert the whole call. Affected Code File: BatchRequests.sol 33: function canBatchContracts external view returns Batch memory 34: uint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’12 views

Upgraded Q -> M from 104 [1656258768065]

Judge has assessed an item in Issue 104 as Medium risk. The relevant finding follows: L01: Silent overflow of fCashAmount Line References Description If a fCashAmount value that is greater than uint88 is passed into the mint function, downcasting it to uint88 will silently overflow. Recommended...

7.1AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’9 views

LiquidityReserve may break if underlying token is upgraded to have fees

Lines of code Vulnerability details Impact One of the tokens supported by this project is USDC, which is an upgradeable contract, and the code specifically casts addresses to IERC20Upgradeable rather than to IERC20, so the intention is for the code to support upgrades. If USDC ever upgrades to ha...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’10 views

DoS attack on claiming rewards can lead to user never being able to claim

Lines of code Vulnerability details Proof of Concept: the stake function can be called for a different recipient than msg.sender. Each time you stake tokens your warmUpInfo.expiry or the time when you are able to claim rewards grows by warmUpPeriod as is visible the last line here not the line wi...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’11 views

Cannot mint to exactly max supply using _mint function

Lines of code Vulnerability details Impact Cannot mint to exactly max supply using mint function Proof of Concept requiretotalSupply MAXSUPPLY, "Max supply"; if totalSupply == MAXSUPPLY this assert will be failed and reverted. But is shouldn't be reverted as totalSupply == MAXSUPPLY is valid. Too...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’10 views

No support for fee on transfer tokens

Lines of code Vulnerability details Impact stake will revert for tokens that charge a fee on transfer. Proof of Concept Note: POC below assumes tokePoolContract.depositamount transfers part of Staking.sol balance to tokePoolContract. stake uses the amount as a reference for depositToTokemak and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’10 views

setCurvePool does not approve the new curve pool to transfer the TOKE_POOL token, making it unusable for its intended purpose.

Lines of code Vulnerability details Staking.solsetCurvePool File: Staking.sol 153: / 154: @notice sets the curve pool address 155: @param curvePool uint 156: / 157: function setCurvePooladdress curvePool external onlyOwner 158: CURVEPOOL = curvePool; 159: setToAndFromCurve; 160:...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’13 views

Removal of liquidity from the reserve can be griefed

Lines of code Vulnerability details Impact Users may be unable to withdraw/remove their liquidity from the LiquidityReserve if a user decides to grief the contract. Proof of Concept This is the only function in this contract that is able to unstake funds, so that they can be withdrawn/removed:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’15 views

Unused Return

Lines of code Vulnerability details Impact Configuration Check: unused-return Severity: Medium Confidence: Medium Description: The return value of this external call is not stored in a local or state variable. Unused return values of function calls are indicative of programmer errors which may ha...

6.5AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’15 views

Possible DoS in Staking.claim() function

Lines of code Vulnerability details Impact In Staking contract, users are allowed to stake for another recipient. And it also updates warmUpInfo.expiry for recipient address so recipient can only claim after this new expiry is passed. Attackers can abuse this to constantly stake 1 wei for another...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’18 views

Sending batch withdrawal requests can possibly DoS

Lines of code Vulnerability details Impact The function BatchRequests.sendWithdrawalRequests allows calling the sendWithdrawalRequests function on all of the Yieldy contracts at once. However, due to the unbounded for loop, if many Yieldy contracts are added to contracts, this function can...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’10 views

Sandwich attacks are possible as there is no slippage control option in Marketplace and in Lender yield swaps

Lines of code Vulnerability details Swapping function in Marketplace and Lender's yield can be sandwiched as there is no slippage control option. Trades can happen at a manipulated price and end up receiving fewer tokens than current market price dictates. Placing severity to be medium as those a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’7 views

Wrong parameter passed inside _storeRebase() in Yieldy Contract

Lines of code Vulnerability details In Yieldy contract, while calling storeRebase in function rebase, updatedTotalSupply is passed instead of currentTotalSupply. Filing this as medium risk , due to two impacts, in the way this parameter is used in storeRebase function. 1. The rebasePercent is...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’7 views

[M-01] Cannot set or change curve pool after initialization

Lines of code Vulnerability details Impact Inability to set or change curve pool after initialization will hurt the project liquidity and block the ability to instant unstake from curve. Approving the CURVEPOOL address is done only on initialize and only if non zero address supplied. When using...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’11 views

[M-03] Wrong minting on lend for Tempus

Lines of code Vulnerability details Impact Will result in either failure to lend or loss of funds for the lender Proof of Concept Not very clear what was the original intention, but I find it hard to believe that subtracting the whole balanceOf iPTs from the return result from Tempus, is what was...

7.1AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’12 views

No check for set with address(0)

Lines of code Vulnerability details Impact can mint and get approve from address 0. Proof of Concept function setMarketPlaceaddress m external authorizedadmin returns bool if marketPlace != address0 revert ExistsmarketPlace; marketPlace = m; return true; Tools Used None Recommended Mitigation Ste...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’6 views

lend() to Tempus will return less than expected or just revert

Lines of code Vulnerability details function lend uint8 p, address u, uint256 m, uint256 a, uint256 r, uint256 d, address t, address x public unpausedp returns uint256 // Instantiate market and tokens address principal = IMarketPlacemarketPlace.marketsu, m, p; if ITempusprincipal.yieldBearingToke...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/26 12:0 a.m.β€’12 views

Staking.setCurvePool() doesn't approve allowance when changes CURVE_POOL.

Lines of code Vulnerability details Impact Staking.setCurvePool doesn't approve allowance when changes CURVEPOOL. It will affect when users exchange asset through CURVEPOOL. Proof of Concept When initialize the contract, Staking contract approves CURVEPOOL here. But when admin updates CURVEPOOL...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’16 views

Staking: Attacker can stake very few tokens for others to increase the lock time of others' tokens.

Lines of code Vulnerability details Impact In the stake function of the Staking contract, anyone can stake tokens for others. And each time a token is staked, the lock time of all tokens is increased. This allows an attacker to stake few tokens for others to increase the lock time of others'...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’10 views

Upgraded Q -> H from 158 [1656140317935]

Judge has assessed an item in Issue 158 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’14 views

Griefers can prevent users from claiming YIELDY_TOKENs from the warm up

Lines of code Vulnerability details Impact When warmUpPeriod is greater than 0, anyone can deny i.e.: grief any user from claiming their YIELDYTOKENs from Staking.sol. Proof of Concept 1. Admin sets the warmUpPeriod to 2. 2. A user deposits a decent amount STAKINGTOKENs, with the expectation that...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’16 views

No withdrawal possible for ETH TOKE pool

Lines of code Vulnerability details Impact The withdraw function of the ETH Tokemak pool has an additional parameter asEth. This can be seen in the Tokemak Github repository or also when looking at the deployed code of the ETH pool. Compare that to e.g. the USDC pool, which does not have this...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’13 views

Griefing Attack by staking for any receipent

Lines of code Vulnerability details Impact Any user can grief attack and lock funds of victim by staking with victim address as recipient. Proof of Concept If warmup period is more than 1, it is possible to do this by staking with victim address as recipient with 1 wei amount, and increasing the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’16 views

Denial of Service by wrong BatchRequests.removeAddress logic

Lines of code Vulnerability details Impact The BatchRequests.removeAddress logic is wrong and it will produce a denial of service. Proof of Concept Removing the element from the array is done using the delete statement, but this is not the proper way to remove an entry from an array, it will just...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/25 12:0 a.m.β€’8 views

Upgraded Q -> H from 158 [1656140803140]

Judge has assessed an item in Issue 158 as High risk. The relevant finding follows: --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’9 views

Division by 0

Lines of code Vulnerability details Division by 0 can lead to accidentally revert, An example of a similar issue - code-423n4/2021-10-defiprotocol-findings84 Code instances: https://github.com/code-423n4/2022-06-nibbl/tree/main/contracts/NibblVault.solL183 initialTokenSupply, initialTokenPrice...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’7 views

NibblVault permit functionality allows redeeming only one "active" signature

Lines of code Vulnerability details Impact Contract NibblVault implements function permit that allows approving spender to spend value of tokens that belongs to owner. The issue is that structHash keeps incrementing noncesowner++ which in case of multiple "active" permits signatures of the same...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’12 views

User Could Change The State Of The System While In Pause Mode

Lines of code Vulnerability details Proof-of-Concept Calling NibblVault.updateTWAP function will change the state of the system. It will cause the TWAP to be updated and buyout to be rejected in certain condition. When the system is in Pause mode, the system state should be frozen. However, it wa...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’19 views

Twav.sol#_getTwav() will revert when timestamp > 4294967296

Lines of code Vulnerability details function getTwav internal view returnsuint256 twav if twavObservationsTWAVBLOCKNUMBERS - 1.timestamp != 0 uint8 index = twavObservationsIndex + TWAVBLOCKNUMBERS - 1 % TWAVBLOCKNUMBERS; TwavObservation memory twavObservationCurrent = twavObservationsindex;...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’12 views

Malicious NFT

Lines of code Vulnerability details Impact Anybody can create a vault which fractionalizes their NFT. However, this process should go through a whitelist and review process because a maliciously implemented NFT contracts can reclaim ownership of the contract despite it technically being 'owned' b...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’8 views

ProxyVault implementation can be changed retroactively bricking old NibblVaults

Lines of code Vulnerability details Impact The ProxyVault.sol contract refers back to the NibbleVaultFactory.vaultImplementation This value can change over time, potentially breaking storage of the old implementations. Notice that querying the implementation from NibbleVaultFactory also incurs a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’14 views

REENTRANCY-Avoid transfer() as reentrancy mitigations. Transfer do not protect from reentrancies in case of gas price changes.

Lines of code Vulnerability details Impact --Check: reentrancy-unlimited-gas --Severity: Informational --Confidence: Medium Transfer and send have been recommended as a security best-practice to prevent reentrancy attacks because they only forward 2300 gas. That being said, gas repricing of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’12 views

Malicious Basket Could Be Used To Rug Fractionalized Token Holders

Lines of code Vulnerability details Proof-of-Concept The NibblVaultFactory.createVault accepts any NFT address or any Basket address. Therefore, an attacker could pass a malicious basket address during vault creation. function createVault address assetAddress, address curator, string memory name,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’7 views

Basket NFT have no name and symbol

Lines of code Vulnerability details Impact The Basket contract is intended to be used behind a proxy. But the ERC721 implementation used is not upgradeable, and its constructor is called at deployment time on the implementation. So all proxies will have a void name and symbol, breaking all...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’17 views

TWAP array can be artificially filled up with the most recent quote

Lines of code Vulnerability details A malicious user can run updateTWAV on each block, quickly replacing all four values of the twavObservations array with the most recent valuation. I.e. the time weighted averaging essence of the recorded price can be directly reduced to always be just most rece...

6.5AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’13 views

[PNM-005] Reentrancy of function sell

Lines of code Vulnerability details Description In function chargeFee, a potential reetrancy can be triggered by the factory. Since function sell invokes chargeFee in the middle of its function body, it potentially impacts the calculation, e.g., the totalSupply would be incorrect since the tokens...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’17 views

_updateTwav() and _getTwav() will revert when cumulativePrice overflows

Lines of code Vulnerability details Impact Contract will break when cumulativeValuation overflows. PoC Cumulative prices are designed to work with overflows/underflows because in the end the difference is important. In updateTwav when prevCumulativeValuation + valuation timeElapsed overflows the...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’11 views

Proxy storage collision - contracts might be bricked

Lines of code Vulnerability details The proxy contracts save the implementation variables in the first storage slot see links above. This will lead to storage collusions when the implementation contract tries to read/update the first storage slot. For the implementation contract, the first storag...

6.6AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’17 views

Fee Was Not Charged When Buying On Secondary Curve

Lines of code Vulnerability details Proof-of-Concept Per the documentation, the admin and curator fees are charged when buying on the secondary curve. Whenever someone mints and burns tokens on the bonding curve, they need to pay some trading fees which is accrued in ETH Within the NibblVault.buy...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’12 views

Buy logic is not correct

Lines of code Vulnerability details Impact This will affect the curves from where the buy need to happen. This will lead to erroneous result. Proof of Concept Tools Used Manual calculation and code review Recommended Mitigation Steps Update the Buy logic by referring the sell logic. --- The text...

7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’10 views

_secondaryReserveRatio is likely to be overflowed due to an unsafe downcast

Lines of code Vulnerability details msg.value SCALE 1e18 / initialTokenSupply initialTokenPrice is likely to be more than maxuint32, and therefore secondaryReserveRatio can be overflowed due to the unsafe downcast to uint32. For example, for: initialTokenSupply = 1e20. initialTokenPrice = 1e14. T...

7.1AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’9 views

Lack of lock modifier on sell() can lead to reentrancy

Lines of code Vulnerability details Impact NibblVault.sell does not possess the lock modifier that protects against reentrancy. The only attack vector due to reentrancy in this function was found to be executable by the factory that receives the admin fees which is not plausible due to the curren...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’10 views

Discrepancies between document and code implementation

Lines of code Vulnerability details Impact This will tarnish the credibility of the system. Proof of Concept Document says buyout time as 3 days. But the code is implemented with 5 days as buyout time. Tools Used Manual verification Recommended Mitigation Steps Implement the code as per what...

7.1AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’10 views

attacker can give a smaller amount of tokens and not pay the fees

Lines of code Vulnerability details Impact an attacker can specify an amount like from 1 wei or more but depends on the state of the contract variables. amount= 1 adminfee=5 / 1000000 = 0 because of persion loss whichfeeAdmin=0 same thing for the other fees and there is no check that they cant be...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’14 views

Ineffective TWAV Implementation

Lines of code Vulnerability details Background The current TWAV implementation consists of an array of 4 observations/valuations called twavObservations. Whenever, the new valuation is updated, the new cumulative valuation will be appended to the twavObservations array and the oldest...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’15 views

Buyer can initiateBuyout by sending less value than current valuation

Lines of code Vulnerability details Impact Intuitively, a buyer calling initiateBuyout should be sending a msg.value greater than or equal to current valuation. However, they can actually send less than this amount and still initiate the buyout. On line 404 we have requirebuyoutBid =...

7.2AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’11 views

Avoid using address(this).balance for internal accounting

Lines of code Vulnerability details Impact This could reduce or increase the amount of ETH that token-holders are able to redeem for a reserve token in the case of a buyout success. Proof of Concept Using addressthis.balance for any internal accounting for smart contract poses risks. Using...

6.7AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’12 views

_getTwav is not correct. It is not considering all last 4 blocks.

Lines of code Vulnerability details Impact This will result in invalid deadline to decide the buyout end. Proof of Concept /// @notice returns the TWAV of the last 4 blocks /// @return twav TWAV of the last 4 blocks function getTwav internal view returnsuint256 twav if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
β€’added 2022/06/24 12:0 a.m.β€’11 views

[PNM-002] Unfairness: the curator (or users with large shares) can always reject payout by sandwich attacks

Lines of code Vulnerability details Impact 15% Attack Description The initiateBuyout function uses the current valuation instead of the time-weighted average one to determine buyoutRejectionValuation, making the curator or any other early buyers with a relatively large sharing able to reject...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190