Repository navigation
feat(contracts): implement anti-mev protection, bounty board, dynamic drm licensing, and reputation decay - #1700
Merged
ayomideadeniran merged 2 commits intoOct 19, 2026
Conversation
… drm licensing, and reputation decay - [SC-035] Anti-MEV Sandwich Protection (Closes StellarDevHub#1656) - Implements user-defined deadlines, strict slippage enforcement, and same-block bidirectional trade restrictions in AMM. - [SC-036] Decentralized Bounty Board (Closes StellarDevHub#1657) - Adds bounty lifecycle escrow, milestone proof claims, collaborative multi-contributor split payouts (bps), and 100% funder refunds on expiry. - [SC-040] Dynamic Licensing & DRM Contract (Closes StellarDevHub#1661) - Adds curriculum copyright hash registration, commercial license voucher minting, direct creator royalty forwarding, and license validation. - [SC-041] Decentralized Reputation Scoring with Decaying Trust (Closes StellarDevHub#1662) - Implements integer exponential decay R_t = R_0 * 2^(-t/T) over 6-month epochs, reputation scoring caps, and transparent audit events with reasoning codes. Closes StellarDevHub#1656, Closes StellarDevHub#1657, Closes StellarDevHub#1661, Closes StellarDevHub#1662
|
@adeniran19-maker is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@adeniran19-maker 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 of Changes
This PR resolves issues #1656, #1657, #1661, and #1662 across the smart contract suite.
1. [SC-035] Anti-MEV Sandwich Protection (Closes #1656)
contracts/amm/src/anti_mev.rsadding user-defined deadline verification (DeadlineExceeded), strict minimum output slippage checks, and same-block bidirectional trade restriction (SameBlockBidirectionalTrade).DataKey::TradeRecord(Address).tests/fuzz_amm.rs.2. [SC-036] Decentralized Bounty Board (Closes #1657)
contracts/freelance-platform/src/bounty.rssupporting bounty creation, escrow locking, single contributor milestone claims, and multi-contributor collaborative claims with split basis points summing to 10,000.verify_and_payoutwith proportional payouts andclaim_refundgranting 100% funder refunds after expiration.3. [SC-040] Dynamic Licensing & DRM Contract (Closes #1661)
contracts/content_management_system/src/drm.rsfor on-chain curriculum copyright registration.contracts/content_management_system/src/licensing.rsfor setting license terms, minting time-limited cryptographic license vouchers, directly forwarding royalty payments to course authors, and providingis_license_validcheck and revocation support.4. [SC-041] Decentralized Reputation Scoring with Decaying Trust (Closes #1662)
contracts/sybil_resistance/src/decay.rsimplementing exponential time decay formula without floating point arithmetic (R_t = R_0 * 2^(-t / T)) over 6-month epochs (180 days).contracts/sybil_resistance/src/reputation.rscapping scores at 10,000, supporting reputation increments with transparent reasoning codes (CourseCompletion,PeerReview,HackathonWin,TimeDecay,AdminAdjustment), and emitting audit events.Verification
All 64 tests across all 4 touched packages passed cleanly:
amm: 22 unit tests + 2 fuzz tests passingcontent-management-system: 23 unit tests passingfreelance-platform: 10 unit tests passingsybil-resistance: 7 unit tests passingCloses #1656
Closes #1657
Closes #1661
Closes #1662