Skip to content

fix(solana): provision fresh synthetics + correct value model (v0.2.1) - #8

Merged
anil-rome merged 1 commit into
mainfrom
fix-solana-lane-provisioning
Jul 19, 2026
Merged

fix(solana): provision fresh synthetics + correct value model (v0.2.1)#8
anil-rome merged 1 commit into
mainfrom
fix-solana-lane-provisioning

Conversation

@anil-rome

Copy link
Copy Markdown
Contributor

What

Makes the Solana lane work for a brand-new Solana user, and corrects the value model. Both gaps surfaced funded-testing the lane end-to-end with a genuinely fresh wallet.

  1. Fresh-synthetic provisioning was missing. A new synthetic's external_auth PDA doesn't exist until create_pda runs, and value-moving calls (the sweep's transfer_spl, ERC20SPL transferFrom) are PDA-signed — so they revert until it's provisioned. The v0.2.0 lane never created it. (The original deposit test only passed because that synthetic was already provisioned and had leftover balance — invisible until a truly fresh wallet.)

  2. The value model. A Solana user's spendable balance is their wallet's SPL token account, surfaced 1:1 as the ERC20SPL wrapper (e.g. wUSDC) — moved with transfer / transferFrom, not native msg.value (the fund leg fills the token account, not the EVM native balance).

Changes

  • provisionSynthetic / isSyntheticProvisioned / buildCreatePdaCall
  • submitRomeTxSolanaLane auto-provisions (create_pda) on first use — autoProvision defaults on; pass autoProvision: false to run your own one-time "Activate" step
  • README: corrected the spendable-balance model + the provisioning note
  • 0.2.00.2.1

Verification

  • tsc clean · 66/66 tests (+3 provisioning) · lint clean
  • Funded round-trip on Hadrian, brand-new wallet: provisioned? false → autoProvision fired create_pda → true; deposited into an ERC20SPL vault via transferFrom, withdrew, swept the full amount back to the wallet — synthetic ended holding nothing.

Companion docs update (dual-lane walkthrough → ERC20SPL model + Activate step) is a separate PR to the docs.

A brand-new Solana user's synthetic external-auth PDA doesn't exist until
create_pda runs, and value-moving calls (the transfer_spl sweep, ERC20SPL
transferFrom) are signed by it — so they revert until it's provisioned.

- add provisionSynthetic / isSyntheticProvisioned / buildCreatePdaCall
- submitRomeTxSolanaLane auto-provisions on first use (autoProvision
  defaults on; opt out for an explicit Activate step)
- README: a Solana user's spendable balance is the wallet ATA surfaced as
  the ERC20SPL wrapper, moved with transfer/transferFrom, not native msg.value
- 0.2.0 -> 0.2.1

Funded-verified on Hadrian: a fresh wallet auto-provisions, deposits into an
ERC20SPL vault via transferFrom, withdraws, and sweeps back — the synthetic
ends holding nothing. 66/66 tests.
@anil-rome
anil-rome merged commit 06f1b1c into main Jul 19, 2026
6 checks passed
@anil-rome
anil-rome deleted the fix-solana-lane-provisioning branch July 19, 2026 21:53
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