Skip to content

feat: add Rosen Bridge FIRO ↔ rsFIRO swaps - #1470

Draft
reubenyap wants to merge 3 commits into
cypherstack:stagingfrom
reubenyap:codex/rosen-bridge
Draft

reubenyap wants to merge 3 commits into
cypherstack:stagingfrom
reubenyap:codex/rosen-bridge

Conversation

@reubenyap

@reubenyap reubenyap commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Replaces #1445 with the FIRO ↔ rsFIRO Rosen Bridge feature on current staging, after #1448 added rsFIRO through app-specific token defaults.

The bridge reuses the existing swap screens, estimates, wallet signing, trade storage and polling. It supports transparent FIRO deposits and rsFIRO ERC-20 deposits on Ethereum mainnet, exact integer fees, explicit quote refresh, and matching bridge events to the funded transaction. Signed bytes are saved before submission; interrupted or ambiguous submissions recover without creating a second deposit.

Scope is limited to this route. #1448's token catalog, app configuration and migration are unchanged, including existing token metadata and address casing. No new dependencies, CI changes, generic bridge framework or unrelated token setup. The shared swap form changes only register Rosen; existing reverse-estimate and rate-switching behavior is unchanged. Rosen's provider-level validation rejects reverse estimates. Recovery runs after existing provider polling so a stalled source node cannot hold up those updates. The shared wallet changes add a pre-broadcast persistence callback and reuse one validated FIRO data-output helper in both fee selection and construction.

Validation: 93 focused tests passed with Flutter 3.47.2 / Dart 3.13.2, covering the existing swap form and providers, Rosen fees/protocol/API/trades/recovery, token registration, FIRO signed-envelope checks, broadcast ordering, Ethereum fee caps/replaced transactions, Electrum/MWEB fees and Ethereum fee widgets. New widget tests reproduce the original receive-amount regression for ChangeNOW, Exolix and Trocador; a paused-node test reproduces the original polling delay. Both fail against the prior PR code and pass with the fixes. All 44 changed Dart files pass formatting; analysis reports no errors (existing warnings remain). Local tests used Flutter's data-only asset mode (FLUTTER_NATIVE_ASSETS=false FLUTTER_DART_DATA_ASSETS=true) to skip unrelated native coin compilation; application source and dependencies were not stubbed. Rosen production configuration 7.1.1 was reverified on 2026-10-08; protocol references and setup are documented in docs/rosen_bridge.md.

Draft pending full native/platform builds, interactive mobile/desktop checks and a small real-funds transfer in each direction. No live transfer was performed.

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.

1 participant