Skip to content

feat: prorate early exit penalty#538

Closed
dangelo352 wants to merge 2 commits into
Commitlabs-Org:masterfrom
dangelo352:feature/pro-rata-early-exit-464
Closed

feat: prorate early exit penalty#538
dangelo352 wants to merge 2 commits into
Commitlabs-Org:masterfrom
dangelo352:feature/pro-rata-early-exit-464

Conversation

@dangelo352

Copy link
Copy Markdown

Summary

  • Implements pro-rata early-exit penalties for commitment_core based on remaining commitment duration.
  • Keeps penalties in CollectedFees(asset) for FeeRecipient withdrawal, matching the existing fee architecture.
  • Adds stable early_exit_settled event payload with amount, penalty, and elapsed_ratio_bps while preserving the legacy EarlyExt event.
  • Documents the formula and fee routing in docs/EARLY_EXIT.md and docs/FEES.md.

Fixes #464.

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-prorata-exit-target cargo test -p commitment_core prorata -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-prorata-exit-target cargo test -p commitment_core fee -- --nocapture

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement pro-rata early-exit penalty in commitment_core::early_exit

2 participants