Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: glascake on September 06, 2021, 09:18:21 PM



Title: Efficiently accepted small amounts of Bitcoin?
Post by: glascake on September 06, 2021, 09:18:21 PM
Hello forum,
Let’s say I have a shop and sell items ranging from 1-10$ how do I efficiently accept that?
If each user gets his own address (which is kinda necessary) and I want to transfer the funds from 1000 user, then I would have 1000 inputs which makes the fee incredibly high.
I calculated already with an online fee calculator, and the transaction fees currently would be ~10% of the actual value. Is it possible to send without any fees? Or less than 1sat/bit?

Greetings glsck


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: Upgrade00 on September 06, 2021, 09:56:11 PM
The lightening network could help you reduce the fees that are paid on transactions, considering that you're expecting multiple transactions with a lower amount.

I calculated already with an online fee calculator, and the transaction fees currently would be ~10% of the actual value.
This is wrong. The transaction fees depends on the ferrate at a particular time as well as the size of the transaction. It has nothing to do with the value of the Bitcoins being transferred; would be quite absurd to pay $100,000 for a $1 million worth transaction.

Is it possible to send without any fees? Or less than 1sat/bit?
You can technically create a transaction with no fees, but the chances of it getting verified by the nodes or confirmed is almost impossible now.
Lightening network reduces the fees significantly though.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: hosseinimr93 on September 06, 2021, 11:18:43 PM
As suggested by Upgrade00, the best thing you can do is to use lightning network.
For more information about lightning network, you can read the topics created by Rath_.

