You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A zero-share deposit refund can deadlock with its epoch's reconciliation #434
fulfill commits floor(total_shares_redeeming × price) to committed. Each redeem claim pays floor(shares × price), so the claims can sum below the commitment. That cash dust leaves committed only in reconcile_if_settled, which waits for deposits_open == 0. A deposit claim that floors to zero shares is refunded behind refund_covered, which needs free_reserve >= amount. When the dust is the only free cash, the refund waits on reconciliation and reconciliation waits on the refund.
Steps to reproduce
The vault holds 11 asset units, including Carol's deposit of 1.
Alice and Bob each redeem 5 share units in the same epoch at a price of 1.1. Fulfil commits floor(10 × 1.1) = 11.
Alice and Bob each claim floor(5 × 1.1) = 5.
Carol's deposit floors to 0 shares. Her claim reverts with ClaimNotCovered.
Expected vs actual behavior
Expected: Carol gets her 1 unit back once both redemptions have settled. Actual: The unit stays in committed and her claim keeps reverting.
Raised in #359. Suggested fix from the thread: release the cash remainder once every redemption in the epoch has settled, tracked separately so the final reconciliation does not release it twice.
Activity