45 matches found
If maxLTV == 0 case is used for allowing unlimited borrowing without any collateral, borrower whitelist must be enforced.
Lines of code Vulnerability details Impact If maxLTV == 0 case is used for allowing unlimited borrowing without any collateral, borrower whitelist must be enforced since it is a kind of undercollateral. Proof of Concept function isSolventaddress borrower, uint256 exchangeRate internal view return...
Borrower can pay very little collateral for a huge amount of more valuable asset.
Lines of code Vulnerability details Impact When an approved borrower calls borrowAsset , they are able to borrow as much asset as possible and passing the user controlled collateralAmount input with a lesser value worth of collateral. For example, a user can pay 1 USDC collateral and receive 1000...
maxLTV == 0 shouldn't be solvent but currently always solvent, so borrower can borrow all assets without any collateral.
Lines of code Vulnerability details Impact maxLTV == 0 shouldn't be solvent but currently always solvent, so borrower can borrow all assets without any collateral since isSolvent always return true. Proof of Concept Assume maxLTV == 0 User call borrowAsset /// @notice The borrowAsset function is...
Users could borrow all the liquidity in the Pair just by transferring some collateral Token
Lines of code Vulnerability details Impact Any user can borrow any amount of Asset just by transferring some collateral to the Pair Proof of Concept By invoking borrowAsset and passe some of collateralAmount you will be able to borrow all the liquidity in the Pair There is no check for the LTV. i...
Users could borrow all the liquidity in the FraxlendPair
Lines of code Vulnerability details Impact Any user can borrow any amount of Asset without transfer any Collateral Token to the Pair Proof of Concept By invoking borrowAsset and passe collateralAmount = 0 you will be able to borrow all the liquidity in the Pair As we can see they just check for i...
Yield of LiquidityReserve can be stolen
Lines of code Vulnerability details Impact Using sandwich attacks and JIT Just-in-time liquidity, the yield of LiquidityReserve could be extracted for liquidity providers. Proof of Concept The yield of LiquidityReserve is distributed when a user calls instantUnstakeReserve in Staking. Then, in...
No checks for the input of borrow cap
Lines of code Vulnerability details Impact due to lack of input validation of borrowcap , it can be borrowcap for a ctoken can be 0 and value of 0 corresponds to unlimited borrowing Proof of Concept Tools Used manual reveiw Recommended Mitigation Steps add input validation while using it in loop...
CNote updates the accounts after sending the funds, allowing for reentrancy
Lines of code Vulnerability details Having no reentrancy control and updating the records after external interactions allows for funds draining by reentrancy. Setting the severity to medium as this is conditional to transfer flow control introduction on future upgrades, but the impact is up to th...
cause an attacker to get a better deal on intrest rate on borrwoing and lending or cause txs' to revert
Lines of code Vulnerability details Impact if the variable maturity in getMaturity function is a big number that gets put into uint40 and since its to big of a number it will revert because solidity ^0.8.0 dosn't allow overflow and on deployment hasMatured can be true because it very close to the...
Undercollateralized loans possible
Lines of code Vulnerability details Impact The setPoolCollateralFactors function does not check that the collateral factor is 100%. It's possible that it's set to 200% and then borrows more than the collateral is worth, stealing from the pool. Recommended Mitigation Steps Disable the possibility ...
totalFeiBoosted vars can desync in TurboSafe and TurboMaster
Lines of code Vulnerability details Impact The TurboSafe and TurboMaster contracts each keep track of totalFeiBoosted, getTotalFeiBoostedForVault, and Master keeps track of getTotalBoostedAgainstCollateral in addition. For the TurboMaster contract, these values should be the sum of the...
A malicious user can potentially escape liquidation by creating a dust amount position and trigger the liquidation by themself
Handle WatchPug Vulnerability details In the current implementation, a liquidated position can be used for depositing and borrowing again. However, if there is a liquidation auction ongoing, even if the position is now liquidatable, the call of triggerLiquidation will still fail. The liquidator...
Liquidated positions can potential have non-zero debts, making users who deposit to the positions suffer from unfair debt
Handle WatchPug Vulnerability details In the current implementation, new borrows will be charged a 0.5% interest right away. Making the borrower be recorded a 100.5% amount of debt. However, when a position got liquidated, the unrealized interest may still remain in the position while the...
Attackers can force liquidations by borrowing large amounts of an asset.
Handle tensors Vulnerability details Impact Consider an attacker who borrows enough to greatly increase the oracle rate. It is claimed that arbitrageurs will come in a fix this discrepancy before the attacker has a chance to profit off of his price manipulation: "Over the next 1 hour, the effect ...
Data races in rulinalg
The affected version of rulinalg has incorrect lifetime boundary definitions for RowMut::rawslice and RowMut::rawslicemut. They do not conform with Rust's borrowing rule and allows the user to create multiple mutable references to the same location. This may result in unexpected calculation resul...
Griefing lenders
Handle gpersoon Vulnerability details Impact Suppose there are several lenders for token B of a pair. And an attacker puts in a deposit for token A to the maximum possible amount via accountA. And an attacker puts in a deposit for token B to the maximum possible amount via accountB. And then lend...
Users can avoid paying borrowing interest after the fyToken matures
Handle shw Vulnerability details Impact According to the protocol design, users have to pay borrowing interest when repaying the debt with underlying tokens after maturity. However, a user can give his vault to Witch and then buy all his collateral using underlying tokens to avoid paying the...
Reward rates can be changed through flash borrows
Handle @cmichelio Vulnerability details Vulnerability Details The rewards per market are proportional to their totalBorrows which can be changed by a large holder who deposits lots of collateral, takes out a huge borrow in the market, updates the rewards, and then unwinds the position. They'll on...
Wrong calcAsymmetricShare calculation
Handle @cmichelio Vulnerability details Vulnerability Details The inline-comment defines the number of asymmetric shares as u U 2 A^2 - 2 U u + U^2/U^3 but the Utils.calcAsymmetricShare function computes uA 2U^2 - 2uU + u^2 / U^3 which is not equivalent as can be seen from the A^2 term in the fir...
RUSTSEC-2020-0023 Lifetime boundary for `raw_slice` and `raw_slice_mut` are incorrect
The affected version of rulinalg has incorrect lifetime boundary definitions for RowMut::rawslice and RowMut::rawslicemut. They do not conform with Rust's borrowing rule and allows the user to create multiple mutable references to the same location. This may result in unexpected calculation resul...