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

Fidelity Bonds #31

Closed
dergigi opened this issue Jan 29, 2022 · 13 comments · Fixed by #307
Closed

Fidelity Bonds #31

dergigi opened this issue Jan 29, 2022 · 13 comments · Fixed by #307
Assignees
Labels
enhancement New feature or request

Comments

@dergigi
Copy link
Contributor

dergigi commented Jan 29, 2022

Add support to lock up funds in a fidelity bond.

As per Adam's comment below, we can use the gettimelockaddress API call to create fidelity bonds.

@dergigi dergigi added the concept Wild idea, or too many details unknown yet label Jan 29, 2022
@dergigi dergigi added this to JAM Jan 29, 2022
@dergigi dergigi moved this to Backlog 🪵 in JAM Feb 1, 2022
@AdamISZ
Copy link
Contributor

AdamISZ commented Feb 12, 2022

Was just looking at the Issue list here and noticed this. The API exposes an endpoint to get a timelocked destination, and then you can send funds to it. Maker automatically uses the largest FB utxo that exists in the wallet. Clearly it would need some UI but, given this, I don't think API blocks here, unless I forgot something.

@dergigi
Copy link
Contributor Author

dergigi commented Feb 22, 2022

Wonderful! Thanks for the clarification, Adam!

@dergigi dergigi added enhancement New feature or request and removed concept Wild idea, or too many details unknown yet labels Feb 22, 2022
@dergigi dergigi moved this from Backlog 🪵 to Todo 📝 in JAM Feb 22, 2022
@dergigi dergigi added this to the v0.1.0 - What's in a Name? milestone Feb 22, 2022
@abhiShandy
Copy link

I'm interested in adding this feature since I need it. Do you have a workflow in mind?

I can think of the following checklist:

  • show an optional FB option on Earn page
  • generate a QR code with a desired year and month
  • Update the wallet page to show FB balance (with locked/unlocked status)
  • show appropriate warnings to prevent user from funding it twice
  • show that FB is being used when running the YG

@MaxHillebrand
Copy link
Contributor

Update the wallet page to show FB balance (with locked/unlocked status)

add when the FB unlocks/expires.

also, how about having a "auto renew" function, so that when the FB expires, the wallet automatically opens a new one with the same parameters.

@theborakompanioni
Copy link
Collaborator

Update the wallet page to show FB balance (with locked/unlocked status)

add when the FB unlocks/expires.

👍

also, how about having a "auto renew" function, so that when the FB expires, the wallet automatically opens a new one with the same parameters.

Guess making this not only possible but easier is a great improvement. Little skeptical of doing something like locking coins automatically.
As a first step, what about presenting a big button to create a Fidelity Bond (if none exists) when the user wants to start a maker, which must be manually confirmed?

@ghost
Copy link

ghost commented Mar 2, 2022

There are some design explorations for fidelity bonds in Figma already. Just posting them here for reference.

@dergigi
Copy link
Contributor Author

dergigi commented Mar 22, 2022

Moved to a later version. Not saying we shouldn't work on this, but as @openoms correctly pointed out in Call 11, we should prioritize #179 so users can create fidelity bonds in a private manner. We don't want users to create a bond with KYC'd UTXOs, announcing to the world what they are doing.

@theborakompanioni theborakompanioni self-assigned this Apr 13, 2022
@theborakompanioni
Copy link
Collaborator

I'm interested in adding this feature since I need it.

Hey @abhiShandy , have you already started working on this?
I have given it some thought and started a small prototype.

Do you have a workflow in mind? I can think of the following checklist:

* [ ]  show an optional FB option on Earn page

* [ ]  generate a QR code with a desired year and month

* [ ]  Update the wallet page to show FB balance (with locked/unlocked status)

* [ ]  show appropriate warnings to prevent user from funding it twice

* [ ]  show that FB is being used when running the YG

Points look solid. Point 2 and 4 can be skipped if the user never sees an address in the first place.
Since a fidelity bond should be created without change outputs, I can image reducing the form down to an account dropdown + timelock form for the very first version.

Advanced mode can of course do it differently, e.g. by displayed the timelocked address - but I would not show a qr code for a timelocked address on any of the screens).

What do you think?

@abhiShandy
Copy link

No, I haven't started working on it.

I like your idea. Let's keep it simple for the first version and take it from there.

However, I think we should give some information about fidelity bonds to new Joinmarket users so that they can increase their chances of generating yield.

@dergigi
Copy link
Contributor Author

dergigi commented Jun 9, 2022

Draft PR open: #307

@dergigi dergigi linked a pull request Jun 9, 2022 that will close this issue
@theborakompanioni
Copy link
Collaborator

This might also come in handy once it is merged and available via api: Script: Add bond-calculator.py #1254. Adds a nice info about the position relative to other FBs, e.g.

Top 68% of the orderbook by value

@PulpCattel
Copy link

@theborakompanioni Let me know if there are other stats you would like to see.
Note also that these stats require the orderbook, I'm not yet sure what the best solution would be there. I.e., how a RPC client like JAM can get makers information (or if the server should do it instead).

@theborakompanioni
Copy link
Collaborator

@theborakompanioni Let me know if there are other stats you would like to see.

Thank you! I think it contains all the info a user would want when creating a Fidelity Bond. Is there anything you thought of adding?

Note also that these stats require the orderbook, I'm not yet sure what the best solution would be there. I.e., how a RPC client like JAM can get makers information (or if the server should do it instead).

Yeah, not totally sure myself. Maybe we try parsing the orderbook html (if available) and recreate the information, but I think there are other and better ways to do it. Let's see. Maybe you have some ideas that'd be less clumsy?

@ghost ghost closed this as completed in #307 Jun 15, 2022
Repository owner moved this from Todo 📝 to Done ✅ in JAM Jun 15, 2022
This issue was closed.
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
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants