bbrtj / btcpaywall

Self-hosted bitcoin payment system
BSD 2-Clause "Simplified" License
7 stars 3 forks source link

btcpaywall requires minimum 5460 satoshis, but the btc network minimum is 546. #3

Closed mvsjes2 closed 2 years ago

mvsjes2 commented 2 years ago

https://support.blockchain.com/hc/en-us/articles/210354003-What-is-the-minimum-amount-I-can-send- shows the minimum shatoshis is 546 or .00000546 BTC, however:

lib/BtcPaywall/Form/Request.pm:use constant MINIMUM_AMOUNT => 5460;
bbrtj commented 2 years ago

That's interesting, I'll have to dig deeper. I'm sure coinomi allows me to send at least 5460 AB79E33F-A3F5-436F-B65B-91A0E40E07A8

mvsjes2 commented 2 years ago

I think that's probably a coinomi restriction, not a bitcoin network restriction. I have the same problem with bitbuy - they have their own minimum, presumably so that their own resources aren't tied up with trivial amounts (guessing).

-- Robin Murray Halifax, Nova Scotia Canada

On Fri, 8 Oct 2021 at 13:11, brtastic @.***> wrote:

That's interesting, I'll have to dig deeper. I'm sure coinomi allows me to send at least 5460 [image: AB79E33F-A3F5-436F-B65B-91A0E40E07A8] https://user-images.githubusercontent.com/44323413/136589259-6f3156a2-1a9e-4ed0-9aec-1703368f04dd.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brtastic/btcpaywall/issues/3#issuecomment-938761340, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYT3UNPO3LHCI342P3FHM3UF4J3BANCNFSM5FTPRUKA .

bbrtj commented 2 years ago

Seems that what I called minimum amount is actually called dust threshold in bitcoin core, and it used to be 5460 in an older version, but has been reduced to the value you're mentioning. Seems like this is configurable by miners, and 546 is just a default value, so technically it's possible for smaller transactions to get confirmed, if the right miner choses them.

Given that information I would just remove the minimum all together and add a mention of the dust threshold in readme. It may also be a configurable .env value, but since only registered clients can create payment requests, that may be an overkill. What do you think?

mvsjes2 commented 2 years ago

One thing for sure is it's confusing.

My druthers would be an env var that is set to whatever is generally considered the minimum at the time but can be easily updated by the user as bitcoin changes. Having a reasonably documented env var will at least make the user consider the problem and allow them to monitor it.

On Sat, Oct 9, 2021, 3:49 AM brtastic, @.***> wrote:

Seems that what I called minimum amount is actually called dust threshold in bitcoin core, and it used to be 5460 in an older version, but has been reduced to the value you're mentioning. Seems like this is configurable by miners, and 546 is just a default value, so technically it's possible for smaller transactions to get confirmed, if the right miner choses them.

Given that information I would just remove the minimum all together and add a mention of the dust threshold in readme. It may also be a configurable .env value, but since only registered clients can create payment requests, that may be an overkill. What do you think?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brtastic/btcpaywall/issues/3#issuecomment-939241270, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYT3UNXTDVUNMIVOZHA7QTUF7QYRANCNFSM5FTPRUKA .

bbrtj commented 2 years ago

Fixed, configurable in .env in 925782bdcd20108704ba6f30115416ca38232c50. Make sure to copy over the value from .env.example to .env

mvsjes2 commented 2 years ago

Thank you for your response!

-- Robin Murray Halifax, Nova Scotia Canada

On Sat, 9 Oct 2021 at 12:57, brtastic @.***> wrote:

Closed #3 https://github.com/brtastic/btcpaywall/issues/3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brtastic/btcpaywall/issues/3#event-5438272047, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYT3UPBPWMLZE3F2LY537DUGBQ6PANCNFSM5FTPRUKA .