Submitted by TrungOre
vToken.sol#L160
Users can get the wrong amount of vToken
=> Make users lose their fund
Base on the code in function shareChange() in vToken.sol
Assume that if oldShare = totalSupply > 0,
= (_amountInAsset * (_totalSupply - oldShares)) / (_assetBalance - availableAssets);
= (_amountInAsset * (_totalSupply - _totalSupply)) / (_assetBalance - availableAssets);
= 0
It make no sense, because if amountInAsset >> availableAssets, newShares should be bigger than oldShares, but in this case newShares = 0 < oldShares
Modify the line from if (_totalSupply > 0) to if (_totalSupply - oldShares > 0).
olivermehr (Phuture Finance) disputed
jn-lp (Phuture Finance) commented:
moose-code (judge) commented:
JasoonS (judge) commented:
For this contest, 25 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by IllIllI received the top score from the judge.
The following wardens also submitted reports: defsec, robee, abhinavmir, Dravee, hyh, joestakey, Tadashi, Kenshin, foobar, gzeon, 0xkatana, kenta, minhquanym, xpriment626, TerrierLover, 0v3rf10w, 0xDjango, ellahi, fatima_naz, oyc_109, rayn, sseefried, z3s, and kebabsec.
