Skip to content

A zero-asset redemption from a delisted holder stays stuck and keeps its epoch open #445

Open

Description

@hpmaxi

Description

A redemption that prices to zero assets settles by returning its shares at claim. If the holder is delisted, or the compliance rules refuse the transfer, before they claim, claim_redeem reverts with HolderNotEligible, because returning the shares needs an eligible holder. cancel_redeem reverts with AlreadyPriced. The shares stay in the vault's escrow until the holder is listed again or the vault winds down. Meanwhile the epoch keeps one open redemption and never reconciles, so its share dust stays pending and its cash dust stays counted as owed. The fix planned for #434 releases cash dust once every request in the epoch has settled, which never happens here.

Steps to reproduce

  1. A holder requests to redeem shares worth less than one unit of the deposit asset.
  2. The epoch is priced, and the request rounds down to 0 assets.
  3. Compliance delists the holder.
  4. The holder calls claim_redeem: it reverts with HolderNotEligible.
  5. The holder calls cancel_redeem: it reverts with AlreadyPriced.

Expected vs actual behavior

Expected: the request settles, and its epoch reconciles.
Actual: both calls revert, the shares stay escrowed, and the epoch keeps one open redemption.

Priority

Medium — rated Low on its own, but it has to ship with the fix for #434

Additional context

Found by the automated security sweep of tag tranche2 (commit db90b95), finding P0A. The path: redeem::claim → return_shares → deliver → guards::eligible_to_receive. A possible fix, untested: when the payout is zero and the holder cannot receive shares, burn the escrowed shares, as a wind-down claim already does.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingepic:contractsRust: port the reference and close the code deltaspriority: mediumtranche-3Grant Tranche 3 work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions