I also think the vending machine idea is a great example of the power and versatility of instantly confirming crypto. It's a fantastic initiative. But I can see some banana skins that you might want to think about before rolling it out to a public demo.
First of all, this:
If a darksend transactions without exact amount is sent, it keeps the change.
...I don't think that's acceptable because it isn't commercially consistent and basically amounts to theft. Think two 13 year old teenage kids with iPhones who buy a coke. One gets change and one doesn't cos they're not technologically nerdy enough to check their denominations ? They don't really want to be faced with questions like "Darksend" "Not Darksend". It might as well be two different currencies.
Further, if change is involved, it should be on condition of supply of a change address, not the on condition of coin denominations. That way the service can be commercially consistent and also optimally serve instances of homogeneous denominations as your current design does. (Because it supplies an implicit change address, but heterogeneous payments then need the option of supplying an explicit one).
It depends on amount you send. Transaction comes from few addresses. Denominations like 0.1, 1.0, 10 are in different addresses.
I'd just ditch the whole idea of change since it isn't really compatible with cryptocurrency (other than change addresses in wallets where the wallet itself has full control over everything). Just accept exact amounts otherwise no coke - since it's far easier for a customer to type the right amount into their wallet than be worrying about how their payment was denominated. Doesn't the QR code do that for them anyway ?
Sorry to be so nerdy about this but it's a great idea and I don't want you to get shot down by a*ssholes (other than me
) who home in on the glaring banana skins of the concept only to ignore the huge potential of it.
Also, what you're demonstrating isn't really a vending machine, it's a metaphor for an entire commercial business model so it's the commercial priorities that need to be thought through, not the blockchain technicalities. In that regard, details like that change thing can explode in your face when presented to the "wrong" audience.
Like Moocowmoo said, we will imbed the price in the QR code. They would actually have to modify it for there to be change. But I figure there will be 'testers' that will try this to see what happens - most likely they will all be in Miami on the 21st.
So we want to not only show them what is possible but to make it more possible than they thought it could be!
You need to do both of these things to not get your change back:
#1 Change the amount.
#2 Change from the default nondarksend to darksend.
It is unlikely for a novice to do this. We will also put a number to contact with problems just like if you got your $1 bill stuck. It should also be obvious that when sending a darksend transaction it shouldn't be possible to return funds(it is an anonymous transaction). In production, the machine could have a camera to grab a return address QR code, but we are pretty far down on the what ifs.
The change return is a cool feature and one that can really be useful for other scenarios. (like a gas station when you don't know how much you want before you fill your tank) It is already working too. Here is proof from a transaction on testnet. 15.01 Dash sent (.01 IX fee). 2 Dash Sprite was charged, and 13 Dash returned. This also happened in a split second.(IX acknowledged, change address found from looking up transaction, and then sent back). A lot happened here and it is pretty amazing it is so fast. Moocowmoo did a great job on this.