Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•7 views

Inaccurate fee calculation

Lines of code Vulnerability details Impact The equation in the calculateFee function has a high degree of inaccuracy Solidity use integers, when divide an uint256 for other uint256 the divition take the floor number and ignore the decimal part In example: a = 1999 ETH feenominator = 1000 the retu...

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

Illuminate PT redeeming do not return underlying to a user

Lines of code Vulnerability details In the second step of two step redeeming process, the underlying funds should be located in the Redeemer contract as external system burned the shares the Redeemer obtained from the Lender contract and returned underlying to Redeemer. Then Redeemer's Illuminate...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•7 views

wrong passing value in rebase function

Lines of code Vulnerability details Impact wrong information in rebases array Proof of concept rebase function should pass the totalStakedBefore the totalSupply before adding the profit to function storeRebase, but as in the code rebase pass the updatedTotalSupply Tools Used Manual review...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•10 views

Yieldy._storeRebase() saves and emits wrong values.

Lines of code Vulnerability details Impact Yieldy.storeRebase saves and emits wrong values. I don't think the asset will be lost directly because of this but the rebase storage will have wrong values and it might affect the system later. Proof of Concept The previousCirculating must be a previous...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•8 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

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.•18 views

griefing on claim()

Lines of code Vulnerability details Issue: griefing can happen if coolDownPeriod is 0 due to the fact that you can stake for someone else, whenever a stake happens, the expiry variable increases with coolDownPeriod. This can be done either by watching the mempool and frontrun a stake when someone...

6.9AI 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.•8 views

Sense AMM address can be manipulated, allowing unlimited mint of principal tokens

Lines of code Vulnerability details Lender's lend for Sense uses ISensex.swapUnderlyingForPTs output to determine the Illuminate PT amount to be minted for the user. x is a user supplied and not verified address, which can be precooked by a malicious user to return any inflated amount, that will ...

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

Arbitrage on stake()

Lines of code Vulnerability details Issue: there is a huge arb opportunity for people who deposit 1 block before the rebase Consequences: then they can call instantUnstakeReserve or instantUnstakeCurve to unstake the staked amount, in this way the profit that needs to be distributed on the next...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•22 views

Centralization Risk On The Withdraw Operation

Lines of code Vulnerability details Impact During the code review, It has been observed that admin can withdraw all tokens from the system. Proof of Concept 1. Navigate to the following contract : Tools Used Code Review Recommended Mitigation Steps We advise the client to carefully manage the adm...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•9 views

Minting to user after funds deposit is now omitted in Lender's Swivel lend

Lines of code Vulnerability details Lender's Swivel version of lend pulls the underlying funds from the user, opens the necessary positions, but now fails to mint Illuminate PT for the user, so there will be no records for her investment and the corresponding funds aren't recoverable. Setting...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•18 views

instantUnstake function can be frontrunned with fee increase

Lines of code Vulnerability details Impact instantUnstake allows user to unstake their stakingToken for a fee paid to the liquidity providers. This fee could be changed up to 100% any moment by admin. Malicious admin could frontrun users instantUnstake transaction and set fee to any value using...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•10 views

Call to lend() function can be frontrunned with fee increase

Lines of code Vulnerability details Impact Malicious admin could frontrun users lend transaction anytime and set feenominator to any value using setFee and bigger fee than user expected. /// @notice sets the admin address /// @param a address of a new admin /// @return bool true if successful...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•12 views

token transfers in LiquidityReserve and Staking contract don't support deflationary ERC20 tokens, and user funds can be lost if stacking token was deflationary

Lines of code Vulnerability details Impact if the token is deflationary then contract will receive less token that requested amount but contract don't check for the real transferred amount. because this is happening in receiving stackingtoken in addLiquidity of LiquidityReserve and stake of Staki...

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

lender variable in is not the same as constructory and method in the construcotr ther is no check for address zero

Lines of code Vulnerability details Impact lender variable not the same as constructory and method its no check for address zero Recommended Mitigation Steps check for address zero in the constructor --- The text was updated successfully, but these errors were encountered: šŸ˜• 1 KenzoAgada reacted...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•9 views

