feat: position shares, multi-token, dispute resolution, partial repayment - #705
Merged
levi0005 merged 2 commits intoAug 29, 2026
Merged
Conversation
…tial repayment - Add PositionShare/ShareSaleOffer/Dispute types and events - Implement split_position, transfer_share, list/buy_share in financing_pool - Add repay_partial for immediate pro-rata yield distribution - Create dispute_resolution contract with open_dispute/submit_evidence/resolve_dispute - Integrate dispute check into financing_pool mark_default - Update all test setups for new initialize signature - Add multi-token support tests Closes OpenLedger-Foundation#563, OpenLedger-Foundation#564, OpenLedger-Foundation#565, OpenLedger-Foundation#566
|
@henrypeters 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements four feature requests with minimal contract changes:
split_position,transfer_share,list_share_for_sale, andbuy_share. Sum of shares is enforced against the original contributed amount.dispute_resolutioncontract withopen_dispute,submit_evidence, and governance-gatedresolve_dispute.financing_pool::mark_defaultnow blocks when an open dispute exists.repay_partialcall that tracks cumulativerepaid_amountand distributes yield pro-rata immediately on each tranche.Key files
contracts/financing_pool/src/lib.rs— split/transfer/share sale/buy/repay_partial, share-awaredistribute_yield, dispute gate inmark_default.contracts/shared/src/types.rs—PositionShare,ShareSaleOffer,Dispute.contracts/shared/src/events.rs— share and dispute events.contracts/shared/src/errors.rs— new error variants.contracts/dispute_resolution/src/lib.rs— new contract.contracts/marketplace/src/lib.rs— minor test-setup updates.Testing
initializesignature.Closes #563
Closes #564
Closes #565
Closes #566