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

Issues when changing wallet after running out of credits #1791

Open
mguidon opened this issue Nov 26, 2024 · 3 comments · May be fixed by ITISFoundation/osparc-simcore#7033
Open

Issues when changing wallet after running out of credits #1791

mguidon opened this issue Nov 26, 2024 · 3 comments · May be fixed by ITISFoundation/osparc-simcore#7033
Assignees
Labels
Feedback Feedback through frontend type:bug Issue that prevents to perform a certain task, features that don't work as t
Milestone

Comments

@mguidon
Copy link
Member

mguidon commented Nov 26, 2024

see https://z43.manuscript.com/f/cases/195319/Issues-when-changing-wallet-after-running-out-of-credits

Tasks

Preview Give feedback
No tasks being tracked yet.

Tasks

Preview Give feedback
No tasks being tracked yet.
@mguidon mguidon added type:bug Issue that prevents to perform a certain task, features that don't work as t Feedback Feedback through frontend labels Nov 26, 2024
@matusdrobuliak66
Copy link
Contributor

matusdrobuliak66 commented Dec 4, 2024

Discussed with @odeimaiz

Proposed solution:

  • When a user attempts to change the wallet on a project, this change is prohibited if the current wallet has a negative balance.
  • We introduce a new endpoint that will "pay off the debt" and unblock the ability to change the wallet on the project resource. (OM: unblock it in general, right?)

@mguidon mguidon added this to the Event Horizon milestone Dec 16, 2024
@matusdrobuliak66
Copy link
Contributor

matusdrobuliak66 commented Jan 6, 2025

Discussed with @odeimaiz

Proposed solution:

  • When a user attempts to change the wallet on a project, this change is prohibited if the current wallet has a negative balance.
  • We introduce a new endpoint that will "pay off the debt" and unblock the ability to change the wallet on the project resource. (OM: unblock it in general, right?)

Additional discussion with @odeimaiz @pcrespov

  • We need to introduce new state IN_DEBT to understand the debt of the project
  • We need to introduce transfer of credits between wallets
  • We need to introduce new endpoint to "pay the debt" = "transfer credits from wallet to another"

Research: https://github.com/beancount/beancount

@matusdrobuliak66
Copy link
Contributor

Discussed with @odeimaiz
Proposed solution:

  • When a user attempts to change the wallet on a project, this change is prohibited if the current wallet has a negative balance.
  • We introduce a new endpoint that will "pay off the debt" and unblock the ability to change the wallet on the project resource. (OM: unblock it in general, right?)

Additional discussion with @odeimaiz @pcrespov

  • We need to introduce new state IN_DEBT to understand the debt of the project
  • We need to introduce transfer of credits between wallets
  • We need to introduce new endpoint to "pay the debt" = "transfer credits from wallet to another"

Research: https://github.com/beancount/beancount
Here’s the formatted version for easy copy-pasting:


Beancount Overview

Beancount is an open-source double-entry accounting system that is highly specialized for accounting and bookkeeping. It is designed for financial accuracy and might offer features that align with your requirements.


Pros of Beancount

  • Double-Entry Accounting:

    • Every transaction is recorded in two accounts (credit and debit), ensuring financial accuracy.
    • Prevents common errors like balance mismatches.
  • Time-Tested Accounting Model:

    • Handles edge cases like rounding errors and concurrency issues in financial transactions.
  • Simplicity in Integration:

    • Provides a format and tools for recording and querying transactions.
  • Open Source and Lightweight:

    • You can customize it if needed, without licensing concerns.

Cons of Beancount

  • Not Designed for Real-Time Operations:

    • Beancount is file-based and not optimized for high-frequency updates or real-time systems.
    • Parsing large transaction logs might become a bottleneck.
  • Requires Custom Adapters:

    • You’ll need to write integration layers between your service and Beancount for API-driven updates.
  • Less Scalable for Complex Rules:

    • If your system has dynamic rules (e.g., promotional credits, tier-based deductions), you might outgrow Beancount quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Feedback through frontend type:bug Issue that prevents to perform a certain task, features that don't work as t
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants