LibShortRecord.disburseCollateral doesn't accrue ditto rewards
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.
User loses ditto rewards when change position.
VsCode
Accrue ditto rewards in same way as it's done in YieldFacet
.
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.