Lucene search
K

10 matches found

Code423n4
Code423n4
added 2022/11/28 12:0 a.m.8 views

user fund lose in deposit() of PirexERC4626 contract because A MALICIOUS EARLY USER/ATTACKER CAN MANIPULATE THE VAULT’S PRICEPERSHARE TO TAKE AN UNFAIR SHARE OF FUTURE USERS’ DEPOSITS

Lines of code Vulnerability details Impact This is a well-known attack vector for new contracts that utilize pricePerShare for accounting. Attacker can cause totalAssets / totalSupply ratio to go as high as he wants and then because of rounding error in convertToShares lower amount of share would...

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

BathToken.sol A malicious early user/attacker can manipulate the vault's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details function deposituint256 assets, address receiver internal returns uint256 shares uint256 pool = underlyingBalance; uint256 before = underlyingToken.balanceOfaddressthis; // Assume caller is depositor underlyingToken.transferFrommsg.sender, addressthis, assets;...

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

BathPair.sol#rebalancePair() can be front run to steal the pending rebalancing amount

Lines of code Vulnerability details function underlyingBalance public view returns uint256 uint256 pool = IERC20underlyingToken.balanceOfaddressthis; return pool.addoutstandingAmount; function removeFilledTradeAmountuint256 amt external onlyPair outstandingAmount = outstandingAmount.subamt; emit...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/03/19 12:0 a.m.8 views

[WP-H3] A malicious early user/attacker can manipulate the Collateral contract's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details function deposituint256 amount external override nonReentrant returns uint256 ... uint256 shares = 0; if totalSupply == 0 shares = amountToDeposit; else / of shares owed = amount deposited / cost per share, cost per share = total supply / total value. / shares ...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/10/30 12:0 a.m.9 views

Null check in pricePerShare

Handle hack3r-0m Vulnerability details oracle can 0 as a price of the share, in that case, 0 will be the denominator in some calculations which can cause reverts from SafeMath for e.g here: resulting in Denial Of Service. Add a null check to ensure that on every update, the price is greater than ...

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

No sanity check on pricePerShare might lead to lost value

Handle kenzo Vulnerability details pricePerShare is read either from an oracle or from ibBTC's core. If one of these is bugged or exploited, there are no safety checks to prevent loss of funds. Impact As pricePerShare is used to calculate transfer amount, a bug or wrong data which returns smaller...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/10/30 12:0 a.m.10 views

pricePerShare might become stale and cause to lose user funds, as update is not enforced

Handle kenzo Vulnerability details In WrappedIbbtcEth, as the code says, updatePricePerShare must be called once in a while to ensure pricePerShare is up to date. However the contract is not enforcing or validating it in any way. If for example the external server that runs the periodic update...

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

WrappedIbbtcEth contract will use stalled price for mint/burn if updatePricePerShare wasn't run properly

Handle hyh Vulnerability details Impact Malicious user can monitor SetPricePerShare event and, if it was run long enough time ago and market moved, but, since there were no SetPricePerShare fired, the contract's pricePerShare is outdated, so a user can mint with pricePerShare that is current for...

7AI score
Exploits0
Code423n4
Code423n4
added 2021/10/29 12:0 a.m.6 views

hard to clear balance

Handle jonah1005 Vulnerability details Impact The contract does not allow users to transfer by share. It's hard for users to clear out all the shares. There will be users using this token with Metamask. There's likely the pricePerShare would increase after the user sends transactions. I consider...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2021/10/29 12:0 a.m.7 views

Ethereum wibBTC price per share dependant on being updated every X time, but contract has no checks whether price is updated

Handle loop Vulnerability details The price of pricePerShare in WrappedIbbtcEth.sol is dependant on two things: The pricePerShare of core. updatePricePerShare being invoked every X time to update the pricePerShare of wibBTC. The only time updatePricePerShare is invoked inside the contract is duri...

6.8AI score
Exploits0
Rows per page
Query Builder