Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/08/04 12:0 a.m.15 views

Malicious user can drain the Singularity contract of it's liquidity

Lines of code Vulnerability details Impact The SGLCollateral contract has functionality to allow users to remove and add collateral for the Singularity market. The addCollateral function accepts a skim parameter that, if defined as true, will cause the internal addTokens function to assert that t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

USDT approval racing can lead to DoS

Lines of code Vulnerability details Impact USDT approval racing can lead to DoS Proof of Concept 2023-07-tapioca/tapioca-periph-audit/contracts/Magnetar/modules/MagnetarMarketModule.solL157 Tools Used Recommended Mitigation Steps Use safeApprove Assessed type call/delegatecall --- The text was...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

TapOFT.sol: Incorrect emission value due to division by higher decimal value

Lines of code Vulnerability details Impact Incorrect emission value which will be used in per week emission. Proof of Concept TapOFT.sol has the computeEmission function to calculate the emitted value. The output from this function is used in emitForWeek. when we look at the function...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

Reentrancy vulnerability in USDO.flashLoan() function

Lines of code Vulnerability details Impact The reentrancy vulnerability in the USDO contract could allow an attacker to withdraw funds from the contract even if the original contract has not yet approved the withdrawal. This could result in a loss of funds for the USDO contract and its users. Pro...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.11 views

Loss of Funds when user wants to repay debt and underflow in _repay () function

Lines of code Vulnerability details Impact There is no check for if userBorrowPartto is greater than or equal to part before subtraction which can lead to loss of funds for user or underflow, incase a user inputs more amount than the user is in debt for. Proof of Concept Provide direct links to a...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.15 views

No slippage control while minting GLP

Lines of code Vulnerability details Impact glpRewardRouter.mintAndStakeGlpaddressweth, wethAmount, 0, 0; Here, minUSDG = 0 and minGlp = 0 means no slippage checks. This can be sandwitched in certain conditions in which delta between min and max glp price is higher due to following factors: delta...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.14 views

_sendNative in tapiocaz::Balancer::rebalance() not sending ETH can break service

Lines of code Vulnerability details Impact function sendNative address payable oft, uint256 amount, uint16 dstChainId, uint256 slippage private if addressthis.balance amount revert ExceedsBalance; routerETH.swapETH dstChainId, oft, //refund abi.encodePackedconnectedOFTsoftdstChainId.dstOft, amoun...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

RTokenAsset price estimation accounts for margin of error twice

Lines of code Vulnerability details RTokenAsset estimates the price by multiplying the BU basket unit price estimation by the estimation of baskets held then dividing by total supply. The issue is that both BU and baskets held account for price margin of error, widening the range of the price mor...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

CTokenV3Collateral._underlyingRefPerTok should use the decimals from underlying Comet.

Lines of code Vulnerability details Impact CTokenV3Collateral.underlyingRefPerTok uses erc20Decimals which is the decimals of CusdcV3Wrapper. But it should use the decimals of the underlying Comet. Proof of Concept CTokenV3Collateral.underlyingRefPerTokcomputes the actual quantity of whole...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.28 views

The USDOMarketModule contract's lend function allows for dangerous call delegation

Lines of code Vulnerability details Impact The USDOMarketModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for market actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.6 views

User can't redeem from RToken based on CurveStableRTokenMetapoolCollateral when any underlying collateral of paired RToken's price oracle is offline(timeout)

Lines of code Vulnerability details The CurveStableMetapoolCollateral is intended for 2-fiattoken stable metapools that involve RTokens, such as eUSD-fraxBP. The metapoolToken coin0 is pairedToken, which is also a RToken, and the coin1 is lpToken, e.g. 3CRV. And the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.11 views

rate is wrong

Lines of code Vulnerability details Impact attacker can manipulate pool price to make strategy have eth lower as it should have 1 seth 1 eth then mint new steth 1 steth = 1 eth so attacker can gain share more than normal Proof of Concept 1. attacker manipulate pool price 1 seth 1 eth 2. attacker...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

RTokenAsset price oracle can return a huge but valid high price when any underlying collateral's price oracle timeout

