Short IDs are recycled and reused when short position are canceled or closed. This might causes inconsistencies or causes conflicts.
in the Library contract LibShortRecord.sol , the function setShortRecordIDs L227-L281.
The function checks if there are previously cnaceled short positions and reuse their IDs when available. In case if its not canceled it increments the ID to create a new short record. Although this mechanism might optimize gas usage but in case if the number of the short ids exceeds this might introduce race condition.
The impact could lead to data integrity problems, when the short id is reused it may still be referenced for example in LibOrder.sol library, this could result in data inconsistency. Also if the short record id s used quickly this could introduce race condition.
Manual Analysis
Ensure proper management of recycle short ids and implement time-delay mechanism for short id reuse.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.