Rewrite protocol docs: add Relay Chain, Allocator, Mermaid diagrams, …#237
Rewrite protocol docs: add Relay Chain, Allocator, Mermaid diagrams, …#237
Conversation
…and legal language fixes Complete rewrite of the Settlement Protocol documentation section: - Add Relay Chain documentation (Chain ID 537713, Sovereign Stack, Celestia DA) - Add Allocator component docs (MPC chain signatures, Payload Builders) - Restructure from flat component pages to narrative-driven architecture - Add comprehensive flow walkthroughs (Execution, Settlement, Withdrawal, Revert) - Add 8 inline Mermaid sequence diagrams with interactive zoom/pan - Add Design Principles and Security & Audits pages - Add solver and app integration guides - Consolidate contract references and addresses - Separate Vaults as distinct protocol section - Apply legal language fixes (crosschain, revert, destination, asset terminology) - Add 13 URL redirects for old pages - Delete 8 obsolete files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Visual diagram showing the three chain roles in the protocol (Origin, Relay Chain, Destination) with components, actors, and cost annotations. Uses inline HTML/CSS for full visual control with brand purple styling, dark mode support, and responsive mobile layout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move Relay Chain into Components group, add Security Council and MPC Signing pages - Consolidate MPC content back into Allocator page - Create Contracts sidebar group (Addresses, EVM/SVM Depository Reference) - Rewrite Overview with 5 key dimensions (Speed, Cost, Capital Efficiency, Coverage, UX) - Restructure How It Works into Architecture + Flows sections with Mermaid diagrams - Add settlement flow image to Overview - Remove Design page, absorb relevant content into Overview - Update solver guide for direct protocol integration (not API) - Expand Addresses page with Relay Chain and Aurora contract placeholders - Update Security page to link to Security Council component - Clean up cross-references and internal links Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Link to Relay Chain instead of "dedicated low-cost settlement hub" - Remove Info callout, Source Code section, and redundant links from overview - Tighten Failure UX and Coverage copy - Clarify Hub and Allocator both live on Relay Chain in how-it-works Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…awal updates - Oracle reframed as pull-based: never initiates, only responds to requests - Settlement flow: solver requests attestation from Oracle, submits to Hub - Withdrawal flow: solver drives entire flow through Oracle - Add Refund flow: solver-initiated instant refund on origin, settled like a fill - Rename Revert flow to Forced Exit: user-initiated after fill window expires - Add solver abandon concept to shorten forced exit window - Update Oracle component page: request-response pipeline, five attestation types - Change all "revert" terminology to "refund" in user-facing docs - Simplify diagrams: merge Oracle validators/contract, remove NEAR MPC participant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eanup - Merge Fast Refund, Slow Refund, and Self Refund flows into the Architecture page - Replace TBD addresses with actual deployed contracts on Relay Chain and Aurora - Link contract addresses to block explorers (explorer.chain.relay.link, explorer.aurora.dev) - Remove bracketed annotations from security page headings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New protocol component page documenting the DepositFactory and DepositSweeper contracts that power counterfactual deposit addresses via EIP-1167 minimal proxies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
clemsos
left a comment
There was a problem hiding this comment.
some small comments but LG !
|
|
||
| ## Overview | ||
|
|
||
| The Allocator is the component responsible for authorizing withdrawals from [Depository](/references/protocol/components/depository) contracts. When a solver wants to claim funds they've earned by filling orders, the Allocator verifies their [Hub](/references/protocol/components/hub) balance and generates a cryptographic proof that the Depository will accept. |
There was a problem hiding this comment.
| The Allocator is the component responsible for authorizing withdrawals from [Depository](/references/protocol/components/depository) contracts. When a solver wants to claim funds they've earned by filling orders, the Allocator verifies their [Hub](/references/protocol/components/hub) balance and generates a cryptographic proof that the Depository will accept. | |
| The Allocator is the component responsible for authorizing withdrawals from [Depository](/references/protocol/components/depository). When a solver wants to claim funds they've earned by filling orders, the Allocator verifies their [Hub](/references/protocol/components/hub) balance and generates a cryptographic proof that the Depository will accept. |
There was a problem hiding this comment.
I think we need a consistent terminology for the two types of depositories. How about "Contract Depository" and "Wallet Depository". We can explain this on the in-depth Depository page, but elsewhere can just use the term "Depository" to describe both
|
Claude finished @julien51's task in 2m 23s —— View job Code Review: Protocol Documentation Rewrite
Excellent work — this is a major improvement over the previous flat structure. The narrative-driven architecture with component pages, Mermaid sequence diagrams, and clear flow walkthroughs is well-organized and thorough. Nearly all previous review feedback has been addressed. Previously Flagged Items — StatusAll critical items from prior reviews are resolved:
One Outstanding Item
Lines 60-80 describe the order address derivation (from chainId, depositor, timestamp, depositId), which is a different concept. The intent address derivation from Minor Nits
SummaryThe PR is in great shape. The only outstanding item from reviewer feedback is the intent address guidance in |
|
Claude finished @ptrwtts's task in 1m 36s —— View job Code Review: Protocol Documentation Rewrite
Excellent progress — nearly all review feedback from @julien51, @clemsos, and @ptrwtts has been applied. The documentation quality, structure, and Mermaid diagrams are in great shape. Previously Flagged Items — All Fixed
One Outstanding Item
The current text (lines 52-58) mentions the Explorer and uses Minor Nits (can be follow-up)
SummaryThe PR is in great shape — all critical and nearly all outstanding review items have been addressed. The only remaining item that @julien51 specifically called out as important is the intent address lookup guidance in |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @julien51's task in 1m 57s —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape. All critical issues from previous reviews have been resolved. Here's the full status: All Previously Flagged Issues — Resolved
Remaining Minor ItemsThese are non-blocking observations:
SummaryThe PR is ready to merge. All critical issues, duplicate text blocks, and agreed-upon reviewer suggestions have been applied. The documentation quality, narrative structure, Mermaid diagrams, and cross-linking are excellent throughout. The only remaining items are two minor "sweeper" → "DepositAddress" terminology leftovers in |
|
Claude finished @julien51's task in 1m 34s —— View job Code Review: Protocol Documentation Rewrite
All critical issues and agreed-upon reviewer feedback from previous rounds have been addressed. The documentation quality, narrative structure, Mermaid diagrams, and cross-linking are excellent throughout. Here's the full verification: All Previously Flagged Items — Resolved
Remaining Minor Items (non-blocking)
SummaryThe PR is ready to merge. All critical issues, duplicate text blocks, and agreed-upon reviewer suggestions have been applied. The writing quality and structure are excellent. The only remaining items are two minor "sweeper" → "DepositAddress" terminology leftovers in |
The Allocator contract has suspend(address) which revokes APPROVED_WITHDRAWER_ROLE from a specific address (callable by any single multisig member via onlyMultisigOwner). There is no global pause function. Updated all references across security-council, security, allocator, and oracle docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude encountered an error —— View job Code Review: Protocol Documentation Rewrite
|
The Allocator doesn't process withdrawal requests directly from solvers. A gateway contract (RelayAllocatorSpender) holds the sole APPROVED_WITHDRAWER_ROLE and requires a valid Oracle EIP-712 signature before forwarding to the Allocator. This means: - Oracle authorization is required for every withdrawal proof - Suspending the AllocatorSpender halts all withdrawals globally - Security Council 1-of-N suspend is effectively a global halt Updated allocator, security-council, security, and oracle docs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @julien51's task in 2m 25s —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape — all critical items and nearly all reviewer suggestions from previous rounds have been applied. The narrative-driven structure, Mermaid diagrams, and flow walkthroughs are a significant improvement. @julien51's final review dismissed with "ok I think this looks good!" All Previously Flagged Items — Resolved
Remaining Items
Minor Nits (non-blocking)
SummaryThe PR is ready to merge with only minor cleanup remaining — 3 "sweeper" → "DepositAddress" text replacements in |
|
Claude finished @julien51's task in 1m 39s —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape. All critical issues and nearly all reviewer suggestions have been addressed. Here's the full status: All Previously Flagged Items — Resolved
Remaining Items
Minor Nits (non-blocking)
SummaryThe PR is ready to merge with only minor cleanup remaining — 3 "sweeper" → "DepositAddress" text replacements in |
|
Claude finished @julien51's task in 1m 41s —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape. All critical issues from previous review rounds have been addressed. The narrative-driven structure, Mermaid diagrams, and flow walkthroughs are a major improvement. Here's the full status: All Previously Flagged Items — Resolved
Remaining Items
Minor Nits (non-blocking)
SummaryThe PR is ready to merge with only minor cleanup remaining — 3 "sweeper" → "DepositAddress" text replacements in |
|
Claude finished @julien51's task in 1m 20s —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape — all critical issues and nearly all agreed-upon reviewer suggestions have been applied across 8 review rounds. The narrative-driven structure, Mermaid diagrams, and flow walkthroughs are a major improvement. @julien51 dismissed with "ok I think this looks good!" All Previously Flagged Items — ResolvedDuplicate text blocks ✅ | ERC20View in relay-chain.mdx ✅ | DepositAddressFactory/DepositAddress heading renames ✅ | Single Remaining Items
Minor Nits (non-blocking)
SummaryThe PR is ready to merge with only minor cleanup remaining — 3 "sweeper" → "DepositAddress" text replacements in |
|
Claude encountered an error —— View job Code Review: Protocol Documentation Rewrite
The PR is in excellent shape. All critical issues and nearly all agreed-upon reviewer suggestions from previous rounds have been addressed. Here's the full verification: All Previously Flagged Items — Resolved
Remaining Minor Items (non-blocking)
SummaryThe PR is ready to merge. All critical issues, duplicate text blocks, and agreed-upon reviewer suggestions have been applied. The documentation quality, narrative structure, Mermaid diagrams, and cross-linking are excellent throughout. The only remaining items are a single Sui text mention in |
|
Claude finished @julien51's task in 1m 20s —— View job Code Review: Protocol Documentation Rewrite
Excellent work on this rewrite. The narrative-driven structure, Mermaid sequence diagrams, and component-focused pages are a massive improvement. I've read through all 27 changed files and verified the current state against all previous review rounds. All Previously Flagged Items — ResolvedEvery critical and agreed-upon reviewer suggestion from the 10+ previous review rounds has been applied: Duplicate text blocks ✅ | ERC20View in relay-chain.mdx ✅ | DepositAddressFactory/DepositAddress naming ✅ | Single Remaining Items
SummaryThe PR is in great shape — all critical issues and agreed-upon reviewer feedback have been addressed. The only actionable item remaining is the single Sui text mention in |

Complete rewrite of the Settlement Protocol documentation section: