4 matches found
initialMarket always initialize the latest market
Handle jonah1005 Vulnerability details Impact In longshort contract's initializeMarket, while it should initialize according to the parameter marketIndex, it initialize latestMarket. This would break two market, the market of marketIndex' and the latest market. User's fund would get stuck at the...
initializeMarket uses wrong market index for synthetic
Handle cmichel Vulnerability details The LongShort.initializeMarket function accepts a marketIndex parameter to identify which market should be initialized. However, this index is not used everywhere, when calling IStakerstaker.addNewStakingFund the latestMarket variable is used. In the...
Incorrect shift variable is reset in LongShort
Handle shw Vulnerability details Impact The logic at lines 1187 to 1208 of LongShort is to handle the user's shift from SHORT to LONG. However, at line 1207, the number of tokens to be shifted from LONG is reset to 0 instead of SHORT, causing incorrect accounting of LONG and SHORT tokens. Proof o...
Short shift is not cleared
Handle cmichel Vulnerability details The LongShort.batchConfirmOutstandingPendingActions function uses the batchedamountSyntheticTokentoShiftAwayFrommarketSidemarketIndexfalse field to determine how much short tokens to shift to long tokens. However, this field is not cleared, instead, the long...