liberapay / liberapay.com

Source code of the recurrent donations platform Liberapay
https://liberapay.com/
1.67k stars 214 forks source link

Add bitcoin support #364

Closed MartinDelille closed 3 years ago

MartinDelille commented 8 years ago

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!

mattbk commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

The CC0 license has been discussed several times, e.g. https://github.com/liberapay/liberapay.com/issues/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 commented 5 years ago

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 commented 4 years ago

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 commented 3 years ago

Closing in favor of #1994.