DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: high
Invalid

Reward could be claimed too early

Summary

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

Impact

Rewards could be claimed too early by users and this can be bad for the protocol

Tools Used

Manual review

Recommendations

Add a check to prevent users from claiming rewards before the stipulated time

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.