Lines of code Vulnerability details The RTokenAsset is an implementation of interface IRTokenOracle to work as a oracle price feed for the little RToken. RTokenAsset implements the latestPrice function to get the oracle price and saved time from the cachedOracleData, which is updated by...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

BigBang liquidations causes YieldBox-tokens to be locked in contract

Lines of code Vulnerability details Impact When a position gets liquidated in BigBang the contract will receive YieldBox-assetId-tokens of which some are sent to the liquidator and penrose-fee-receiver. The rest will get stuck in the contract and cannot be claimed as fees in refreshPenroseFees...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

Re-entrancy in flash minting USDO can bypass max checks

Lines of code Vulnerability details Impact function flashLoan IERC3156FlashBorrower receiver, address token, uint256 amount, bytes calldata data external override notPaused returns bool // @audit re-enter and mint requiretoken == addressthis, "USDO: token not valid"; requiremaxFlashLoantoken =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

TOFT in (m)TapiocaOft contracts can be stolen by calling removeCollateral() with a malicious removeParams.market

Lines of code Vulnerability details Impact The TOFT available in the TapiocaOFT contract can be stolen when calling removeCollateral with a malicious market. Proof of Concept mTapiocaOFT inherit BaseTOFT, which has a function removeCollateral that accepts a market address as an argument. This...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

Incorrect parameter for getCallerReward might return 0 reward despite insolvency

Lines of code Vulnerability details Impact The calculation of the caller reward uses an incorrect value. If the exchangeRate remains the same but a lot of interest accrues, then there will be no liquidation reward. Without a liquidation reward borrowing positions will not get liquidated and incur...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

Setting debtStartPoint > 0 breaks many BigBang actions

Lines of code Vulnerability details Impact If BigBang.debtStartPoint is set to a value 0, many core features will break, e.g. deposits of collateral will be possible, but removal not, which would effectively lock collateral inside the contract. Proof of Concept BigBang.getDebtRate uses the variab...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

Reentrancy vulnerability in SGLCommon._removeAsset

Lines of code Vulnerability details Impact The function SGLCommon.removeAsset is vulnerable to reentrancy attacks. Reentrancy occurs when a contract calls another contract, and the second contract calls back to the first contract before the first contract has finished executing. This can allow th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

exitPosition in TapiocaOptionBroker may incorrectly inflate position weights

Lines of code Vulnerability details Impact Users who participate and place stakes with large magnitudes may have their weight removed prematurely from pool.cumulative, hence causing the weight logic of participation to be wrong. pool.cumulative will have an incomplete image of the actual pool hen...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.22 views

The USDOLeverageModule contract's leverageUp function allows for dangerous call delegation

Lines of code Vulnerability details Impact The USDOLeverageModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for leverage actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

The Asset.lotPrice doubles the oracle timeout in the worst case

Lines of code Vulnerability details When the tryPrice function revert, for example oracle timeout, the Asset.lotPrice will use a decayed historical value: uint48 delta = uint48block.timestamp - lastSave; // s if delta = oracleTimeout + priceTimeout return 0, 0; // no price after full timeout else...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.17 views

Reentrancy vulnerability in BigBang.execute

Lines of code Vulnerability details Impact This vulnerability could allow an attacker to withdraw funds from the BigBang contract. This could result in a loss of funds for the user. Proof of Concept The BigBang.execute function has external calls inside a loop. This could potentially lead to...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

Permanent funds lock in StargateRewardableWrapper

Lines of code Vulnerability details Impact The staked funds might be locked because the deposit/withdraw/transfer logic reverts. Proof of Concept In StargateRewardableWrapper, claimAssetRewards claims the accumulated rewards from the staking contract and it's called during every...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.11 views

Incorrect implementation of solvent() modifier

Lines of code Vulnerability details Impact In Market.sol, solvent modifier is given as below, modifier solventaddress from updateExchangeRate; accrue; ; requireisSolventfrom, exchangeRate, "Market: insolvent"; Here the modifier has used the accrue directly, however while the functions being used ...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

borrowInternal() of BaseTOFTMarketModule.sol has phantom permit functions

Lines of code Vulnerability details Impact A malicious actor could steal funds from a User who has already done his first deposit. Proof of Concept Consider the case where attacker uses a token with phantom permit function as collateral, the most famous ones being WETH, BNB, HEX etc. Let’s consid...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.8 views

