Repository navigation
feat(request): Tempo DEX funding from OUSD (stack 4/6) - #277
Draft
brendanjryan wants to merge 1 commit into
Draft
brendanjryan wants to merge 1 commit into
brendanjryan wants to merge 1 commit into
Conversation
This was referenced Oct 18, 2026
brendanjryan
force-pushed
the
brendan/machine-fetch-4-tempo-dex
branch
from
October 18, 2026 22:09
158e976 to
916974b
Compare
brendanjryan
force-pushed
the
brendan/machine-fetch-3-plan
branch
2 times, most recently
from
October 18, 2026 22:27
a36ebd2 to
bfb8336
Compare
brendanjryan
force-pushed
the
brendan/machine-fetch-4-tempo-dex
branch
2 times, most recently
from
October 19, 2026 15:41
aeb95fe to
8fa3fe0
Compare
brendanjryan
force-pushed
the
brendan/machine-fetch-3-plan
branch
from
October 19, 2026 15:41
bfb8336 to
e32c441
Compare
A Tempo charge in a listed USD token the wallet does not hold now buys it on the Tempo DEX in the same transaction, through machine-fetch's tempoDex and Mppx auto-swap, from OUSD, then USDC.e, then pathUSD, with slippage from --max-slippage-bps (default 50). The funder reads the balance first: a wallet that holds the token gets an available receipt and no swap, and one whose balance cannot be read pays as before. Before signing it refuses a swap the access key's stored limit cannot cover (E_LIMIT_EXCEEDED with the keys update cta) or no configured input can cover (E_INSUFFICIENT_FUNDS with the fund cta), since Mppx appends its own inputs. MACH settlement never swaps. --funding auto|tempo|off, TEMPO_FUNDING, and the funding config setting choose the mode; auto behaves as tempo until cross-chain funding lands. The receipt and --write-meta name the swap's input and maximum, and --dry-run reports the funder when the balance is short. The e2e harness pays an MPP charge in USDC from OUSD on the local chain.
brendanjryan
force-pushed
the
brendan/machine-fetch-4-tempo-dex
branch
from
October 19, 2026 21:48
8fa3fe0 to
f181bbd
Compare
brendanjryan
force-pushed
the
brendan/machine-fetch-3-plan
branch
from
October 19, 2026 21:48
e32c441 to
4a56d7b
Compare
brendanjryan
added a commit
that referenced
this pull request
Oct 20, 2026
The Tempo DEX funder took the first input the wallet held enough of, and only checked the access key's limit for it when the store recorded one. A key whose limits list leaves a token out cannot spend it on chain, so a wallet holding only pathUSD under a key limited to OUSD and USDC.e signed a swap the chain refused, reported against the payment token instead of pathUSD. The funder now skips inputs the key may not spend: the stored limit when the store has one, else the chain's (the remaining limit of a published limited key, and zero for a token an unpublished key's signed limits leave out). When no spendable input is held it refuses before signing and names the token, and the swap's inputs are pinned to the chosen one so Mppx cannot pick another. Fixes Phase 2 behavior (#277); found by the live mainnet run.
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.
4/6 — Phase 2. Pays a Tempo charge in a USD token the wallet lacks by buying it on the Tempo DEX from OUSD, USDC.e, or pathUSD in the same transaction (machine-fetch
tempoDex+ Mppx auto-swap,fallback: falseso the inputs are an allowlist — mppx-1).--funding auto|tempo|off,TEMPO_FUNDING, configfunding, and--max-slippage-bps. Refuses before signing a swap the access key's limit can't cover (keys update cta) or nothing held can cover (fund cta). Receipts and--dry-runreport the swap. e2e: pays from OUSD through an unpublished access key (needs mppx-3).Paired PRs
main): mppx-1 auto-swap allowlist and OUSD default feat(tempo): auto-swap allowlist (autoSwap.fallback) and OUSD in the default currencies wevm/mppx#1054 · mppx-3 auto-swap reads without the account fix(tempo): read auto-swap balances and quotes without the account wevm/mppx#1055wallet-cli vendors machine-fetch
main@ d168943 (0.3.0) and mppxbrendan/wallet-cli-needs@ 8295134 (mppx@0.12.0+ the commits merged upstream as 82810df and 0acc2bc), pinned by commit until we choose to upgrade.