BitcoinTalk

Bitcoin snack machine (fast transaction problem)

Bitcoin snack machine (fast transaction problem)

How would a Bitcoin snack  machine work?

1) You want to walk up to the machine. Send it a bitcoin.
2) ?
3) Walk away eating your nice sugary snack. (Profit!)


You don't want to have to wait an hour for you transaction to be confirmed.
The vending machine company doesn't want to give away lots of free candy.

How does step 2 work?

Re: Bitcoin snack machine (fast transaction problem)

For low value items like that you would normally accept the transaction without any confirmations.  If the bitcoin node that the vending machine is talking to accepted the transaction then it's probably valid.  I think the only danger in that is if it was somehow double spent in a short time window - then it may never get into any blocks.  I'm not sure if that's really possible, maybe it is, but it seems like it would be hard to pull it off reliably.

Re: Bitcoin snack machine (fast transaction problem)

I live near the East coast of the US and I've sent Bit Coins to friends on the West Coast, seems to be fairly instant as long as both clients are well connected to the network.

Re: Bitcoin snack machine (fast transaction problem)

I live near the East coast of the US and I've sent Bit Coins to friends on the West Coast, seems to be fairly instant as long as both clients are well connected to the network.

It will go instantly, but I think the issue is confirmations. Even if you accept just 1 confirmation it will take an average of 10 minutes to get it. In this time the cheater could go to another vending machine and then just let the two accounts duke it out for his one payment while he eats two snacks.

The first solution that comes to my mind is a "verified insta-cash: service. You ship them some amount, they verify it within an hour or whatever and give you a card with credits that goes into vending machines and such. Or you could have an account with the vending company. Or you could use some physical currency, we don't necessarily need just one type of money.

Re: Bitcoin snack machine (fast transaction problem)

I live near the East coast of the US and I've sent Bit Coins to friends on the West Coast, seems to be fairly instant as long as both clients are well connected to the network.

It will go instantly, but I think the issue is confirmations. Even if you accept just 1 confirmation it will take an average of 10 minutes to get it. In this time the cheater could go to another vending machine and then just let the two accounts duke it out for his one payment while he eats two snacks.

The first solution that comes to my mind is a "verified insta-cash: service. You ship them some amount, they verify it within an hour or whatever and give you a card with credits that goes into vending machines and such. Or you could have an account with the vending company. Or you could use some physical currency, we don't necessarily need just one type of money.
That might be a good experiment to try on the test network to see what happens. I think it both machines are going through the same node, then trying to double speed should be stopped at the first node if they both are connected to it first.

Re: Bitcoin snack machine (fast transaction problem)

I live near the East coast of the US and I've sent Bit Coins to friends on the West Coast, seems to be fairly instant as long as both clients are well connected to the network.

It will go instantly, but I think the issue is confirmations. Even if you accept just 1 confirmation it will take an average of 10 minutes to get it. In this time the cheater could go to another vending machine and then just let the two accounts duke it out for his one payment while he eats two snacks.

The first solution that comes to my mind is a "verified insta-cash: service. You ship them some amount, they verify it within an hour or whatever and give you a card with credits that goes into vending machines and such. Or you could have an account with the vending company. Or you could use some physical currency, we don't necessarily need just one type of money.
That might be a good experiment to try on the test network to see what happens. I think it both machines are going through the same node, then trying to double speed should be stopped at the first node if they both are connected to it first.

Oh, yeah. It doesn't have to be two vending machines though. I could even send the coin to my friend then immediately spend it at the vending machine. I think the way things are you aren't safe to release until the transaction is embedded in a block that the majority finds acceptable.

Re: Bitcoin snack machine (fast transaction problem)

The problem with slow confirmations is because of a little amount of nodes. When Bitcoin will become somewhat popular, then you could get the confirmations much quicker (especially the ones in the limit of an ISP/city/region[or state]/country)

Re: Bitcoin snack machine (fast transaction problem)


You can act on a transaction before it is included in a block.

So you can still check for double spending in all the transactions you can see already.

So to buy 2 snacks with the same coin you'd have to spend it at 2 distant nodes simultaneously and get your snack faster than the network propagation time.

So vending machines are easily possible and the scope of the attack is actually quite limited?

Re: Bitcoin snack machine (fast transaction problem)

The solution is for the snack vendor to have debit accounts. You've got a fantastic vending machine at work, so you transfer ฿2000 bitcoins to it which can be withdrawn or spent at any time. Withdrawing the bitcoins takes about ten minutes, but spending them is instantaneous. Or if not not the vendor, then perhaps there's a company called Bitcoin Escrow, which is trusted by both parties and perhaps regulated by the government. They hold bitcoins 100% in reserve and offer instant transfer of balances between customer/merchant/supplier accounts. Withdrawals and deposits take about ten minutes, but purchases are instant.

Re: Bitcoin snack machine (fast transaction problem)

The solution is for the snack vendor to have debit accounts. You've got a fantastic vending machine at work, so you transfer ฿2000 bitcoins to it which can be withdrawn or spent at any time. Withdrawing the bitcoins takes about ten minutes, but spending them is instantaneous. Or if not not the vendor, then perhaps there's a company called Bitcoin Escrow, which is trusted by both parties and perhaps regulated by the government. They hold bitcoins 100% in reserve and offer instant transfer of balances between customer/merchant/supplier accounts. Withdrawals and deposits take about ten minutes, but purchases are instant.
If the machine is setup to only connect to their node, that could work since it would be kind of a central spending point that would quickly be able to tell if someone was trying to double-spend the coin.

As for different networks and nodes, like Bob's Escrow is different from Jane's Escrow, the added delay would make a theoretical attack possible, but no one is going to get rich ripping off vending machines.

Re: Bitcoin snack machine (fast transaction problem)

Or if not not the vendor, then perhaps there's a company called Bitcoin Escrow

Perhaps there could be a variety of intermediary service providers that offer this type of 3rd party escrow service and the customer can decide which 3rd party they like to use and the vending machine can choose which 3rd party escrow services it is compatible with.  If the customer finds a vending machine that accepts using a particular 3rd party escrow, then the customer can buy from the vending machine.  Of course, it would be useful if the most popular/trusted/established escrow services are used both by vending machine and customer.

Re: Bitcoin snack machine (fast transaction problem)

what you folks are calling an escrow sounds a lot like a debit card account.

Re: Bitcoin snack machine (fast transaction problem)

what you folks are calling an escrow sounds a lot like a debit card account.
Bitcoins are the equivalent to cold hard cash. There's nothing precluding the creation and adoption of debit, credit, banks, loans and fractional reserve lending using bitcoins. Read the posts by InterArmaEnimSil in this related thread. Just as a word of caution, escrow services are often operate with the purpose of ripping people off, so make sure you trust them and only kick yourself, but not to harshly, if they rip you off.

Re: Bitcoin snack machine (fast transaction problem)

what you folks are calling an escrow sounds a lot like a debit card account.
Bitcoins are the equivalent to cold hard cash. There's nothing precluding the creation and adoption of debit, credit, banks, loans and fractional reserve lending using bitcoins. Read the posts by InterArmaEnimSil in this related thread. Just as a word of caution, escrow services are often operate with the purpose of ripping people off, so make sure you trust them and only kick yourself, but not to harshly, if they rip you off.

Yeah, I understood the fractional reserve thread.  I am not sure that I fully understand escrow, I know it is usually used in large transactions to ensure the seller that the cash is indeed on hand, and will stay that way.  Part of the purpose, as far as I can tell, is usually to slow down transactions, thus making them more secure.  In this case it seems the point is more to speed up transactions without losing security, which looks more like a debit account than an escrow service, but I may be misunderstanding what an escrow service is.

Re: Bitcoin snack machine (fast transaction problem)

The beauty of bitcoin is you don't need 3rd parties like banks.

I can see how an escrow could be useful.

Surely it's still possible to do this without one.
Adding an escrow will add cost to the transaction.

Re: Bitcoin snack machine (fast transaction problem)

In this case it seems the point is more to speed up transactions without losing security, which looks more like a debit account than an escrow service, but I may be misunderstanding what an escrow service is.
You're not misunderstanding. Escrow and debit are similar services and their definitions overlap. I was stretching the definition. Debit fits my description just as well if not better than escrow. I was just putting the emphasis on the fact that the company, whatever it's called, can transfer bitcoin balances on an accounting sheet instantly without having to wait for a real bitcoin transaction, but like is described in the fractional reserve lending thread.

Re: Bitcoin snack machine (fast transaction problem)

Even better than an escrow, you just fund the beverage machine company itself.

Like this: you go to the company's website and send them 100 BC.  Then, they give you an ID.  They have plenty of time to get confirmations to build, and when you need a beverage you just use the ID they issued you and they debit it from your account.

Re: Bitcoin snack machine (fast transaction problem)

Even better than an escrow, you just fund the beverage machine company itself.

Like this: you go to the company's website and send them 100 BC.  Then, they give you an ID.  They have plenty of time to get confirmations to build, and when you need a beverage you just use the ID they issued you and they debit it from your account.

a prepaid account with the snack machine company works great for snack machines in corporate cafeterias (or other places with a fairly static consumer base) not so much for areas with a large transitory consumer base, such as airports, ferry boats, train stations etc. 

Re: Bitcoin snack machine (fast transaction problem)

I believe it'll be possible for a payment processing company to provide as a service the rapid distribution of transactions with good-enough checking in something like 10 seconds or less.

The network nodes only accept the first version of a transaction they receive to incorporate into the block they're trying to generate.  When you broadcast a transaction, if someone else broadcasts a double-spend at the same time, it's a race to propagate to the most nodes first.  If one has a slight head start, it'll geometrically spread through the network faster and get most of the nodes.

A rough back-of-the-envelope example:
1         0
4         1
16        4
64        16
80%      20%

So if a double-spend has to wait even a second, it has a huge disadvantage.

The payment processor has connections with many nodes.  When it gets a transaction, it blasts it out, and at the same time monitors the network for double-spends.  If it receives a double-spend on any of its many listening nodes, then it alerts that the transaction is bad.  A double-spent transaction wouldn't get very far without one of the listeners hearing it.  The double-spender would have to wait until the listening phase is over, but by then, the payment processor's broadcast has reached most nodes, or is so far ahead in propagating that the double-spender has no hope of grabbing a significant percentage of the remaining nodes.

Re: Bitcoin snack machine (fast transaction problem)

The service provider has connections with many nodes.  When it gets a transaction, it blasts it out, and at the same time monitors the network for double-spends.  If it receives a double-spend on any of its many listening nodes, then it alerts that the transaction is bad.  A double-spent transaction wouldn't get very far without one of the listeners hearing it.  The double-spender would have to wait until the listening phase is over, but by then, the service provider's broadcast has reached most nodes, or is so far ahead in propagating that the double-spender has no hope of grabbing a significant percentage of the remaining nodes.

This is a good start, but still not impermeable.  This kind of security relies on the fact that the majority of nodes (which really just boils down to the majority of IP's) are honest.  However, if the attacker could amass many IP addresses, then he could control the propagation (for example, by refusing to propogate word of the transaction at the vending machine), and still lead a successful double-spending attack.  Which sort of brings us back to the main novel idea of bitcoin: truth is voted on by computing power, not IP.

For just a beverage, it may seem like this attack is uneconomical.  But imagine if instead the machine dispensed small-denomination giftcards, and the attack was performed thousands of times (maybe even at the same time in a concerted effort).  Suddenly, the cost of that IP block might be a bargain for the attacker...

Re: Bitcoin snack machine (fast transaction problem)

This is a good start, but still not impermeable.
I didn't say impermeable, I said good-enough.  The loss in practice would be far lower than with credit cards.

Quote
(for example, by refusing to propogate word of the transaction at the vending machine)
No, the vending machine talks to a big service provider (aka payment processor) that provides this service to many merchants.  Think something like a credit card processor with a new job.  They would have many well connected network nodes.