Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settler exo #10391

Open
turadg opened this issue Nov 1, 2024 · 2 comments · May be fixed by #10530
Open

Settler exo #10391

turadg opened this issue Nov 1, 2024 · 2 comments · May be fixed by #10530
Assignees
Labels
enhancement New feature or request

Comments

@turadg
Copy link
Member

turadg commented Nov 1, 2024

What is the Problem Being Solved?

Fast USDC needs a component to settle advances.

Description of the Design

A Settler exo that performs the advancement operations.

It looks them up from Status Manager and settles per product spec.

Security Considerations

Scaling Considerations

Test Plan

Exo test

Contract test is separate: #10388

Upgrade Considerations

@turadg turadg added the enhancement New feature or request label Nov 1, 2024
@turadg turadg added this to the FU1: package integration milestone Nov 1, 2024
@dckc dckc mentioned this issue Nov 4, 2024
5 tasks
@0xpatrickdev 0xpatrickdev assigned dckc and unassigned 0xpatrickdev Nov 18, 2024
@dckc
Copy link
Member

dckc commented Nov 19, 2024

collecting details on the scope of this issue...

design sketch says:

An exo within FUC that handles settling transactions.

  • Taps the SettlementAccount to be notified of deposits
  • Extracts the EUD from the address parameters of the virtual address receiving the deposit
  • Looks up associated transaction using an Advancer method
  • Processes according to the sequence diagram
    • When in doubt, hold funds
  • Informs advancer of settlement

re "the SettlementAccount" - that presumes there is one. Does this exo make it?

@dckc
Copy link
Member

dckc commented Nov 19, 2024

re "settles per product spec" - this bit of the diagram seems particularly relevant:

sequenceDiagram
    rect rgb(255, 245, 230)
        Note over FUC,CFA: Settlement Process
        Note over FUC,SA: Tap on account reads MintAmount,<br/>parses EUD from virtual address recipient<br/>and looks up AdvanceAmount,PoolFee,ContractFee.<br/>Matches against an unsettled transaction (by EUD and approx amount).
        %% Treat starting the advance as an atomic action. Assume it will complete once started.
        alt Advance was started:
            FUC->>SA: Initiate transfers<br>out of settlement
            SA->>P: Deposit the AdvanceAmount + PoolFee<br>(= MintAmount - ContractFee)
            SA->>CFA: Deposit ContractFee
        else Advance for matched transaction that has not yet started:
            P->>NC: PFM transfer<br>(MintAmount of Agoric USDC denom) to EUD
            NC->>EUD: deliver MintAmount<br>as final USDC denom
        else Settlement for unknown transaction:
            %% Have not received notification of this Amount,EUD from the watcher
            Note over SA: Leave funds in SettlementAccount.
            Note over SA: Wait for observation from watcher
        end
    end
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants