Lucene search
+L

117 matches found

Code423n4
Code423n4
added 2022/12/19 12:0 a.m.9 views

Tokens are expected to have 18 decimals but not all have them

Lines of code Vulnerability details Tokens are expected to have 18 decimals but not all have them Summary Pairs doesn't consider tokens with less or more than 18 decimals Impact Tokens not compatible Proof of Concept Mitigation Don't use hardcoded 18 decimals --- The text was updated successfully...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/12/16 12:0 a.m.18 views

Token decimals may be above 18 leading to underflow issues

Lines of code Vulnerability details Impact In both StableVault and Trading, there is an assumption that token decimal amounts are =18. However this can break if token decimals are 18, resulting in underflow which can lead to unpredictable behaviors, and extreme amounts during deposits and...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.9 views

Mint might result in too few tokens minted

Lines of code Vulnerability details mint of PrePOMarket.sol allows the team to mint new short and long tokens in exchange for collateral tokens. Long and short tokens are default ERC20 tokens with 18 decimals, while the collateral ERC20 token uses the decimals of the underlying base token. Howeve...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/11/10 12:0 a.m.19 views

Chainlink USD price feeds can have more than 8 decimals

Lines of code Vulnerability details Impact Collateral value is overestimated by orders of magnitude if asset that has a chainlink oracle USD price feed with more than 8 decimals is added. A borrower can borrow much more than allowed in an EscrowedLine Proof of Concept In Oracle.sol the USD price...

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

Legitimate token / USD pairs with more than 8 decimals are not handled correctly

Lines of code Vulnerability details Impact The decimals returned by the Chainlink oracles are assumed to be 8 throughout this protocol. However, there are legitimate token / USD pairs that have the corresponding Chainlink oracles to return more than 8 decimals; for example, the AMPL / USD pair's...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.15 views

Oracle's getPrice() returns the wrong price in certain combinations of oracle feed and token decimals

Lines of code Vulnerability details Impact The oracle's getPrice returns a price that is off by several orders of magnitued depending of the combination of decimals for the Chainlink's pricefeed and underlaying token's pricefeed Actually it based on the decimals set when adding the feed tot he...

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/10/30 12:0 a.m.13 views

The decimal calculation is wrong for tokens with decimals < 18, it will highly inflate the price.

Lines of code Vulnerability details Impact The decimal calculation is wrong for tokens with decimals 18, it will highly inflate the price. Every function that uses oracle price such as borrow and liquidation will be wrong for tokens with decimals 18. Proof of Concept uint8 decimals = 36 -...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.7 views

Consideration of tokens with decimals higher than 18

Lines of code Vulnerability details Impact Oracle contract has 2 functions - viewPrice & getPrice - to get the price through the Chainlink price feed in DOLA. Both functions check the decimals of the feedDecimals answer by calling feed.decimals and calculate the price by 36 - feedDecimals -...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/10/30 12:0 a.m.15 views

Wrong reward calculation when reward token's decimals are different than 18

Lines of code Vulnerability details Impact When a user creates a pledge, she can specify the maximum amount of the Total Rewards and the maximum amount of fee amount she is willing to spend. By using the rewardPerVote, the vars.votesDifference and the vars.duration the smart contract calculates...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/09/19 12:0 a.m.15 views

Problems with PegOracle

Lines of code Vulnerability details Impact There are at least a few problems with the PegOracle. I am grouping them into one submission because some of them are not that significant but the last one I believe deserves a higher severity. 1. Function latestRoundData queries getOracle2Price but...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/09/12 12:0 a.m.9 views

Low precision in exchange rates

Lines of code Vulnerability details Impact When set the cTokenExchangeRates the requiere checks how the rate it's greater than 1e10 Some tokens hace different decimals, like USD Coin who haves 6 decimals This gives the posibility to have a rate lower than 1e10 Proof of Concept baseToken haves 18...

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

Unending and Eventually Futile TRIBE Redemption

Lines of code Vulnerability details Impact TRIBE holders can redeem for pro rata share of remaining DAO controlled assets according to TIP-121 proposal. In the light of this, users would rush into redeeming their TRIBE before the balances of each tokensReceived held on this contract run out...

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

Miscalculation for cUSDT and cUSDC

Lines of code Vulnerability details Impact getUnderlyingPrice stated that it would return the underlying price of the assets as a mantissa scaled by 1e18. However, the arithmetic setup on lines 503 and 507 could result in answers not scaled by 1e18. Proof of Concept 1e18 1e18 / 10 decimals is...

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

setPeriodSize need check for value range

Lines of code Vulnerability details Impact If periodSize is mistakenly set too small, 0 or a small value, the price oracle might be easier to manipulate. As a consequence, multiple functionality depending on oracle price feed may lose accuracy, and even incur large fund loss. Proof of Concept The...

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

There is a problem with price calculation using BaseV1Pair._getAmountOut.

Lines of code Vulnerability details Impact Currently, it calculates token price with the amount of decimals here and normalizes using 1e18 after that. There are some irregular tokens with small decimals and the token price might be calculated wrongly. Proof of Concept As we can see here, some...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/09/01 12:0 a.m.13 views

_getPriceDecimals() can return wrong decimal

Lines of code Vulnerability details Impact The decimal returned from function getPriceDecimals is used in function activate to create bond market. If the decimal is not accurate, the price for bond can be wrong, could result in: too low price: abnormal arbitrage opportunity and fund loss to the...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/07/14 12:0 a.m.11 views

percsion error that causes buyoutprice to be very low causing the fractionPrice very low or very high

Lines of code Vulnerability details percsion error that causes buyoutprice to be very low causing the fractionPrice very low detials how does buyout become realy low? because of this percison error in the code if you supply msg.value=1 depsitAmount=1 totalSupply=5 1. also there is a possiblity th...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/07/08 12:0 a.m.9 views

No check for stale chainlink oracle data in currentPrice function

Lines of code Vulnerability details Impact There is no check if the value of price returned by chainlink latestRoundData is latest or stale. If stale price is returned, it may result in wrong calculation used further, and in JBPrices.sol Proof of Concept Contract : JBChainlinkV3PriceFeed.sol Line...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/19 12:0 a.m.13 views

Tokens with decimals larger than 18 are not supported

Lines of code Vulnerability details For tokens with decimals larger than 18, many functions across the codebase will revert due to underflow. function getPriceFromDexaddress tokenAddress public view returns uint256 PriceInfo storage priceInfo = priceRecordstokenAddress; if priceInfo.active uint25...

6.9AI score
Exploits0
Rows per page
Query Builder