Lucene search
+L

425 matches found

Code423n4
Code423n4
•added 2022/11/10 12:00 a.m.•16 views

Getting collateral value by calling previewRedeem can be manipulated

Lines of code Vulnerability details Proof of Concept The code in EscrowLib is trying to calculate the value of a collateral by calling the previewRedeem method of an ERC4626 vault, when the collateral is a token from such a vault. The EIP4626 specification explicitly says The preview methods retu...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•8 views

Decimals are computed in the wrong way if the collateral token doesn't have 18 decimals

Lines of code Vulnerability details Impact Huge accounting errors and losses for borrowers and liquidators if a collateral token with a non-18 decimal value is used. The oracle contract won't always return prices in 18 decimals. Proof of Concept The oracle returns the price in a normalized way...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•10 views

Arbitrary user can prevent withdrawals on any users through liquidation

Lines of code Vulnerability details Impact The function liquidate is a public function that handles the repayment of debt and provides a reward for users who call this function. Any user can be liquidated if they have debt outstanding. A user incurs debt if they borrow from the market, based on a...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•8 views

Using a non-18 decimals token as collateral (for ex. USDT) in a Market will result in multiple value losing situations

Lines of code Vulnerability details Proof of Concept In multiple places in the code, when doing calculations with both debt and price of collateral there is a multiplication by 1e18 - 1 ether. We have the following calculations: uint minimumCollateral = debt 1 ether /...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•21 views

If a market with a collateral that has feedDecimals + tokenDecimals > 36 is added it won’t be functional

Lines of code Vulnerability details Proof of Concept Chainlink price feeds usually have 18 decimals, but this is not guaranteed. Also tokens usually have 18 decimals or less but this is also not the case for 100% of widely used tokens YAM-v2 has 24. So the normal use case is when both the feed an...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•20 views

SimpleERC20Escrow's initialize() can be frontrun

Lines of code Vulnerability details Impact The user's collateral is not held in the market contract but is instead held in individual escrows. Every user has a unique escrow for every market. And the escrow contracts are created via the Market contract's createEscrow function. And it's initialize...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•12 views

A freshly added collateral token will cause the disadvantage of the borrowing price for the first borrowers.

Lines of code Vulnerability details Impact The Oracle contract is known to be pessimistic in way of serving the lowest prices to prevent borrowers from borrowing more than the lowest recorded value of their collateral over the past 2 days. However, this is not possible for the tokens which are...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•9 views

Liquidatin function does not consider cases where the liquidate user does not have enough collateral to pay.

Lines of code Vulnerability details Impact Liquidatin function does not consider cases where the liquidate user does not have enough collateral to pay. Proof of Concept The problem is the paid collateral in determined by repaiddebt: I ingnored decimals for simplifcation of the formulas I'm gonna...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•13 views

It is really dangerous to borrow to your full credit limit

Lines of code Vulnerability details Impact If a borrower borrows to their max credit limit even the smallest price decrease could get them liquidated. Causing them a loss of collateral. Proof of Concept function testBorrowfullCreditAmount public gibWethuser, wethTestAmount; gibDBRuser,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/10/30 12:00 a.m.•18 views

Oracle Price Calculation will Return Wrong Price for Certain Tokens

Lines of code Vulnerability details Impact viewPrice and getPrice functions of Oracle.sol has wrong price calculation implementation and so it will return wrong price for certain tokens. It only works well for tokens that has 18 decimals. This is because of hard-coded "36" in these functions line...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/08 12:00 a.m.•19 views

Dividing before multiplying can cause data loss

Lines of code Vulnerability details Impact Note: I'll use the notation decimals here to represent 10 token.decimals, just like th variable defined in the BaseV1Router.getPriceLP function. In the BaseV1Router.getPriceLP function, the token0 TVL is calculated in terms of NOTE, by multiplying the TV...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/09/08 12:00 a.m.•14 views

WHEN PAIR TOKENS ARE ALL NOT NOTE OR WANCTO GETPRICELP() WILL PRODUCE WRONG LP TOKEN PRICE

Lines of code Vulnerability details Impact If pair tokens all is not wcanto or note ,it will calculate wrong lp price of getPriceLP . Proof of Concept with docs description,Canto Lending Market will allow LP tokens from Canto’s native decentralized exchange to be used as collateral ,and createPai...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•23 views

repayAsset() but you will not receive your Collateral

Lines of code Vulnerability details Impact The user will just pay down the debt Proof of Concept By invoking repayAsset you will just pay the Asset Token, on the other hand, he does not send any amount of my Collateral Recommended Mitigation Steps Add a function to send the Collateral after...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•13 views

there is no calculation or checks for LTV

Lines of code Vulnerability details Impact The users decide how much Collateral to send and how many assets to borrow Proof of Concept In the Functions: Borrowing part exactly with borrowAsset and addCollateral there is no calculation or checks for LTV so the users just pass any amount and it wil...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•14 views

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...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•21 views

Deployment of pairs with no oracles

Lines of code Vulnerability details The constructor allows both oracle options oracleMultiply and oracleDivide to be set to zero. A pair could be deployed with no oracle maliciously or unintentionally. Impact Borrowers would not be impacted by fluctuations in values of collateral or assets and...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•13 views

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...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•22 views

LinearInterestRate mode has the risk of drastic fluctuation of interestRate by flash borrow attack, make borrower pay more interest

Lines of code Vulnerability details Impact In LinearInterestRate mode, the minInterest can be as low as MININT=0, and the maxInterest can be as high as MAXINT=146248508681. In getNewRate function, the newRate is determined by utilization. If utilization=1e5, the interestRate can be MAXINT. There...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•16 views

Approved Borrower can can walk away with collateral in leveraged borrowed Position

Lines of code Vulnerability details Impact When an approved borrower calls leveragedPosition , their userBorrowShares and userCollateralBalance values are updated. The borrow will be able to walk away with collateral balance by adding more collateral to pass the isSolvent check and remove all the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/08/17 12:00 a.m.•15 views

Approved Borrower can borrow asset without paying collateral

Lines of code Vulnerability details Impact When an approved borrower calls borrowAsset , they are able to borrow as much asset as possible without pass the user controlled collateralAmount input as 0. This would allow the borrower to not pay any collateral and receive the borrowAmount Proof of...

6.8AI score
SaveExploits0
Rows per page
Query Builder