@agoric/portfolio-api 0.1.1-dev-68817f5.0.68817f5 → 0.1.1-dev-96faaf4.0.96faaf4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,942 @@
1
+ # yaml-language-server: $schema=./ymax-machine.schema.json
2
+ version: 0.2.0
3
+
4
+ machines:
5
+ # =============================================================================
6
+ # MAIN FLOW MACHINE
7
+ # =============================================================================
8
+ YmaxFlow:
9
+ description: Canonical lifecycle for Ymax portfolio movements (deposit, withdraw, rebalance) across planner, contract, and resolver.
10
+ category: flow
11
+ initial: transaction_defined
12
+ states:
13
+ transaction_defined:
14
+ description: User specifies their portfolio offer in a transaction (usually in the Ymax web UI)
15
+ meta:
16
+ row: Cosmos Realm
17
+ on:
18
+ transaction.signed:
19
+ target: transaction_committed
20
+ description: User signed a transaction with the offer and broadcast it
21
+ transaction_committed:
22
+ description: The user's transaction is in consensus
23
+ meta:
24
+ row: Cosmos Realm
25
+ observedFrom:
26
+ - Agoric tx history for the user's wallet address
27
+ on:
28
+ transaction.handled:
29
+ description: Agoric contract machinery forwards it from smart-wallet bridge to the Portfolio Contract
30
+ target: flow_inited
31
+ flow_inited:
32
+ description: Flow basic details recorded in flowsRunning (type and optional amount). Virtual FlowStatus=init, not yet FlowStatus=run
33
+ on:
34
+ flow.discovered:
35
+ description: Planner service observes the new key in `flowsRunning`
36
+ target: planning
37
+ meta:
38
+ row: Portfolio Contract
39
+ observedFrom:
40
+ - published.{instance}.portfolios.portfolio{n} status.flowsRunning
41
+ userMessage: Request received; building plan.
42
+ planning:
43
+ description: Planner computes steps/order from balances + targetAllocation and posts flow{n}.steps.
44
+ meta:
45
+ row: Planner Service
46
+ observedFrom:
47
+ - services/ymax-planner log messages (planRebalanceFlow/planDepositToAllocations)
48
+ invariants:
49
+ - deposit/withdraw amounts reconcile with portfolio status and balances
50
+ on:
51
+ planner.steps_submitted:
52
+ target: planned
53
+ description: Planner submits a transaction to the contract and the contract handles it.
54
+ planner.failed:
55
+ target: failed
56
+ description: Planner/solver errored or allocation infeasible.
57
+ planned:
58
+ description: Planner has submitted transaction to the contract with the steps for the flow.
59
+ meta:
60
+ row: Planner Service
61
+ observedFrom:
62
+ - Agoric tx history for the planner address
63
+ on:
64
+ flow.plan_resolved:
65
+ target: executing
66
+ description: executePlan() begins; FlowStatus state=run emitted.
67
+ executing:
68
+ description: Contract performing ordered movements; publishes FlowStatus run/fail/done.
69
+ meta:
70
+ row: Orchestration
71
+ observedFrom:
72
+ - published.{instance}.portfolios.portfolio{n}.flows.flow{n}.steps
73
+ userMessage: Plan ready; executing transfers.
74
+ initial: provisioning
75
+ states:
76
+ provisioning:
77
+ description: Make/resolve accounts (Agoric, Noble, EVM) and register resolver pending transactions when needed.
78
+ on:
79
+ provision.complete:
80
+ target: moving
81
+ description: provideCosmosAccount/provideEVMAccount resolved; accountsPending empty.
82
+ provision.failed:
83
+ target: failed
84
+ description: Account creation or resolver registerTransaction failed.
85
+ meta:
86
+ row: Orchestration
87
+ observedFrom:
88
+ - FlowStatus state=run with how=makeAccounts(...)
89
+ invariants:
90
+ - accountsPending empty
91
+ moving:
92
+ description: Execute MovementDesc steps concurrently. Each step runs as one of the Way types below.
93
+ type: parallel
94
+ onDone:
95
+ target: completed
96
+ description: All active steps reached their completed state
97
+ onError:
98
+ target: failed
99
+ description: Any step reached a failure/timeout state
100
+ meta:
101
+ row: Orchestration
102
+ observedFrom:
103
+ - published.{instance}.portfolios.portfolio{n}.flows.flow{n} (state=run|fail|done, steps=[])
104
+ invariants:
105
+ - proposal satisfied for give/want seats
106
+ wayMachines:
107
+ - localTransfer
108
+ - withdrawToSeat
109
+ - send
110
+ - IBC_agoric_noble
111
+ - IBC_noble_agoric
112
+ - CCTP_noble_EVM
113
+ - CCTP_EVM_agoric
114
+ - GMP_protocol_supply
115
+ - GMP_protocol_withdraw
116
+ - USDN_supply
117
+ - USDN_withdraw
118
+ on:
119
+ flow.failed:
120
+ target: failed
121
+ description: FlowStatus state=fail emitted.
122
+ flow.done:
123
+ target: completed
124
+ description: FlowStatus state=done and all relevant pendingTxs are success.
125
+ completed:
126
+ description: Flow finished; balances/positions updated; pendingTxs (if any) marked success.
127
+ type: final
128
+ meta:
129
+ row: Final States
130
+ userMessage: Flow finished.
131
+ failed:
132
+ description: Flow halted; partial effects possible; operator or planner must retry/correct.
133
+ type: final
134
+ meta:
135
+ row: Final States
136
+ severity: error
137
+ userMessage: Flow failed; inspect flow{n} status and pendingTx logs.
138
+
139
+ # =============================================================================
140
+ # STEP MACHINES - Local Operations (synchronous, Agoric-only)
141
+ # =============================================================================
142
+
143
+ localTransfer:
144
+ description: Transfer assets from a ZCF seat to an Agoric local chain account (LCA). Synchronous Zoe operation.
145
+ category: step
146
+ initial: initiated
147
+ states:
148
+ initiated:
149
+ description: localTransfer() called with seat and target account
150
+ meta:
151
+ row: Zoe
152
+ observedFrom:
153
+ - FlowStatus state=run with how=localTransfer
154
+ on:
155
+ transfer.complete:
156
+ target: completed
157
+ description: zoeTools.localTransfer() returned successfully
158
+ transfer.failed:
159
+ target: failed
160
+ description: Zoe transfer threw an error (e.g., insufficient funds, wrong brand)
161
+ completed:
162
+ description: Assets moved from seat to LCA
163
+ type: final
164
+ meta:
165
+ row: Zoe
166
+ observedFrom:
167
+ - ZCF seat allocation updated
168
+ - LCA balance increased
169
+ failed:
170
+ description: Transfer failed; seat allocation unchanged
171
+ type: final
172
+ meta:
173
+ row: Zoe
174
+ severity: error
175
+ observedFrom:
176
+ - FlowStatus state=fail with error message
177
+
178
+ withdrawToSeat:
179
+ description: Withdraw assets from an Agoric LCA back to a ZCF seat. Synchronous Zoe operation.
180
+ category: step
181
+ initial: initiated
182
+ states:
183
+ initiated:
184
+ description: withdrawToSeat() called with account and target seat
185
+ meta:
186
+ row: Zoe
187
+ observedFrom:
188
+ - FlowStatus state=run with how=withdrawToSeat
189
+ on:
190
+ withdraw.complete:
191
+ target: completed
192
+ description: zoeTools.withdrawToSeat() returned successfully
193
+ withdraw.failed:
194
+ target: failed
195
+ description: Zoe withdraw threw an error
196
+ completed:
197
+ description: Assets moved from LCA to seat
198
+ type: final
199
+ meta:
200
+ row: Zoe
201
+ observedFrom:
202
+ - ZCF seat allocation increased (Cash keyword)
203
+ - LCA balance decreased
204
+ failed:
205
+ description: Withdraw failed; LCA balance unchanged
206
+ type: final
207
+ meta:
208
+ row: Zoe
209
+ severity: error
210
+ observedFrom:
211
+ - FlowStatus state=fail with error message
212
+
213
+ send:
214
+ description: Internal cosmos send between two Agoric LCAs. Main use is sending BLD from the contract fee account to an LCA in preparation for an IBC GMP message to Axelar.
215
+ category: step
216
+ initial: initiated
217
+ states:
218
+ initiated:
219
+ description: lcaIn.send(lca.getAddress(), amount) called
220
+ meta:
221
+ row: Agoric Chain
222
+ observedFrom:
223
+ - FlowStatus state=run with how=send
224
+ on:
225
+ send.complete:
226
+ target: completed
227
+ description: send() returned successfully
228
+ send.failed:
229
+ target: failed
230
+ description: send() threw an error
231
+ completed:
232
+ description: Assets moved between LCAs
233
+ type: final
234
+ meta:
235
+ row: Agoric Chain
236
+ observedFrom:
237
+ - Agoric tx history showing MsgSend
238
+ - LCA balances updated
239
+ failed:
240
+ description: Send failed
241
+ type: final
242
+ meta:
243
+ row: Agoric Chain
244
+ severity: error
245
+ observedFrom:
246
+ - FlowStatus state=fail with error message
247
+
248
+ # =============================================================================
249
+ # STEP MACHINES - IBC Transfers
250
+ # =============================================================================
251
+
252
+ IBC_agoric_noble:
253
+ description: IBC transfer from Agoric LCA to Noble ICA. Uses lca.transfer() which sends MsgTransfer.
254
+ category: step
255
+ initial: initiated
256
+ states:
257
+ initiated:
258
+ description: lca.transfer(noble_ica_address, denomAmount) called
259
+ meta:
260
+ row: Agoric Chain
261
+ observedFrom:
262
+ - FlowStatus state=run with how=IBC to Noble
263
+ protocol: IBC
264
+ on:
265
+ packet.sent:
266
+ target: packet_in_flight
267
+ description: MsgTransfer submitted and included in Agoric block
268
+ transfer.failed:
269
+ target: failed
270
+ description: MsgTransfer rejected (e.g., invalid channel, insufficient funds)
271
+ packet_in_flight:
272
+ description: IBC packet sent from Agoric, waiting for relayer to deliver to Noble
273
+ meta:
274
+ row: IBC Relayer
275
+ observedFrom:
276
+ - Agoric tx history showing MsgTransfer with packet sequence
277
+ - Relayer logs (Hermes/rly) showing SendPacket event
278
+ observabilityTodo: "TODO: Add relayer metrics endpoint to monitor packet delivery latency"
279
+ protocol: IBC
280
+ on:
281
+ packet.received:
282
+ target: ack_pending
283
+ description: Relayer delivered packet to Noble chain
284
+ packet.timeout:
285
+ target: timed_out
286
+ description: Packet not delivered within timeout period
287
+ ack_pending:
288
+ description: Packet received on Noble, waiting for acknowledgement to be relayed back
289
+ meta:
290
+ row: Noble Chain
291
+ observedFrom:
292
+ - Noble tx history showing RecvPacket
293
+ observabilityTodo: "TODO: Index Noble RecvPacket events for correlation"
294
+ protocol: IBC
295
+ on:
296
+ ack.received:
297
+ target: completed
298
+ description: Acknowledgement received on Agoric confirming successful transfer
299
+ ack.error:
300
+ target: failed
301
+ description: Noble returned error acknowledgement (e.g., account doesn't exist)
302
+ completed:
303
+ description: IBC transfer complete; funds on Noble ICA
304
+ type: final
305
+ meta:
306
+ row: Noble Chain
307
+ observedFrom:
308
+ - Noble ICA balance increased
309
+ - Agoric LCA balance decreased
310
+ timed_out:
311
+ description: IBC packet timed out; funds refunded on source chain
312
+ type: final
313
+ meta:
314
+ row: Agoric Chain
315
+ severity: error
316
+ observedFrom:
317
+ - MsgTimeout on Agoric
318
+ - Agoric LCA balance restored
319
+ notes: Relayer may be down or slow. Check Hermes/rly status.
320
+ failed:
321
+ description: IBC transfer failed
322
+ type: final
323
+ meta:
324
+ row: Agoric Chain
325
+ severity: error
326
+ observedFrom:
327
+ - FlowStatus state=fail with error message
328
+
329
+ IBC_noble_agoric:
330
+ description: IBC transfer from Noble ICA to Agoric LCA. Uses ica.transfer() which sends MsgTransfer.
331
+ category: step
332
+ initial: initiated
333
+ states:
334
+ initiated:
335
+ description: noble_ica.transfer(agoric_lca_address, denomAmount) called via ICS-27
336
+ meta:
337
+ row: Noble Chain
338
+ observedFrom:
339
+ - FlowStatus state=run with how=IBC from Noble
340
+ protocol: IBC
341
+ on:
342
+ ica_tx.submitted:
343
+ target: ica_tx_pending
344
+ description: ICA host tx submitted on Noble
345
+ ica_tx.failed:
346
+ target: failed
347
+ description: ICA execution failed
348
+ ica_tx_pending:
349
+ description: Waiting for Noble to execute the ICA transfer message
350
+ meta:
351
+ row: Noble Chain
352
+ observedFrom:
353
+ - Noble tx history for ICA controller
354
+ observabilityTodo: "TODO: Add ICA tx indexing for Noble chain"
355
+ protocol: IBC
356
+ on:
357
+ packet.sent:
358
+ target: packet_in_flight
359
+ description: Noble executed MsgTransfer, packet in flight to Agoric
360
+ ica_tx.error:
361
+ target: failed
362
+ description: ICA execution returned error
363
+ packet_in_flight:
364
+ description: IBC packet sent from Noble, waiting for relayer to deliver to Agoric
365
+ meta:
366
+ row: IBC Relayer
367
+ observedFrom:
368
+ - Noble tx history showing MsgTransfer with packet sequence
369
+ - Relayer logs showing SendPacket event
370
+ protocol: IBC
371
+ on:
372
+ packet.received:
373
+ target: ack_pending
374
+ description: Relayer delivered packet to Agoric chain
375
+ packet.timeout:
376
+ target: timed_out
377
+ description: Packet not delivered within timeout period
378
+ ack_pending:
379
+ description: Packet received on Agoric, waiting for acknowledgement
380
+ meta:
381
+ row: Agoric Chain
382
+ observedFrom:
383
+ - Agoric tx history showing RecvPacket
384
+ protocol: IBC
385
+ on:
386
+ ack.received:
387
+ target: completed
388
+ description: Transfer acknowledged successfully
389
+ ack.error:
390
+ target: failed
391
+ description: Agoric returned error acknowledgement
392
+ completed:
393
+ description: IBC transfer complete; funds on Agoric LCA
394
+ type: final
395
+ meta:
396
+ row: Agoric Chain
397
+ observedFrom:
398
+ - Agoric LCA balance increased
399
+ - Noble ICA balance decreased
400
+ timed_out:
401
+ description: IBC packet timed out; funds refunded on Noble
402
+ type: final
403
+ meta:
404
+ row: Noble Chain
405
+ severity: error
406
+ observedFrom:
407
+ - MsgTimeout on Noble
408
+ - Noble ICA balance restored
409
+ failed:
410
+ description: IBC transfer failed
411
+ type: final
412
+ meta:
413
+ row: Noble Chain
414
+ severity: error
415
+ observedFrom:
416
+ - FlowStatus state=fail with error message
417
+
418
+ # =============================================================================
419
+ # STEP MACHINES - CCTP (Circle Cross-Chain Transfer Protocol)
420
+ # =============================================================================
421
+
422
+ CCTP_noble_EVM:
423
+ description: CCTP transfer from Noble to EVM chain. Burns USDC on Noble, Circle attestation, mint on EVM.
424
+ category: step
425
+ initial: initiated
426
+ states:
427
+ initiated:
428
+ description: noble_ica.depositForBurn(destinationAddress, denomAmount) called
429
+ meta:
430
+ row: Noble Chain
431
+ observedFrom:
432
+ - FlowStatus state=run with how=CCTP
433
+ txType: CCTP_TO_EVM
434
+ protocol: Circle CCTP
435
+ on:
436
+ burn.submitted:
437
+ target: burn_pending
438
+ description: depositForBurn ICA tx submitted
439
+ burn.failed:
440
+ target: failed
441
+ description: depositForBurn submission failed
442
+ burn_pending:
443
+ description: Waiting for Noble to confirm burn transaction
444
+ meta:
445
+ row: Noble Chain
446
+ observedFrom:
447
+ - Noble tx history showing depositForBurn
448
+ - resolver pendingTxs with type=CCTP_TO_EVM, status=pending
449
+ protocol: Circle CCTP
450
+ on:
451
+ burn.confirmed:
452
+ target: attestation_pending
453
+ description: Burn tx confirmed on Noble; waiting for Circle attestation
454
+ burn.error:
455
+ target: failed
456
+ description: Burn tx failed on Noble
457
+ attestation_pending:
458
+ description: Burn confirmed; waiting for Circle attestation (no protocol timeout; poll until available)
459
+ meta:
460
+ row: Circle Attestation
461
+ observedFrom:
462
+ - Circle Attestation API (iris-api.circle.com/v1/attestations)
463
+ observabilityTodo: "TODO: Poll Circle attestation API and publish status"
464
+ protocol: Circle CCTP
465
+ notes: Circle returns 404 until attestation is published; attested messages do not expire.
466
+ on:
467
+ attestation.received:
468
+ target: mint_pending
469
+ description: Circle attestation fetched and verified
470
+ attestation.error:
471
+ target: failed
472
+ description: Attestation fetch/validation failed
473
+ mint_pending:
474
+ description: Attestation received; mint message ready on destination EVM chain
475
+ meta:
476
+ row: EVM Chain
477
+ observedFrom:
478
+ - EVM mempool or pending transactions
479
+ observabilityTodo: "TODO: Monitor EVM chain for receiveMessage tx"
480
+ protocol: Circle CCTP
481
+ on:
482
+ mint.confirmed:
483
+ target: completed
484
+ description: USDC minted on EVM chain to destination address
485
+ mint.failed:
486
+ target: failed
487
+ description: Mint transaction failed on EVM
488
+ completed:
489
+ description: CCTP transfer complete; USDC on EVM wallet
490
+ type: final
491
+ meta:
492
+ row: EVM Chain
493
+ observedFrom:
494
+ - EVM wallet balance increased
495
+ - resolver pendingTxs status=success
496
+ failed:
497
+ description: CCTP transfer failed
498
+ type: final
499
+ meta:
500
+ row: Noble Chain
501
+ severity: error
502
+ observedFrom:
503
+ - FlowStatus state=fail with error message
504
+ - resolver pendingTxs status=failed
505
+
506
+ CCTP_EVM_agoric:
507
+ description: CCTP transfer from EVM to Agoric via Noble. Burns on EVM, attestation, mints on Noble, forwards via NFA to Agoric.
508
+ category: step
509
+ initial: initiated
510
+ states:
511
+ initiated:
512
+ description: GMP contract call to depositForBurn on EVM wallet
513
+ meta:
514
+ row: Agoric Chain
515
+ observedFrom:
516
+ - FlowStatus state=run with how=CCTP
517
+ txType: CCTP_TO_AGORIC
518
+ protocol: Circle CCTP + Axelar GMP
519
+ on:
520
+ gmp.submitted:
521
+ target: gmp_pending
522
+ description: GMP message sent via Axelar
523
+ gmp.failed:
524
+ target: failed
525
+ description: GMP submission failed
526
+ gmp_pending:
527
+ description: GMP message in transit to EVM chain via Axelar (sent as IBC packet to Axelar gateway)
528
+ meta:
529
+ row: Axelar Network / IBC Relayer
530
+ observedFrom:
531
+ - Axelar GMP explorer (axelarscan.io)
532
+ observabilityTodo: "TODO: Poll Axelar API for GMP message status"
533
+ protocol: Axelar GMP over IBC
534
+ on:
535
+ gmp.executed:
536
+ target: burn_pending
537
+ description: Axelar delivered and executed GMP payload on EVM
538
+ gmp.failed:
539
+ target: gmp_failed
540
+ description: GMP message delivery or execution failed
541
+ gmp.timeout:
542
+ target: gmp_failed
543
+ description: IBC packet to Axelar timed out
544
+ gmp.ack_error:
545
+ target: gmp_failed
546
+ description: Axelar gateway returned IBC acknowledgement error
547
+ burn_pending:
548
+ description: EVM wallet executing depositForBurn
549
+ meta:
550
+ row: EVM Chain
551
+ observedFrom:
552
+ - EVM tx history for smart wallet
553
+ protocol: Circle CCTP
554
+ on:
555
+ burn.confirmed:
556
+ target: attestation_pending
557
+ description: USDC burned on EVM; waiting for attestation
558
+ burn.failed:
559
+ target: failed
560
+ description: Burn transaction reverted on EVM
561
+ attestation_pending:
562
+ description: Waiting for Circle attestation
563
+ meta:
564
+ row: Circle Attestation
565
+ observedFrom:
566
+ - Circle Attestation API
567
+ protocol: Circle CCTP
568
+ expectedSlaMs: 60000
569
+ on:
570
+ attestation.received:
571
+ target: noble_mint_pending
572
+ description: Attestation ready; mint can proceed on Noble
573
+ attestation.timeout:
574
+ target: attestation_timeout
575
+ description: Attestation timed out
576
+ noble_mint_pending:
577
+ description: USDC being minted on Noble to NFA (Noble Forwarding Account)
578
+ meta:
579
+ row: Noble Chain
580
+ observedFrom:
581
+ - Noble tx history showing receiveMessage
582
+ observabilityTodo: "TODO: Monitor Noble for CCTP receiveMessage events"
583
+ protocol: Circle CCTP
584
+ on:
585
+ mint.confirmed:
586
+ target: ibc_forward_pending
587
+ description: USDC minted on Noble NFA
588
+ mint.failed:
589
+ target: failed
590
+ description: Noble mint failed
591
+ ibc_forward_pending:
592
+ description: NFA auto-forwarding USDC to Agoric via IBC
593
+ meta:
594
+ row: IBC Relayer
595
+ observedFrom:
596
+ - Noble tx history showing auto-forward
597
+ - Relayer logs
598
+ protocol: IBC
599
+ on:
600
+ forward.complete:
601
+ target: completed
602
+ description: Funds arrived on Agoric LCA
603
+ forward.timeout:
604
+ target: ibc_timeout
605
+ description: IBC forward timed out
606
+ completed:
607
+ description: CCTP+IBC transfer complete; USDC on Agoric LCA
608
+ type: final
609
+ meta:
610
+ row: Agoric Chain
611
+ observedFrom:
612
+ - Agoric LCA balance increased
613
+ - resolver pendingTxs status=success
614
+ gmp_failed:
615
+ description: Axelar GMP delivery or execution failed
616
+ type: final
617
+ meta:
618
+ row: Axelar Network
619
+ severity: error
620
+ observedFrom:
621
+ - Axelar GMP explorer showing failed status
622
+ notes: Check gas payment, destination contract. May need manual recovery.
623
+ attestation_timeout:
624
+ description: Circle attestation timed out
625
+ type: final
626
+ meta:
627
+ row: Circle Attestation
628
+ severity: error
629
+ ibc_timeout:
630
+ description: IBC forward from Noble to Agoric timed out
631
+ type: final
632
+ meta:
633
+ row: IBC Relayer
634
+ severity: error
635
+ observedFrom:
636
+ - Funds stuck on Noble NFA
637
+ notes: Relayer may be down. Funds safe on Noble.
638
+ failed:
639
+ description: CCTP transfer failed
640
+ type: final
641
+ meta:
642
+ row: EVM Chain
643
+ severity: error
644
+ observedFrom:
645
+ - FlowStatus state=fail with error message
646
+ - resolver pendingTxs status=failed
647
+
648
+ # =============================================================================
649
+ # STEP MACHINES - GMP Protocol Operations (Aave, Compound, Beefy)
650
+ # =============================================================================
651
+
652
+ GMP_protocol_supply:
653
+ description: Supply USDC to yield protocol (Aave/Compound/Beefy) on EVM via Axelar GMP. Encodes approve+supply calls.
654
+ category: step
655
+ initial: initiated
656
+ states:
657
+ initiated:
658
+ description: GMP contract call payload encoded with approve + supply calls
659
+ meta:
660
+ row: Agoric Chain
661
+ observedFrom:
662
+ - FlowStatus state=run with how=Aave|Compound|Beefy
663
+ txType: GMP
664
+ protocol: Axelar GMP
665
+ on:
666
+ gmp.submitted:
667
+ target: gmp_pending
668
+ description: GMP message sent to Axelar with supply payload
669
+ gmp.failed:
670
+ target: failed
671
+ description: GMP submission failed
672
+ gmp_pending:
673
+ description: GMP message in transit via Axelar to EVM chain (sent as IBC packet to Axelar gateway)
674
+ meta:
675
+ row: Axelar Network / IBC Relayer
676
+ observedFrom:
677
+ - Axelar GMP explorer
678
+ - resolver pendingTxs with type=GMP, status=pending
679
+ protocol: Axelar GMP over IBC
680
+ expectedSlaMs: 120000
681
+ on:
682
+ gmp.delivered:
683
+ target: contract_call_pending
684
+ description: Axelar delivered payload to EVM smart wallet
685
+ gmp.failed:
686
+ target: gmp_failed
687
+ description: GMP delivery failed (insufficient gas, network issue)
688
+ gmp.timeout:
689
+ target: gmp_failed
690
+ description: IBC packet to Axelar timed out
691
+ gmp.ack_error:
692
+ target: gmp_failed
693
+ description: Axelar gateway returned IBC acknowledgement error
694
+ contract_call_pending:
695
+ description: Smart wallet executing multicall (approve + supply)
696
+ meta:
697
+ row: EVM Chain
698
+ observedFrom:
699
+ - EVM tx history for smart wallet address
700
+ observabilityTodo: "TODO: Index EVM events for protocol supply operations"
701
+ protocol: Aave/Compound/Beefy
702
+ on:
703
+ calls.executed:
704
+ target: completed
705
+ description: All contract calls succeeded; position created
706
+ calls.reverted:
707
+ target: contract_failed
708
+ description: One or more contract calls reverted
709
+ completed:
710
+ description: Supply complete; position recorded on yield protocol
711
+ type: final
712
+ meta:
713
+ row: EVM Chain
714
+ observedFrom:
715
+ - Protocol position balance (aToken, cToken, or vault shares)
716
+ - resolver pendingTxs status=success
717
+ gmp_failed:
718
+ description: Axelar GMP failed to deliver message
719
+ type: final
720
+ meta:
721
+ row: Axelar Network
722
+ severity: error
723
+ observedFrom:
724
+ - Axelar GMP explorer showing failed
725
+ - resolver pendingTxs status=failed
726
+ notes: Check Axelar gas service, relayer status
727
+ contract_failed:
728
+ description: EVM contract calls reverted
729
+ type: final
730
+ meta:
731
+ row: EVM Chain
732
+ severity: error
733
+ observedFrom:
734
+ - EVM tx receipt showing revert
735
+ - resolver pendingTxs status=failed
736
+ notes: Check protocol state, slippage, liquidity
737
+ failed:
738
+ description: Supply operation failed
739
+ type: final
740
+ meta:
741
+ row: Agoric Chain
742
+ severity: error
743
+ observedFrom:
744
+ - FlowStatus state=fail with error message
745
+
746
+ GMP_protocol_withdraw:
747
+ description: Withdraw USDC from yield protocol on EVM via Axelar GMP. Optionally claims rewards first.
748
+ category: step
749
+ initial: initiated
750
+ states:
751
+ initiated:
752
+ description: GMP contract call payload encoded with optional claim + withdraw calls
753
+ meta:
754
+ row: Agoric Chain
755
+ observedFrom:
756
+ - FlowStatus state=run with how=Aave|Compound|Beefy
757
+ txType: GMP
758
+ protocol: Axelar GMP
759
+ on:
760
+ gmp.submitted:
761
+ target: gmp_pending
762
+ description: GMP message sent to Axelar with withdraw payload
763
+ gmp.failed:
764
+ target: failed
765
+ description: GMP submission failed
766
+ gmp_pending:
767
+ description: GMP message in transit via Axelar to EVM chain (sent as IBC packet to Axelar gateway)
768
+ meta:
769
+ row: Axelar Network / IBC Relayer
770
+ observedFrom:
771
+ - Axelar GMP explorer
772
+ - resolver pendingTxs with type=GMP, status=pending
773
+ protocol: Axelar GMP over IBC
774
+ expectedSlaMs: 120000
775
+ on:
776
+ gmp.delivered:
777
+ target: contract_call_pending
778
+ description: Axelar delivered payload to EVM smart wallet
779
+ gmp.failed:
780
+ target: gmp_failed
781
+ description: GMP delivery failed
782
+ gmp.timeout:
783
+ target: gmp_failed
784
+ description: IBC packet to Axelar timed out
785
+ gmp.ack_error:
786
+ target: gmp_failed
787
+ description: Axelar gateway returned IBC acknowledgement error
788
+ contract_call_pending:
789
+ description: Smart wallet executing multicall (optional claim + withdraw)
790
+ meta:
791
+ row: EVM Chain
792
+ observedFrom:
793
+ - EVM tx history for smart wallet address
794
+ protocol: Aave/Compound/Beefy
795
+ on:
796
+ calls.executed:
797
+ target: completed
798
+ description: Withdraw succeeded; USDC in smart wallet
799
+ calls.reverted:
800
+ target: contract_failed
801
+ description: Contract calls reverted
802
+ completed:
803
+ description: Withdraw complete; USDC available in EVM wallet for subsequent CCTP
804
+ type: final
805
+ meta:
806
+ row: EVM Chain
807
+ observedFrom:
808
+ - EVM wallet USDC balance increased
809
+ - Protocol position decreased
810
+ - resolver pendingTxs status=success
811
+ gmp_failed:
812
+ description: Axelar GMP failed
813
+ type: final
814
+ meta:
815
+ row: Axelar Network
816
+ severity: error
817
+ observedFrom:
818
+ - resolver pendingTxs status=failed
819
+ contract_failed:
820
+ description: EVM contract calls reverted
821
+ type: final
822
+ meta:
823
+ row: EVM Chain
824
+ severity: error
825
+ observedFrom:
826
+ - EVM tx receipt showing revert
827
+ notes: Check withdrawal limits, protocol pause status
828
+ failed:
829
+ description: Withdraw operation failed
830
+ type: final
831
+ meta:
832
+ row: Agoric Chain
833
+ severity: error
834
+ observedFrom:
835
+ - FlowStatus state=fail with error message
836
+
837
+ # =============================================================================
838
+ # STEP MACHINES - USDN Protocol (Noble Dollar)
839
+ # =============================================================================
840
+
841
+ USDN_supply:
842
+ description: Supply USDC to Noble Dollar (USDN) protocol. Swaps USDC→USDN and optionally locks in vault.
843
+ category: step
844
+ initial: initiated
845
+ states:
846
+ initiated:
847
+ description: ICA executeEncodedTx called with MsgSwap (+ optional MsgLock) messages
848
+ meta:
849
+ row: Noble Chain
850
+ observedFrom:
851
+ - FlowStatus state=run with how=USDN
852
+ protocol: Noble Dollar
853
+ on:
854
+ ica_tx.submitted:
855
+ target: tx_pending
856
+ description: ICA messages submitted to Noble
857
+ ica_tx.failed:
858
+ target: failed
859
+ description: ICA submission failed
860
+ tx_pending:
861
+ description: Waiting for Noble to execute swap (and lock) messages
862
+ meta:
863
+ row: Noble Chain
864
+ observedFrom:
865
+ - Noble tx history showing MsgSwap
866
+ observabilityTodo: "TODO: Index Noble MsgSwap events for USDN tracking"
867
+ protocol: Noble Dollar
868
+ on:
869
+ tx.confirmed:
870
+ target: completed
871
+ description: Swap (and optional lock) completed successfully
872
+ tx.failed:
873
+ target: failed
874
+ description: Transaction failed (e.g., slippage exceeded, insufficient funds)
875
+ completed:
876
+ description: USDN supply complete; position in USDN (and optionally vault)
877
+ type: final
878
+ meta:
879
+ row: Noble Chain
880
+ observedFrom:
881
+ - Noble ICA uusdn balance increased
882
+ - Noble vault balance (if locked)
883
+ failed:
884
+ description: USDN supply failed
885
+ type: final
886
+ meta:
887
+ row: Noble Chain
888
+ severity: error
889
+ observedFrom:
890
+ - FlowStatus state=fail with error message
891
+ - Noble tx showing failure reason
892
+
893
+ USDN_withdraw:
894
+ description: Withdraw from Noble Dollar (USDN) protocol. Unlocks from vault (if locked) and swaps USDN→USDC.
895
+ category: step
896
+ initial: initiated
897
+ states:
898
+ initiated:
899
+ description: ICA executeEncodedTx called with optional MsgUnlock + MsgSwap messages
900
+ meta:
901
+ row: Noble Chain
902
+ observedFrom:
903
+ - FlowStatus state=run with how=USDN
904
+ protocol: Noble Dollar
905
+ on:
906
+ ica_tx.submitted:
907
+ target: tx_pending
908
+ description: ICA messages submitted to Noble
909
+ ica_tx.failed:
910
+ target: failed
911
+ description: ICA submission failed
912
+ tx_pending:
913
+ description: Waiting for Noble to execute unlock and swap messages
914
+ meta:
915
+ row: Noble Chain
916
+ observedFrom:
917
+ - Noble tx history showing MsgUnlock, MsgSwap
918
+ protocol: Noble Dollar
919
+ on:
920
+ tx.confirmed:
921
+ target: completed
922
+ description: Unlock and swap completed; USDC available
923
+ tx.failed:
924
+ target: failed
925
+ description: Transaction failed
926
+ completed:
927
+ description: USDN withdraw complete; USDC on Noble ICA ready for IBC transfer
928
+ type: final
929
+ meta:
930
+ row: Noble Chain
931
+ observedFrom:
932
+ - Noble ICA uusdc balance increased
933
+ - USDN position decreased
934
+ failed:
935
+ description: USDN withdraw failed
936
+ type: final
937
+ meta:
938
+ row: Noble Chain
939
+ severity: error
940
+ observedFrom:
941
+ - FlowStatus state=fail with error message
942
+ notes: Check vault lock period, slippage settings