In the documentation of this project, in the Litepaper section, yield mechanism state that a matched short record must age for two weeks before qualifying for yield distributions. Since the yield that is distributed also includes the earnings from all unmatched limit orders, it is possible the short position could be given a much larger windfall of yield above what was earned by the collateral in the short but then the implementation of this code distributeYield() doesn't infact check if the short record have mature enough and have reach that two weeks before qualifying for yield distribution. Although the distributeYield() calls _distributeYield() to distribute yield for the remaining order books after distributing yield for the first order book and then _claimYield() to claim all distributed yield, none of this private functions check if it has age up to two weeks. This result to a discrepancy between the documentation and the actual code
Rewards could be claimed too early by users and this can be bad for the protocol
Manual review
Add a check to prevent users from claiming rewards before the stipulated time
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.