Miusing empty string insteaf of oracleData in updateExchangeRate

Lines of code Vulnerability details Impact contract has this storage: /// @notice oracleData bytes public oracleData; updated, rate = oracle.get""; Instead of oracle.get"", it should use proper oracle data which was set otherwise it can lead to undefined behavior where oracle expects data. Proof ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.14 views

Signature Validation Bypass in 'permit' Function of MarketERC20.sol

Lines of code Vulnerability details Description The 'MarketERC20.sol' contract contains a critical vulnerability in the 'permit' function, where insufficient signature validation allows for bypassing the authentication process. This loophole enables attackers to manipulate the function by providi...

7.4AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.11 views

_sendToken in tapiocaz::Balancer::rebalance() not sending native fee will lead to revert

Lines of code Vulnerability details Impact function sendToken address payable oft, uint256 amount, uint16 dstChainId, uint256 slippage, bytes memory data private IERC20Metadata erc20 = IERC20MetadataITapiocaOFToft.erc20; if erc20.balanceOfaddressthis amount revert ExceedsBalance; uint256 srcPoolI...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.16 views

LiquidationQueue brings centralization risk in the contract.

Lines of code Vulnerability details Impact the owner has too much unilateral control over liquidations and can manipulate te country in the following ways: The owner of LiquidationQueue sees a profitable liquidation opportunity Before anyone else can liquidate, they use LiquidationQueue to place ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.13 views

There is no decrease for the share allowance from _addCollateral when share passed zero

Lines of code Vulnerability details Impact When calling addCollateral, and if the share passed as zero, it is calculated based on the passed amount. However, this happens after allowanceBorrow was already called in addCollateral. So, deduction never occur for the share. Eventually, the borrow...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.12 views

StaticATokenLM::_claimRewardsOnBehalf: wrong update of _unclaimedRewards[onBehalfOf] if reward > totBal lead to user lose of pending rewards.

Lines of code Vulnerability details Description If for some reason the current contract reward token balance is lower than the rewards meant to be paid to onBehalf address, then this rewards can never be claimed. function claimRewardsOnBehalf address onBehalfOf, address receiver, bool forceUpdate...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

CurveStableMetapoolCollateral.tryPrice returns a huge but valid high price when the price oracle of pairedToken is timeout

Lines of code Vulnerability details The CurveStableMetapoolCollateral is intended for 2-fiattoken stable metapools. The metapoolToken coin0 is pairedToken and the coin1 is lpToken, e.g. 3CRV. And the config.chainlinkFeed should be set for paired token. Impact The CurveStableMetapoolCollateral.pri...

7.2AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

manipulate rate

Lines of code Vulnerability details Impact using spot price as the exchange rate can be manipulated. Proof of Concept 1. attacker manipulates the balancer pool making eth very expensive 2. By calling the updateCache function, the attacker updates the cachedCalculatedAmount based on the manipulate...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.11 views

Insufficient Authorization Checks in 'SGLLeverage' Contract Functions

Lines of code Vulnerability details Description The 'SGLLeverage' contract contains critical vulnerabilities in multiple functions, including 'multiHopBuyCollateral,' 'multiHopSellCollateral,' 'sellCollateral,' and 'buyCollateral.' These functions lack proper authorization checks, allowing any us...

7.4AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.12 views

Incorrect Interest Accrual Calculation in 'SGLCommon' Contract

Lines of code Vulnerability details Description The 'SGLCommon' contract contains a critical vulnerability in the interest accrual calculation, particularly in the computation of the 'extraAmount' used for accruing interest. The flaw arises from always dividing by 1e18, disregarding the number of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

CBEthCollateral and AnkrStakedEthCollateral _underlyingRefPerTok is incorrect

Lines of code Vulnerability details The CBEthCollateral.underlyingRefPerTok function just uses CBEth.exchangeRate to get the ref/tok rate. The CBEth.exchangeRate can only get the conversion rate from cbETH to staked ETH2 on the coinbase. However as the docs...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.40 views

Missing validation checks on sending non blocking LZ payload