Basics of the Lightning Network (https://bitcointalk.org/index.php?topic=4940536.0)
Electrum Lightning Network walkthrough (https://bitcointalk.org/index.php?topic=5259973.0)
The Lightning Network FAQ (https://bitcointalk.org/index.php?topic=5158920.0)


Is it possible to send without any fees? Or less than 1sat/bit?
A transaction made from a segwit address can be broadcast with lower than 1 sat/byte. (Should be noted that a transaction paying that low fee may take a very long time to be confirmed.)

If you use native segwit addresses (those that start with bc1), the transaction fee can decrease up to 54%.
If you use nested segwit addresses (those that start with 3*), the transaction fee can decrease up to 38%.


*Not all addresses that start with 3 are segwit. Multi-sig addresses can start with 3 as well.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: n0nce on September 06, 2021, 11:26:23 PM
Hello forum,
Let’s say I have a shop and sell items ranging from 1-10$ how do I efficiently accept that?
If each user gets his own address (which is kinda necessary) and I want to transfer the funds from 1000 user, then I would have 1000 inputs which makes the fee incredibly high.
I calculated already with an online fee calculator, and the transaction fees currently would be ~10% of the actual value. Is it possible to send without any fees? Or less than 1sat/bit?

Greetings glsck
Is it a physical store? If so, you could use: https://breez.technology/.
It has a Point-Of-Sale feature where you can keep a list of items you sell with their respective dollar prices. Then you can quickly create an invoice for that amount of satoshis and display a QR code to get paid. Through the use of Lightning, it costs almost nothing to transfer the funds.

If it’s an online shop, I recommend using a Bitcoin payment processor that supports Lightning for the same reason of unbeatably low fees. My recommendation would be to use https://btcpayserver.org/.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: DaveF on September 07, 2021, 01:21:33 AM
If it’s an online shop, I recommend using a Bitcoin payment processor that supports Lightning for the same reason of unbeatably low fees. My recommendation would be to use https://btcpayserver.org/.

There are 'node in a box' setups.
raspiblitz: https://raspiblitz.org/
MyNode: https://www.mynodebtc.com/ (you need the $100 paid version to get btcpayserver auto-install)

That do most of the setup for you in terms of setting up your own BTC node / lightning node / btcpayserver.

You still have to know what you are doing to get it integrated into your store but they do get you most of the way there.
And both have active support.

-Dave


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: glascake on September 07, 2021, 08:06:29 AM
This is wrong. The transaction fees depends on the ferrate at a particular time as well as the size of the transaction. It has nothing to do with the value of the Bitcoins being transferred; would be quite absurd to pay $100,000 for a $1 million worth transaction.

I understand that, but if each address holds 10$ of Bitcoin, and for each new address/input added I pay 5$ fees (because fees are proportional to the transaction weight) it is equivalent
 to 5% (current fees)

The transaction time doesn’t really matter, if it’s 1 week I don’t care.


Is the lightning network usable if you only have the private key to the individual Segwit addresses? Is there a function like sweep from electrum?


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: n0nce on September 07, 2021, 08:09:13 AM
Is the lightning network usable if you only have the private key to the individual Segwit addresses? Is there a function like sweep from electrum?

You just display the users an invoice which is generated by your Lightning wallet and they pay that invoice. The money will arrive to you in seconds and no confirmations are needed.

I don't understand what you want to sweep. If you want to get the Bitcoin out of your Lightning wallet you can send the funds to an on-chain address of yours through a chain swap service like https://boltz.exchange/.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: glascake on September 07, 2021, 08:31:04 AM
You just display the users an invoice which is generated by your Lightning wallet and they pay that invoice. The money will arrive to you in seconds and no confirmations are needed.

I don't understand what you want to sweep. If you want to get the Bitcoin out of your Lightning wallet you can send the funds to an on-chain address of yours through a chain swap service like https://boltz.exchange/.

I have some limitations: server cannot store private keys, programming is in c#, every Bitcoin holder should be able to pay, not just lightning user, has to rund on windows and Linux.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: o_e_l_e_o on September 07, 2021, 08:35:58 AM
I understand that, but if each address holds 10$ of Bitcoin, and for each new address/input added I pay 5$ fees (because fees are proportional to the transaction weight) it is equivalent
 to 5% (current fees)
There is no way you should be paying $5 for each additional input. Even assuming legacy inputs, each additional input adds around 148 vbytes of size to your transaction. Paying at 1 sat/vbyte, which is fine at current mempool levels, works out to around 7-8 cents for each additional input. If you used segwit inputs instead, this would come down to around 3-4 cents for each additional input.

Given all this, a transaction which consolidated 1000 inputs would be around 148,000 vbytes for legacy and around 68,000 vbytes for segwit. If each of those inputs held $10, then at current prices you would be spending either $76 or $35 to consolidate $10,000, which is less than 1% and nowhere near 10% or even 5%.

How did you arrive at your numbers? What wallet or service is recommending you pay such a high fee?


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: ABCbits on September 07, 2021, 09:37:17 AM
If it’s an online shop, I recommend using a Bitcoin payment processor that supports Lightning for the same reason of unbeatably low fees. My recommendation would be to use https://btcpayserver.org/.

There are 'node in a box' setups.
raspiblitz: https://raspiblitz.org/
MyNode: https://www.mynodebtc.com/

That do most of the setup for you in terms of setting up your own BTC node / lightning node / btcpayserver.

For myNode, btcpayserver only available if you use premium version (cost $99) or you bother setup it by yourself.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: DaveF on September 07, 2021, 11:00:29 AM
For myNode, btcpayserver only available if you use premium version (cost $99) or you bother setup it by yourself.

True. I just now edited my reply to reflect the paid version is needed for the auto install of BTCPay

However, if you are going to be setting up a store, getting hosting, etc. $100 +/- of getting everything going is going to be minor.
You still have to get the hardware for the node anyway or if you are hosting it someplace there is the cost of the extra storage and such.

-Dave


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: glascake on September 07, 2021, 02:49:53 PM
How did you arrive at your numbers? What wallet or service is recommending you pay such a high fee?
buybitcoinworldwide.com but the fee drops each time i check, and only for 1 block confirmation.
I guess ill just put 1sat/vbyte and wait. I dont care about the time.



Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: BlackHatCoiner on September 07, 2021, 03:54:04 PM
Let’s say I have a shop and sell items ranging from 1-10$ how do I efficiently accept that?
If you want to accept it efficiently, there you could only go with LN. The whole purpose of the existence of LN is that it makes Bitcoin more efficient by filling the blockchain with less transactions and therefore, make you pay less in fees.

Note that efficiently isn't just about the fees. The blockchain will contain less transactions if we all start accepting the LN as a payment method instead. It'll scale more which brings efficiency.

MyNode: https://www.mynodebtc.com/ (you need the $100 paid version to get btcpayserver auto-install)
I'd recommend Umbrel (https://getumbrel.com/) instead of myNode. Yes, they're both fine and work similarly (myNode excels on QuickSyncing), but Umbrel is free as an open-source project should be. The full version of myNode isn't open-source.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: excro on September 09, 2021, 02:31:37 PM
That's why the lightning network exists. it has many advantages such as low transaction fees and very high transaction speeds

You can check this helpful website which explains how it works: http://lightning.network/how-it-works/ (http://lightning.network/how-it-works/)


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: Kakmakr on September 19, 2021, 06:44:54 PM
I see a lot of people are suggesting the Lightning Network, but the problem for him is going to be the adoption percentage of clients that are using Bitcoin without the Lightning Network and the people who are using the Lightning Network. There are simply not going to be enough clients that are using the Lightning Network.

I know a lot of people will say this, because they want the adoption of the Lightning Network to increase, but we are simply not at that stage where the adoption of the Lightning Network is mature enough to transition to it. (His business will go bankrupt, if he only does this)

The other option is payment processors, but they too kill merchants with fees.  >:(


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: larry_vw_1955 on September 20, 2021, 01:58:30 AM

Quote
The other option is payment processors, but they too kill merchants with fees.  >:(

Then just increase prices for customers. That's standard procedure.


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: DaveF on September 20, 2021, 02:05:05 AM
I see a lot of people are suggesting the Lightning Network, but the problem for him is going to be the adoption percentage of clients that are using Bitcoin without the Lightning Network and the people who are using the Lightning Network. There are simply not going to be enough clients that are using the Lightning Network.

I know a lot of people will say this, because they want the adoption of the Lightning Network to increase, but we are simply not at that stage where the adoption of the Lightning Network is mature enough to transition to it. (His business will go bankrupt, if he only does this)

The other option is payment processors, but they too kill merchants with fees.  >:(

That was why a few of us were mentioning BTCPay server.
It can take both BTC and lightning payments.
AND with a little bit of coding on the back end you can give a discount for using lightning so people are incentivized to use it, vs regular BTC payments.

-Dave


Title: Re: Efficiently accepted small amounts of Bitcoin?
Post by: DannyHamilton on September 20, 2021, 04:44:45 PM
I understand that, but if each address holds 10$ of Bitcoin, and for each new address/input added I pay 5$ fees (because fees are proportional to the transaction weight) it is equivalent
 to 5% (current fees)

5% of $10 is $0.50, not $5.

Furthermore, $0.50 per input is a ridiculously high fee.  My transactions right now are getting confirmed in a reasonable amount of time with a fee of about $0.08

If each user gets his own address (which is kinda necessary)

No.  Every transaction should have it's own address.  If the same user engages in multiple transactions, then each of those transactions should have its own address.

and I want to transfer the funds from 1000 user, then I would have 1000 inputs

With on-chain (non-lightning) transactions, every transaction is going to be a separate input regardless. It doesn't matter if they each go to a different address, or if they all go to the same address, they are still all going to be separate inputs.

I calculated already with an online fee calculator, and the transaction fees currently would be ~10% of the actual value. Is it possible to send without any fees?

It just isn't a great practice to use on-chain transactions for small value transactions.  There are a few things you can do to better manage costs.

For example, if you provide products that your customers keep coming back for more of on a regular basis, then you can maintain an account for each customer. Then you can have them make a single larger deposit, and as each purchase happens, you can just reduce the value of their account. When their account balance falls below some pre-determined threshold they can be required to make another deposit.  This is how the electronic toll system for the local toll roads works here.  Credit card transaction costs would make it cost-prohibitive for the local toll authority to make a separate $0.50 transaction every time a car passes through the toll sensor.  Instead, users are required to maintain a minimum balance, and the toll authority processes a charge of $20 (or more) to fund the account whenever the balance falls too low.

Another option, if your customers are likely to be trusted to manage debt well, would be to run a tab.  Each customer would be allowed to receive products/services and the cost would be added to a running balance due. They can be asked to make regularly scheduled payments, or to make a payment whenever their balance due reaches some threshold (or both).

Yet another option would be to use a payment processor such as Coinbase. Then any customer that stores their funds at Coinbase will be able to make payments entirely off-chain with 0 transaction fees and no increase in inputs for you.

Still another off-chain solution (as mentioned by others already) is lightning network.

If you don't like any of the above solutions then consider either of the following:

You could offer Bitcoin as an option for payment ONLY on larger orders.  Set some threshold and let customers know that any purchase larger than the threshold will have Bitcoin as a payment option.

or

You could figure out what your costs are and add them to your prices. Charge an extra 1% or so per item to cover those expected costs.