[M-02] transferring LESS funds from lender than needed

Lines of code Vulnerability details Impact Wrong accounting calculation may result in malfunctioning and loss of funds for the project. Proof of Concept As seen in the lines above, the amount transferred from the lender is after subtracting the fee he actually needs to pay On the other hand, the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:0 a.m.•20 views

Deflationary/fee-on-transfer tokens are not supported

Lines of code Lender.solL215 Lender.solL337 Lender.solL398 Lender.solL456 Lender.solL521 Lender.solL564 Lender.solL617 Vulnerability details Impact When an amount of underlying tokens is sent to the Lender.sol contract during a lend, the actual amount gained by the contract might not be exactly t...

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/25 12:0 a.m.•14 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.•10 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/25 12:0 a.m.•17 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.•15 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.•18 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.•12 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.•17 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/24 12:0 a.m.•12 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.•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.•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.•10 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.•12 views

NibblVault buyout duration longer than update timelock

Lines of code Vulnerability details Impact User can buy out NFT by initiating the process through initiateBuyout, then he has to wait BUYOUTDURATION which is 5 days and if the buyout will not get rejected he can claim the NFT. During that period bidder cannot cancel the process. The issue is that...

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

Missing notBoughtOut modifier

Lines of code Vulnerability details Impact On the withdrawUnsettledBids function, unsettledBid can be withdraw when buyout is rejected. However, the contract is missing notBoughtOut modifier in the function. From that reason, during buyout period the function can be called. On the redeem function...

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

[PNM-004] Calculation of _secondaryReserveRatio can be overflowed

Lines of code Vulnerability details Description uint32 secondaryReserveRatio = uint32msg.value SCALE 1e18 / initialTokenSupply initialTokenPrice; secondaryReserveRatio can be overflowed by setting a relatively small initialTokenSupply and initialTokenPrice. The result will be truncated by uint32,...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:0 a.m.•13 views

Issue with TWAV calculation.

Lines of code Vulnerability details Impact To calculate time weighted average value, current valuation is used. This is not appropriate way to decide the TWAV while other locations considers only time. This might not be the stable one. Proof of Concept uint256 currentValuation =...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:0 a.m.•18 views

Potential denial of service issues

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. I noticed that the withdrawUnsettledBids and redeem functions return the Ether amount by calling safeTransferETH, but if the to address passed in is a malicious contract address and the receive function...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:0 a.m.•13 views

Reentrancy bug in Basket's withdraw multiple tokens function which gives attacker ability to transfer basket ownership and spend it but withdraw all the tokens out of basket

Lines of code Vulnerability details Impact Basket is used for keep multiple tokens in contract and mint one NFT token to represent their ownership. Basket only allows for owner of NFTid=0 to withdraw tokens from Basket address. users can deposit multiple tokens in one Basket and then create a...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:0 a.m.•9 views

sell function does not have minimum threshold on the _minAmtOut

Lines of code Vulnerability details Impact During the code review, It has been observed saleReturn value is not resistant to slippage on the minAmtOut. For the protecting value from slippage, the protocol should ensure that minAmtOut is different than zero. Proof of Concept Tools Used Recommended...

7.1AI 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.•14 views

_rejectBuyout() does not take buys and sells into account until next block, can lead to false effects due to timing

Lines of code Vulnerability details Impact Buyout that should be rejected will be allowed to happen. Proof of Concept Last user to call buy that could have pushed rejectBuyout to reject the buyout wont be accounted for because rejecBuyout is place before the minting of new tokens. Therefore even ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:0 a.m.•20 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

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.•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.•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.•12 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
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.•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.•17 views

TWAV can be attacked by flash loan

Lines of code Vulnerability details Impact updateTWAV can be flash loaned. Hacker may pay the flash loan fee for 4 blocks then execute the attack after that. Proof of Concept function updateTWAVuint256 valuation, uint32 blockTimestamp internal uint32 timeElapsed; unchecked timeElapsed =...

7.1AI 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.•9 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
Total number of security vulnerabilities10190