Repository navigation
feat: add Recta action provider (second opinion on cross-chain stablecoin routes) - #1630
Open
Arquitekto wants to merge 1 commit into
Open
Arquitekto wants to merge 1 commit into
Arquitekto wants to merge 1 commit into
Conversation
Read-only second opinion on cross-chain stablecoin routes: coverage, saving odds and a trial comparison against the agent's own route. No signing, no sending, no API key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011DN7pdrtxb86pDZpoj8o74
🟡 Heimdall Review Status
|
This branch has not been deployed
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.
Description
Adds
RectaActionProvider, which lets an agent ask, before a cross-chain stablecoin transfer, whether a cheaper route than the one it would use can be proven at the same chain state.Actions:
check_route_coverage: whether the corridor from the wallet's network is covered and which bridges are compared.get_route_saving_odds: how often a saving was found against each bridge on that corridor.compare_bridge_route: for a planned transfer and the agent's own route (baselineProvider, e.g.stargate_v2), whether a saving can be proven, its lower bound in USDC, and the fee.The provider only reads. It never signs and never sends a transaction, and it needs no API key or configuration. The source network and sender are the wallet's own; gas caps come from the wallet's public client.
Pricing: the actions are free. Recta charges exactly 5% of a saving it verifies on chain, and only if the agent then executes Recta's route. No saving, nothing owed. Example from production: Ethereum USDC to Base, 6,000 USDC, declared route Stargate v2: saving found, lower bound 2.40 USDC.
Tests
rectaActionProvider.test.ts(fetch mocked): network support, schema, coverage, template filling with the wallet's address and fees, given recipient, uncovered corridor, refusal passthrough, network error, and that the wallet is never asked to sign or send.check_route_coverageandget_route_saving_oddsagainst the live API from Ethereum and Arbitrum wallets;compare_bridge_routesends the same request that returnedSAVING_FOUND2.39903 USDC for Ethereum to Base, 6,000 USDC vsstargate_v2.Checklist