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

[Job Launcher] Payments refactor #2982

Open
portuu3 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #3069
Open

[Job Launcher] Payments refactor #2982

portuu3 opened this issue Jan 9, 2025 · 0 comments · May be fixed by #3069
Assignees

Comments

@portuu3
Copy link
Collaborator

portuu3 commented Jan 9, 2025

Description
Currently, the system only supports funding an escrow using HMT tokens. To enhance flexibility, we need to allow users to fund escrows using other token balances (e.g., USD) when the HMT balance is insufficient. This involves updating the logic to support cross-token funding and reflecting this correctly in the database, specifically in the payments table.

Implementation details
Add the token fund to escrow table to reflect in the database the token used for funding the escrow when we enable the ability to use other tokens than HMT.

Add the ability to use other tokens balance to fund an escrow, for example imagine a user has these balances:

  • 100 HMT (rate 0.05 USD)
  • 50 USD

The user wants to launch an escrow and fund it with 200 HMT. In payments table we should reflect it as:

Amount Token USD_rate Job Id
-100 HMT 0.05 1
-5 USD 1 1
@portuu3 portuu3 moved this to Todo in Core-tech - 2024 Jan 9, 2025
@portuu3 portuu3 moved this to Todo in Core-tech - 2025 Jan 13, 2025
@portuu3 portuu3 added this to the Multitoken funding milestone Jan 13, 2025
@flopez7 flopez7 assigned portuu3 and unassigned flopez7 Jan 24, 2025
@flopez7 flopez7 moved this from Todo to In Progress in Core-tech - 2025 Jan 24, 2025
@portuu3 portuu3 linked a pull request Feb 5, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants