Skip to content

feat: cap return-of-capital at holder cost basis (#535) - #712

Open
Ayinkx wants to merge 2 commits into
RevoraOrg:masterfrom
Ayinkx:feat/tax-bucket-cap
Open

feat: cap return-of-capital at holder cost basis (#535)#712
Ayinkx wants to merge 2 commits into
RevoraOrg:masterfrom
Ayinkx:feat/tax-bucket-cap

Conversation

@Ayinkx

@Ayinkx Ayinkx commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Closes #535


Enforces cap on tax-bucket return-of-capital distributions so they cannot exceed the holder's remaining cost basis. Any excess is reclassified.

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Ayinkx1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Ayinkx
Ayinkx force-pushed the feat/tax-bucket-cap branch from 882ab6f to 623bce1 Compare July 30, 2026 01:41
Ayinkx and others added 2 commits July 31, 2026 14:07
- Make DataKey2 pub(crate) so #[contracttype] skips XDR spec generation;
  the enum exceeds the 40-case SC_SPEC_UDT_MAX_CASES union limit and the
  derive panics with LengthExceedsMax.
- Define MAX_PROOF_DEPTH in merkle_helpers.rs and re-export from lib.rs so
  crate::merkle_helpers::MAX_PROOF_DEPTH imports resolve.
- Drop duplicate EVENT_PROOF_REJECT_DEPTH const (proof_reject_depth).
- Drop duplicated mod declarations for test_close_period,
  test_compute_share_decomposition_prop and test_merkle_root_rotation.
- Remove duplicate setup_offering shim in test_close_period.rs and fix
  setup_offering_with_contract_id to use the 10-arg register_offering
  signature.
- cargo fmt compliance.
@Ayinkx
Ayinkx force-pushed the feat/tax-bucket-cap branch from 623bce1 to f63e3a0 Compare July 31, 2026 21:27
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.

Add tax-bucket cap enforcement so return-of-capital does not exceed holder cost basis

2 participants