Skip to content

docs: architecture diagram of stream accrual and cascade routing (closes #15) - #19

Open
NePreby wants to merge 3 commits into
Flow-Pulse:mainfrom
NePreby:docs/architecture-diagrams
Open

NePreby wants to merge 3 commits into
Flow-Pulse:mainfrom
NePreby:docs/architecture-diagrams

Conversation

@NePreby

@NePreby NePreby commented Nov 6, 2026

Copy link
Copy Markdown

Summary

Closes #15.

Adds comprehensive technical architecture documentation and Mermaid diagrams in docs/architecture.md, linked directly from README.md:

  1. System Overview: End-to-end component interaction between the Web UI, CI/CD bounty runner, client-side JCS verifier, Soroban smart contracts (StreamRouter, CascadeSplitter), and Stellar Asset Contracts (SAC).
  2. StreamRouter Accrual & Checkpointing:
    • Formal mathematical derivation of $streamed(t)$ and $withdrawable(t)$.
    • Idle gap protection upon top_up: checkpointing formula ensuring recipients are not credited for exhausted intervals.
    • Mermaid sequence diagram depicting lifecycle: stream escrow creation, continuous accrual, recipient withdrawal, dry-run top-up checkpointing, and cancellation split settlement.
  3. CascadeSplitter Recursive Routing:
    • Tree cascade mechanics: basis points allocation ($10{,}000$ BPS total, max 32 splits, max depth 3).
    • Conservation of funds invariant: rounding dust and unallocated reserves settle with the table owner at each depth level ($\sum payouts = amount$).
    • Mermaid flowchart of the recursive route() algorithm with cycle termination.
    • Concrete example graph showing multi-hop downstream settlement.
  4. Audit Receipts Architecture:
    • RFC-8785 (JCS) canonicalization pipeline with SHA-256 digests and Horizon ledger anchor verification.

Payout Wallet:

  • TRX Tron (TRC20): TMqmJjRgVS21NL2eFtfyHciTxvE4BqGmEv

This branch has not been deployed

No deployments
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.

Docs: architecture diagram of stream accrual and cascade routing

1 participant