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

Treat rates as composite exchange and network rates #2742

Open
4 tasks
Tracked by #2229
sabineschaller opened this issue May 23, 2024 · 0 comments
Open
4 tasks
Tracked by #2229

Treat rates as composite exchange and network rates #2742

sabineschaller opened this issue May 23, 2024 · 0 comments
Labels
breaking Issue/PR that introduces breaking changes pkg: backend Changes in the backend package.

Comments

@sabineschaller
Copy link
Member

sabineschaller commented May 23, 2024

Context

Currently, Rafiki requires an exchange rates endpoint EXCHANGE_RATES_URL, that provides exchange rates in the format

{
  base: "CURRENCY_CODE_0",
  rates: {
    "CURRENCY_CODE_1": value, // exchange rate
    ...
  }
}

However, as soon as we enable multi-hop routing, the rates should not just reflect the exchange rates but also the fee of forwarding packets. No middle connector would want to forward the packets for free. Hence, we need to update the endpoint to be called RATES_URL again and to change the expected response to be of the form

{
  base: "CURRENCY_CODE_0",
  rates: {
    "CURRENCY_CODE_0": value, // just forwarding fees
    "CURRENCY_CODE_1": value,  // exchange rate + exchange fee + forwarding fee
    ...
  }
}

Todos

  • rename EXCHANGE_RATES_URL to RATES_URL
  • rename EXCHANGE_RATES_LIFETIME to RATES_LIFETIME
  • rename and update OpenAPI spec
  • update docs to explain expected behavior
@sabineschaller sabineschaller added pkg: backend Changes in the backend package. pkg: documentation Changes in the documentation package. type: documentation (archived) Improvements or additions to documentation breaking Issue/PR that introduces breaking changes labels May 23, 2024
@mkurapov mkurapov removed pkg: documentation Changes in the documentation package. type: documentation (archived) Improvements or additions to documentation labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Issue/PR that introduces breaking changes pkg: backend Changes in the backend package.
Projects
Status: Backlog
Development

No branches or pull requests

2 participants