Lines of code Vulnerability details Impact In OFTCoreV2 provided as example by LayerZero function sendaddress from, uint16 dstChainId, bytes32 toAddress, uint amount, address payable refundAddress, address zroPaymentAddress, bytes memory adapterParams internal virtual returns uint amount...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

Reentrancy vulnerability in BaseUSDO._executeModule() function

Lines of code Vulnerability details Impact the success variable in the executeModule function in the BaseUSDO contract is written in both line 366 and line 369. This could potentially lead to a reentrancy vulnerability. In line 366, the success variable is set to true. In line 369, the success...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.10 views

cbETH's fails to check for a depeg since pegPrice is always 1

Lines of code Vulnerability details Whenever refresh is called for a collateral it does a few checks, one of them is to ensure the collateral didn't depge. It does so by calling tryPrice and checking that the returned parameter pegPrice which is supposed to represent the current price of the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

The amount of debt removed during liquidation may be worth more than the account's collateral

Lines of code Vulnerability details Impact The contract decreases user's debts but may not take the full worth in collateral from the user, leading to the contract losing potential funds from the missing collateral. Proof of concept During the liquidate function call, the function...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.127 views

The USDOOptionsModule contract's exercise function allows for dangerous call delegation

Lines of code Vulnerability details Impact The USDOOptionsModule contract is a module that is used by the BaseUSDO contract to facilitate functionality for oTap actions. The module functionality is invoked through the invocation of a delegatecall within the BaseUSDO contract's executeModule...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/04 12:0 a.m.9 views

AirdropBroker.sol#L442 : _participatePhase3 - PHASE_3_AMOUNT_PER_USER should be multiplied by 1e18

Lines of code Vulnerability details Impact Incorrect eligibleAmount is minted to the user. Proof of Concept An eligible user can call the participatePhase3 function and mint the aToken to them. function participatePhase3 bytes calldata data internal returns uint256 oTAPTokenID uint256 tokenID =...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.17 views

CurveVolatileCollateral._underlyingRefPerTok() Possible manipulation

Lines of code Vulnerability details Impact curvePool.getvirtualprice May be manipulated to cause malicious entry DISABLED Proof of Concept CurveVolatileCollateral.underlyingRefPerTok return curvePool.getvirtualprice function underlyingRefPerTok internal view virtual override returns uint192 @...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.16 views

StaticATokenLM transfer missing _updateRewards

Lines of code Vulnerability details Impact transfer missing updateRewards,Resulting in the loss of from's reward Proof of Concept StaticATokenLM contains the rewards mechanism, when the balance changes, the global accRewardsPerToken needs to be updated first to calculate the user's rewardsAccrued...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.12 views

Upgraded Q -> 2 from #141 [1691046669399]

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

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.6 views

_claimRewardsOnBehalf() User's rewards may be lost

Lines of code Vulnerability details Impact Incorrect determination of maximum rewards, which may lead to loss of user rewards Proof of Concept claimRewardsOnBehalf For users to retrieve rewards function claimRewardsOnBehalf address onBehalfOf, address receiver, bool forceUpdate internal if...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.16 views

ConvexStakingWrapper.sol after shutdown,rewards can be steal

Lines of code Vulnerability details Impact After shutdown, checkpoints are stopped, leading to possible theft of rewards. Proof of Concept ConvexStakingWrapper No more checkpoints after shutdown, i.e. no updates reward.rewardintegralforuser function beforeTokenTransfer address from, address to,...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/03 12:0 a.m.10 views

Asset.lotPrice only uses oracleTimeout to determine if the price is stale.

Lines of code Vulnerability details Impact OracleTimeout is the number of seconds until an oracle value becomes invalid. It is set in the constructor of Asset. And Asset.lotPrice uses OracleTimeout to determine if the saved price is stale. However, OracleTimeout may not be the correct source to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/08/02 12:0 a.m.23 views

Potential Early Exploit in Morho-Aave ERC4626 Implementation

Lines of code Vulnerability details Impact The issue discovered can be exploited when a vault is initially empty. A malicious actor could frontrun a legitimate user's deposit, contributing a negligible amount to the vault. This allows the actor to own shares while the total asset in the vault is...

6.7AI score
SaveExploits0
Total number of security vulnerabilities10190