DittoETH

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

LibShortRecord.disburseCollateral doesn't accrue ditto rewards

Summary

LibShortRecord.disburseCollateral doesn't accrue ditto rewards

Vulnerability Details

When user somehow changes collateral of short position then LibShortRecord.disburseCollateral function is called in order to accrue rewards for user.
This function calculates yield and sends it to short owner in case if enough time has passed.

Actually, this function does same as YieldFacet._distributeYield with 1 difference. YieldFacet._distributeYield function accrues ditto rewards as well, but LibShortRecord.disburseCollateral doesn't do that and as result user loses portion of ditto rewards.

Impact

User loses ditto rewards when change position.

Tools Used

VsCode

Recommendations

Accrue ditto rewards in same way as it's done in YieldFacet.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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