Submitted by hack3r-0m and cmichel
Consider the following state:
User calls shiftPositionFromLongNextPrice(marketIndex=1, amountSyntheticTokensToShift=100)
This results in following state changes:
Due to some other transactions, oracle updates twice, and now the marketUpdateIndex[1] is x+2 and also updating price snapshots.
When User calls getUsersConfirmedButNotSettledSynthBalance(user, 1)
initial condition:
will be true;
LongShort.sol L532
This uses price of current x+2 th update while it should balance of accounting for price of x+1 th update.
JasoonS (Float) confirmed and disagreed with severity:
0xean (judge) (judge) commented:
