feat(opp): add SYNDICATE_LIQ / LIQ_YIELD / DESYNDICATE_LIQ attestation types (simple_swap) - #609
Conversation
|
LGTM — one comment request, one question. This unblocks the yield design's stated blocker (committed attestation types + messages). Verified the deferral claim, since it's the one that'd be dangerous if wrong: Request: document what
|
1bc17dd to
80e907b
Compare
|
Thanks — both points land. Doc request: applied in the proto itself, folded into the single commit ( Onboarding gate: agreed this is decided by where the depot ledger lands, so it goes on that PR. My recommendation there: the gate reads both ledgers rather than syndication writing into Dilution note: agreed, considered-and-accepted. The per-holder timestamp costs more than the 0.02%/window it protects. |
80e907b to
74eadd7
Compare
|
Pushing back on the asymmetric reading after discussing it with David: both The reasoning cuts the other way from the request. A de-syndication is not an arbitrary transfer destination — it pays only the AuthX-linked holder of the syndicated position, so the depot has exactly one identity for that holder: the pubkey it parked the Both comments now say pubkey explicitly, that |
jglanz
left a comment
There was a problem hiding this comment.
amount shold never be bare, aside from the few fixes, this looks good
…n types (simple_swap)
Protocol-only half of the cross-repo `simple_swap` feature: liq-token
syndication moves onto OPP so the WIRE depot becomes the ledger of record
for syndicated liqSOL (and, at parity, liqEth).
- `ATTESTATION_TYPE_SYNDICATE_LIQ = 60963` (outpost -> depot):
`SyndicateLIQ { chain_code, user: ChainAddress, amount: TokenAmount, sequence }` — a
holder handed `amount` liq tokens to the outpost; from that moment the
tokens are outpost property.
- `ATTESTATION_TYPE_LIQ_YIELD = 60964` (outpost -> depot):
`LIQYield { chain_code, amount: TokenAmount, sequence, epoch }` — the outpost's GLOBAL
report of liq yield claimed for the syndicated pool since its previous
report. No user address: the depot splits it across its own ledger. This
replaces the per-user `StakingReward` reports for syndicated liqSOL.
- `ATTESTATION_TYPE_DESYNDICATE_LIQ = 60965` (depot -> outpost):
`DesyndicateLIQ { chain_code, user, amount: TokenAmount, request_id }` — depot-originated
release; the outpost pays inline at dispatch, log-and-skip on refusal.
`user` is the holder's native pubkey in both directions (SVM: 32-byte
Ed25519; EVM: 33-byte compressed secp256k1), never a derived address: the
depot has one identity for the AuthX-linked holder and the outpost derives
the transfer destination. Every `amount` is a `TokenAmount` whose
`token_code` names the chain's liq token as the depot registered it (the
packed slug, LIQSOL on Solana) and whose `amount` is base units (liqSOL:
9 decimals, 1:1 with the depot frame). `sequence` is one per-outpost
strictly-increasing counter shared by SyndicateLIQ and LIQYield, the depot's
dedupe key.
Depot-side handling and emission are deliberately NOT part of this change:
`sysio.msgch::dispatch_attestation` drops the two inbound types through its
`default: break`, nothing calls `queueout` with DESYNDICATE_LIQ, and the
Solana relay has no `effect_shape` for it yet. Those land with the depot
ledger. The host `FC_REFLECT_ENUM` mirror is extended so the plugins can
name the new values.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NoaXitAvpNSNj7114S9338
Change-Id: I3c0d32add50f0f051573a9b4b5a6d9e360fdb57c
74eadd7 to
7073f0c
Compare
Protocol-only half of the cross-repo
simple_swapfeature (identically-named branches in wire-solana and wire-tools-ts; they land together).What
Three new OPP attestation types plus their messages, so liq-token syndication moves onto OPP with the WIRE depot as ledger of record:
SYNDICATE_LIQSyndicateLIQ { chain_code, user: ChainAddress, amount: TokenAmount, sequence }LIQ_YIELDLIQYield { chain_code, amount: TokenAmount, sequence, epoch }DESYNDICATE_LIQDesyndicateLIQ { chain_code, user, amount: TokenAmount, request_id }liqsol-core::syndin PostLaunch); the tokens become outpost property and the outpost keeps no per-user state.LIQ_YIELDis the outpost's global report of yield claimed for the syndicated pool since its last report. It replaces the per-userSTAKING_REWARDreports for syndicated liqSOL (per-user did not scale). Non-syndicated liqSOL keeps its normal on-chain yield.DESYNDICATE_LIQis depot-originated; the outpost pays inline at dispatch and log-and-skips refusals.useris the holder's native pubkey in both directions (SVM: 32-byte Ed25519; EVM: 33-byte compressed secp256k1), never a derived address — the depot has exactly one identity for the AuthX-linked holder and the outpost derives the transfer destination. Everyamountis aTokenAmountwhosetoken_codenames the chain's liq token as the depot registered it (e.g.LIQSOL) and whoseamountis base units (liqSOL: 9 decimals, 1:1 with the depot frame).sequenceis one per-outpost strictly-increasing counter shared by the two outbound types.Deliberately not in this PR
Depot-side handling and emission:
sysio.msgch::dispatch_attestationdrops the two inbound types through itsdefault: break(verified), nothing callsqueueoutwithDESYNDICATE_LIQ, and the Solana relay has noeffect_shapefor it. Those land with the depot ledger. Ethereum is untouched (parity later).Landing order
wire-solana's standalone CI resolves the published
wire-opp-solana-modelscrate, so its PR stays red on that job until this merges and the opp-bundles publish runs. Local/e2e builds use the siblingpathsoverride and are unaffected.Cross-repo links
🤖 Generated with Claude Code
https://claude.ai/code/session_01NoaXitAvpNSNj7114S9338