Lucene search
+L

386 matches found

Code423n4
Code423n4
added 2022/10/30 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.17 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.8 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.15 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.17 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
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.14 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
Exploits0
Code423n4
Code423n4
added 2022/09/08 12:0 a.m.9 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
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.18 views

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

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.12 views

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

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.17 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
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.7 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
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.10 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
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.15 views

Not calling approve(0) before setting a new approval might cause reverts when used with Tether (USDT)

Lines of code Vulnerability details Impact Some tokens do not implement the ERC20 standard properly but are still accepted by most code that accepts ERC20 tokens. For example Tether USDT's approve function will revert if the current approval is not zero, to protect against front-running changes o...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.14 views

Users will never receive their borrow amount after tx the collateral

Lines of code Vulnerability details Impact You are not able to receive any borrowed amount after adding addCollateral Proof of Concept By invoking addCollateral you will transfer an amount of collateralAmount to the Pair But you will receive any borrowed amount Recommended Mitigation Steps Invoke...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.14 views

Anyone can deploy a pair with a potentially malicious token

Lines of code Vulnerability details By allowing anyone to create a pair with any two tokens there is a risk that an unsavory token will get included either as collateral or as an asset. It could range from a bad actor intentionally inserting a malicious token to a well-intentioned team that...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/08/17 12:0 a.m.19 views

Able to remove all collateral after borrow

Lines of code Vulnerability details Assuming to borrow asset tokens from a pair contract a user must first deposit collateral tokens. After they deposit collateral tokens their userCollateralBalance increases and they can then call borrowAsset to receive asset tokens from the contract. The...

6.6AI score
Exploits0
Rows per page
Query Builder