Skip to content

Feat: mentorship, skill verification, charity split & tax strategies (#884, #885, #886, #887) - #981

Open
olivia-brien wants to merge 4 commits into
Stellar-split:mainfrom
olivia-brien:feat/issues-884-885-886-887
Open

olivia-brien wants to merge 4 commits into
Stellar-split:mainfrom
olivia-brien:feat/issues-884-885-886-887

Conversation

@olivia-brien

@olivia-brien olivia-brien commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary

This PR adds four new standalone Soroban contracts to the workspace. Each follows the existing invoice-escrow layout (lib.rs, errors.rs,
types.rs, test.rs), uses typed contracterror errors, emits events for every state change, and comes with its own unit tests.

Changes

#884 – On-chain creator mentorship program (contracts/mentorship)

  • Mentors register with an expertise, a revenue share (≤ 30%) and a mentee capacity; they can update their terms, and the admin can suspend them.
  • Programs follow the lifecycle request → accept/decline → active → complete/cancel, with a fixed term in ledgers.
  • During a program, mentors log sessions and mentees route the mentor's revenue share of their earnings through share_earnings.
  • After completion, mentees can rate the mentor (1–5), and mentor stats are tracked on-chain.
  • Events: mentor / reg, updated, suspend, requested, accepted, declined, session, shared, completed, cancelled, rated

#885 – Recipient skill verification (contracts/skill-verification)

  • Recipients submit skill claims backed by an evidence hash, and can withdraw them while pending.
  • The admin appoints verifiers per skill. Verifiers approve claims at a level (1–5) with an expiry, or reject them with a reason hash. Self-verification
    is blocked.
  • Attestations can be revoked by the issuing verifier or the admin.
  • Views for gating recipients: is_skill_verified, get_skill_level, meets_requirement, all_meet_requirement.
  • Events: skill / verifier, claimed, withdrawn, verified, rejected, revoked

#886 – Invoice charity donation split (contracts/charity-split)

  • The admin maintains a registry of vetted charities and can activate or deactivate them.
  • An invoice donates a configurable share (1–5000 bps) of each recipient's payout to its chosen charity; rounding dust also goes to the charity.
  • Invoices release automatically once fully funded. Payers can make extra donations, and creators can cancel an invoice, after which payers claim
    refunds.
  • Per-charity and per-donor donation totals are tracked, and preview_split shows payouts before release.
  • Events: charity / reg, status, created, paid, released, donated, cancelled, refunded

#887 – Creator tax optimization strategies (contracts/tax-strategy)

  • Each income payment is split into an optional pre-tax deduction, a tax reserve, and the creator's net amount.
  • The reserve can be computed three ways: a flat rate, creator-defined marginal brackets, or admin-published bracket templates.
  • Brackets apply to cumulative income within a configurable tax period; when a period ends it rolls over and its totals are archived.
  • estimate and estimate_config let creators compare strategies before switching.
  • The contract never holds funds; all transfers go directly to their destinations.
  • Events: tax / tmpl_set, tmpl_del, strategy, removed, income, period

Other

  • Added all four crates to the workspace members in Cargo.toml.
  • Existing contracts are unchanged.

Closes #884
Closes #885
Closes #886
Closes #887

olivia-brien and others added 4 commits October 17, 2026 16:20
Add a standalone mentorship contract where creators register as mentors
(expertise, revenue share, mentee capacity) and mentees request time-boxed
programs. Mentors accept/decline, log sessions, and receive a locked-in
share of mentee earnings during the term. Programs can be completed or
cancelled, completed programs can be rated, and admins can suspend mentors.
All transitions emit events under the `mentor` topic.

Closes Stellar-split#884

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a standalone skill-verification contract. Recipients submit skill
claims with an evidence hash; admin-appointed, skill-scoped verifiers
approve them at a proficiency level (1-5) with an expiry, or reject them
with a reason hash. Attestations can be revoked by the issuing verifier
or admin. Views (is_skill_verified, get_skill_level, meets_requirement,
all_meet_requirement) let the split contract gate recipient lists.
All state changes emit events under the `skill` topic.

Closes Stellar-split#885

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a standalone charity-split contract. The admin maintains a registry
of vetted charities; creators open invoices with a recipient split, a
chosen active charity and a donation share (1-5000 bps). When fully
funded, the invoice auto-releases: each recipient gets their gross amount
minus the donation share, and the charity receives the deductions plus
rounding dust. Payers can send extra donations straight to the charity,
creators can cancel open invoices, and payers then claim refunds.
Per-charity and per-donor totals are tracked; preview_split shows the
outcome ahead of release. All state changes emit `charity` events.

Closes Stellar-split#886

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a standalone tax-strategy contract that routes creator income at
payment time: an optional pre-tax deduction (retirement/business bucket)
lowers taxable income, a tax reserve is computed with a flat rate,
creator-defined marginal brackets, or admin-published bracket templates,
and the remainder goes to the creator. Brackets apply to cumulative
income within a configurable tax period, which rolls over and archives
the previous period's totals. estimate/estimate_config let creators
compare strategies before switching. Funds are never custodied. All
state changes emit events under the `tax` topic.

Closes Stellar-split#887

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@olivia-brien 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

@olivia-brien olivia-brien changed the title Feat/issues 884 885 886 887 Feat: mentorship, skill verification, charity split & tax strategies (#884, #885, #886, #887) Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant