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

Add bitcoin support #364

Closed
MartinDelille opened this issue Jun 22, 2016 · 62 comments
Closed

Add bitcoin support #364

MartinDelille opened this issue Jun 22, 2016 · 62 comments
Labels
payments issues about money transfers

Comments

@MartinDelille
Copy link
Contributor

After today email discussion, I think it's time to think about bitcoin support. I have collected two ressources that might help me in the process:

I need to do some further investigation but the main issue will be how to deal with the situation where someone give bitcoin to another accept only euro. I think we agree not to partition money flow? What should be the referal value in the system?

Feel free give me your point of view!

@MartinDelille MartinDelille self-assigned this Jun 22, 2016
@MartinDelille MartinDelille added the payments issues about money transfers label Jun 22, 2016
@Changaco

This comment has been minimized.

@Changaco Changaco added the blocked issues that can't be fixed yet label Jul 19, 2016
@Changaco
Copy link
Member

Changaco commented Feb 9, 2017

Quote from Learning From A Year of Security Breaches:

Bitcoin is targeted, even if you store none.

Platform companies are often compromised with the assumption that they may have access to, or integrate with, a bitcoin company. Please refer to the Blockchain Graveyard for more information on this trend, or this public example from SendGrid’s blog.

@Nutomic
Copy link

Nutomic commented Aug 24, 2017

It should be pretty simple to do this kind of integration with Coinbase Payment Buttons. Basically you just have to register a merchant account and embed the button. And you can configure it to do automatic, daily payouts to a bank account.

@ollieparanoid
Copy link

ollieparanoid commented Oct 18, 2017

I am afraid to use my card online (especially on liberapay.com I have never heard about), any option for paypal or bitcoin?

I've gotten similar e-mails (with bitcoin, monero, not paypal) and would appreciate this feature very much 🎉

Thanks for making this awesome platform in the first place, and I understand that the feature is blocked right now.

@ericfont
Copy link

Sorry if I'm pointing out the obvious, but I feel compelled to note that bitcoin itself does not have a mechanism for recurring payments (in other words an owner of a wallet can only "push" payments, but a receiver can't "pull" payments), which clearly is essential for any patronage-based donation service.

It seems Coinbase has implemented "pull" payments, so I'd second what Nutomic says.

(I do understand that this issue is blocked on #182, but I'm really hoping to integrate bitcoin, because that would be a game-changer).

@pm73
Copy link

pm73 commented Dec 8, 2017

I would like to say that I actually prefer to have option of making "push" payment.
I see you allow wire transfer according to FAQ, so it is already supported.

Please note that Coinbase can arbitrary suspend an account.
If you go with them anyway, please make sure user can make one-time payment without Coinbase account and giving them his/her data.

CoinPayments allows sender to choose one of many cryptocurrencies, which is quite useful considering how expensive Bitcoin transaction can be. I'm not affiliated with them, I just paid them for something and it worked.

@bjorn
Copy link

bjorn commented Dec 10, 2017

bitcoin itself does not have a mechanism for recurring payments (in other words an owner of a wallet can only "push" payments, but a receiver can't "pull" payments), which clearly is essential for any patronage-based donation service.

I don't get this statement, and would also prefer to "top up" manually rather than having a service pull money out of my pocket on its own account. It's not like I'm paying for a service here, I'm just donating. So if the balance runs out, then the donation won't go through. No legal action is required since I wasn't obliged to keep donating. A "low balance" warning would be nice of course.

@ericfont
Copy link

You're right, it's not a problem for topping up.

@maurokenny
Copy link

@bjorn you are right. Maybe just a message to remember to send more money to liberapay would be enough.

@pm73 CoinPayments seems to be cheaper.

Another option is https://www.bitwage.com/

How does it work today? I mean, when someone sends money, does it go to a liberapay's bank account and then every month you send some amount to the content creator using mangopay? Or does it go to mangopay's account and then they send every month?

@maurokenny
Copy link

@MartinDelille I think that CoinPayments and https://www.bitwage.com/ do the job

@hopeseekr
Copy link

I can definitely implement CoinPayments.net support for this project.

I have done this both commercially and for free for non-profits and open source projects many times. It takes me about 2-3 hours of work.

Just let me know!

@jorgesumle
Copy link
Contributor

@hopeseekr, sure.

It would be great. Now this issue isn't blocked by #182, so if it works well we will merge it. Remember that there are also other cryptocurrencies apart from BitCoin (for example, FairCoin), so you probably should try to make some of the code reusable. If you decide to work on that, let us know, and we will add you to the Liberapay team.

@hopeseekr
Copy link

It will support over 50 cryptocurrencies, but faircoin isn't one of them (first I heard of it).

I will do this next week if you get everything setup.

It's a 90% HTML5 + JS implementation. The only part that comes from Python would be the fiat currency price and item name.

@hopeseekr
Copy link

If the coin supports QR codes, then once I get the HTML5 framework setup, your devs should be able to add additional QR/coins relatively easily. That's what my existing clients do.

@hopeseekr
Copy link

@jorgesumle What I need:

  1. The source code location for where your checkout button is. Like where they say "pay" by credit card.
  2. A snippet of code (in the form of a GitHub gist) showing how to inject the product name and fiat currency price into a JavaScript JSON object.

In this format:

{
    "item_name": "<?php echo $item->name; ?>",
    "item_price": "<?php echo $item->price; ?>",
}
  1. The location of CSS and HTML for the shopping cart page.

I have a very limited familiarity with Python. That's the only risk I see.

@jorgesumle
Copy link
Contributor

jorgesumle commented Feb 6, 2018

@Changaco has more knoledge of the codebase than me, but I think that you can find pretty much everything using grep with the option -R and some text of the English page you want to modify. For example, grep -R '\<Pay\>' www/ returns:

www/%username/invoices/%invoice_id.spt:        <button class="btn btn-success btn-lg" name="action" value="accept">{{ _("Accept and Pay") }}</button>

@Serkan-devel
Copy link

Has anyone here looked into POA bridge for this?

@markasoftware
Copy link

If this becomes implemented, in the "spirit" of Bitcoin it would be best if transactions are handled through a self-hosted Bitcoin node, either by directly interacting with the Bitcoin Core RPC/REST API, or a combination of the FOSS BTCPay server and the Bitcoin Core APIs only for sending outgoing transactions.

@MartinDelille
Copy link
Contributor Author

There is an interesting proposal about Nano crypto currency here: #1171 (comment)

@rikur
Copy link

rikur commented Jul 17, 2018

People have barely heard of Bitcoin and now we want to get them to learn about Nano? How would you ever buy that? You first setup Bitcoin wallet, then buy some Bitcoin, then setup a Nano wallet and then find some online exchange to buy Nano?

I think you'd lose most of your users.

@trebmuh
Copy link
Member

trebmuh commented Sep 7, 2018

I've added a third vote against that, FWIW.

@MartinDelille
Copy link
Contributor Author

Ok this is not nice for people who want to use bitcoin but I respect your vote.

@trebmuh
Copy link
Member

trebmuh commented Sep 7, 2018

That is not more "not nice for people who want to use bitcoin" that people who want to use it are then being "not nice for people who doesn't want to use bitcoin".

Please, don't encourage people with different opinions to be one against each other.
Thanks for the respect anyway.

@MartinDelille
Copy link
Contributor Author

Ok I answered too quickly. Having different point of view is crucial for a project like this and I would like to apologize.

@trebmuh
Copy link
Member

trebmuh commented Sep 7, 2018

Thank you.

@trebmuh
Copy link
Member

trebmuh commented Nov 15, 2018

2 more people interested in having bitcoin support in LP from the Diaspora* LP account.

@MagicFab
Copy link

One way to implement this for Bitcoin (or any crypto currency, really) would be to initially:

  • Have an option to include a cryptocurrency address (text string long enough for Bitcoin, Ethereum, etc.)
  • Generate a QR-Code from the address
  • Generate a proper URI for the address (for example bitcoin:$STRING)
  • On the user page, show a small logo, clickable URI and QR code, possibly suggest an amount in the main currency calculated via bitcoinaverage.com - for example: "Send ~3.63 mBTC (~20$ USD)"
  • For subscription/recurrent contributions, generate an email at the same frequency that would remind the donor to send funds by providing a URL to the Liberapay user page.

Phase 2 of this integration could include validating addresses, using an API to Bitcore, etc.

@MartinDelille
Copy link
Contributor Author

This would be a good start. We could even remove the QR-Code from the first version.

@mattbk
Copy link
Contributor

mattbk commented Nov 17, 2018

For subscription/recurrent contributions, generate an email at the same frequency that would remind the donor to send funds by providing a URL to the Liberapay user page.

This would require storing the cryptocurrency donation in the database in some way, but not having any control over whether the donation was actually completed. I'm not sure how keen I am on that.

@MagicFab
Copy link

This would require storing the cryptocurrency donation in the database in some way, but not having any control over whether the donation was actually completed. I'm not sure how keen I am on that.

Can you elaborate ? Is your concern the amount of donations, the inability to confirm them automatically or both?

The transaction confirmation could be entered manually but it's not convenient and can't be expected of donors. Every crypto transaction is in the blockchain so this is available, just not automatically.

This is the kind of "2.0" feature that could be crowdfunded by crypto donors.

@mattbk
Copy link
Contributor

mattbk commented Nov 19, 2018

The inability to confirm them.

@MagicFab
Copy link

Re-thinking this there really is no reason why you couldn't check a user's crypto address after a link to pay has been sent (within 1-2 days?) and verify any funds have been sent there, for those with public blockchain support (like Bitcoin). For others it may not evene be wanted to track the amounts (eg. Monero). What's the reason for wanting confirmation of such donations on LP? Commitments to donate could be tracked separately in this case (vs. hard-confirmed donations).

@mattbk
Copy link
Contributor

mattbk commented Nov 19, 2018

I don't speak for anyone but myself, but mostly it was this part that goes beyond an "initial" step:

For subscription/recurrent contributions, generate an email at the same frequency that would remind the donor to send funds by providing a URL to the Liberapay user page.

To avoid abuse/confusion/inflation of the transfer statistics, it seems like confirmation is warranted unless all transactions are treated as unclaimed donations, which aren't built into the notifications right now. Without doing the extra work up front to verify that transfers took place, it might not be worth the effort to go the rest of the way.

@MagicFab
Copy link

As a crypto receiver or donor I would be OK with both situations: an idea of monthly commitments or confirmed transactions, or none at all.
As a non-crypto only donor/receiver, I would only want to see it's possible (an option) to enable it, not all the details.

@gjhklfdsa
Copy link

gjhklfdsa commented Jan 6, 2019

One way to implement this for Bitcoin (or any crypto currency, really) would be to initially:

* Have an option to include a cryptocurrency address (text string long enough for Bitcoin, Ethereum, etc.)

* Generate a QR-Code from the address

* Generate a proper URI for the address (for example bitcoin:$STRING)

* On the user page, show a small logo, clickable URI and QR code, possibly suggest an amount in the main currency calculated via bitcoinaverage.com - for example: "Send ~3.63 mBTC (~20$ USD)"

* For subscription/recurrent contributions, generate an email at the same frequency that would remind the donor to send funds by providing a URL to the Liberapay user page.

Phase 2 of this integration could include validating addresses, using an API to Bitcore, etc.

One idea to consider would be to instead make a web wallet (via something similar to CoinBin). It could then encrypedly store the keys on LiberaPay's servers.
Although, I do like the idea of also enabling users to utilize whatever cryptocurrency client they choose.

@filips123
Copy link

filips123 commented Jan 14, 2019

I agree with @MagicFab. For the start, there could just be some input to specify addresses (for Bitcoin, Litecoin, Ethereum and others) and show them on profile along with QR code and some text.
But later, there should also be support for some APIs and better integration.

The problem of @gjhklfdsa idea is security. That wallet should be trusted because anyone with a private key could steal coins. Also, it could not be practical because people would need to use separate wallets for their main and LiberaPay accounts. I think it would be better to integrate it with existing wallets.


And for subscriptions, Ethereum recently added support for them (ERC 1337). This could be done with 8x protocol although it is currently only available on testnet. It allows providers (in this case people that want to receive donations) to set up how often and you many they want to receive.

@hopeseekr
Copy link

I forked LiberaPay in 2018 and managed to add native support for Bitcoin, Dash and Ethereum. The code is on a private server of the client I worked for at the time, but I know for a fact it's possible.

@IzzySoft
Copy link

With currently Paypal and Stripe being the only options to withdraw, please also consider withdrawal via Bitcoin, to have at least one option that's somehow privacy friendly. There are payment processors for that, there are APIs, so it should be possible to at least have that (while probably waiting another few years for direct SEPA). That could revive several accounts that fell dead with the closure of Mangopay (like mine) as well as attract new "receivers".

@MagicFab
Copy link

@hopeseekr is there anything preventing contributing that code back here ?

I mentioned in another comment "Phase 2" could implement funds/payment verification, etc. This project has a full implementation which could be used as inspiration: https://btcpayserver.org/

@hopeseekr
Copy link

I literally don't think you guys are interested. I also did it for a private company in a foreign land where BTC is far far more widely spread amongst the masses (Singapore).

I have NO PROBLEM doing this gratis for you guys.

What I'd need is some sort of guarantee that my for-free and for-the-love-of-BTC that my PR wouldn't just languish in the wind. I know for a fact the company in Singapore is using it commercially.

That said, I have qualms about the license. CC0 1.0 Universal can be interpreted as a cessation of all rights... I'd much rather MIT License my contributions.

My problems with the CC0 and cryptocurrencies are thus:

  1. By putting this in the public domain, all authors + owners, including myself, would have zero legal recourse against any bad actors.
  2. The OSI rejected the CC0 in 2012 because of its patents clause could allow corporations to actually patent software released under the CC0, something that other public domain licenses (such as the Unlicense) proactively defend against. In fact this is the primary reason why public domaining important software is infeasible at this point in human history. https://opensource.org/faq#cc-zero
  3. There would be zero legal attack possible against Terribly Bad Actors: Read malware enthusiasts, scammers, etc. and believe me, a public domain bitcoin payment system would surely attract those types.

@mattbk
Copy link
Contributor

mattbk commented Jun 7, 2019

The CC0 license has been discussed several times, e.g. #564.

If I understand correctly, if you released your code and it was incorporated as a dependency, could you not use whatever license you would like?

@hopeseekr
Copy link

Yeah that's a good idea. If this project has a type of plugin system, I could license it under the standard MIT License and still be able to revoke the license from bad actors once identified.

@bigjesusmordino
Copy link

Absolutely, I'd donate a lot to worthwile projects if bitcoin was supported.

Without bitcoin? nada.

I mean, come on guys, a lot of open source supporters made a considerable amounts on bitcoins but keep the funds in bitcoin, think about that.

@Changaco
Copy link
Member

Changaco commented Apr 8, 2021

Closing in favor of #1994.

@Changaco Changaco closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payments issues about money transfers
Development

No branches or pull requests