Staring Owl (OP)
Member
Offline
Activity: 90
Merit: 10
|
|
June 10, 2013, 01:02:54 PM |
|
Let's say you have to send user's account balance back. For security reasons you have locked it so that it can be cashed out only to the address that sent the money.
Now when user sends money you see 2 addresses. The one that has sent/spent the money and the one that got the "change" back. Right?
To which one of them you think would be wiser to send the money back?
The original one is spent, so i'm not sure what happens with it and for how long it's kept? The one that got the change is also owned by the user (unless there are some exceptions with web based wallets and the like?)
So do you see any drawbacks or advantages to any of the options? What would you do?
|
SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. -> BitBandit.eu
|
|
|
niko
|
|
June 10, 2013, 01:05:27 PM |
|
Let's say you have to send user's account balance back. For security reasons you have locked it so that it can be cashed out only to the address that sent the money.
Now when user sends money you see 2 addresses. The one that has sent/spent the money and the one that got the "change" back. Right?
To which one of them you think would be wiser to send the money back?
The original one is spent, so i'm not sure what happens with it and for how long it's kept? The one that got the change is also owned by the user (unless there are some exceptions with web based wallets and the like?)
So do you see any drawbacks or advantages to any of the options? What would you do?
I would sit down and read about how Bitcoin works, then come back here and ask a different question. Seriously.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
June 10, 2013, 02:32:29 PM |
|
Let's say you have to send user's account balance back. For security reasons you have locked it so that it can be cashed out only to the address that sent the money.
Now when user sends money you see 2 addresses. The one that has sent/spent the money and the one that got the "change" back. Right?
To which one of them you think would be wiser to send the money back?
The original one is spent, so i'm not sure what happens with it and for how long it's kept? The one that got the change is also owned by the user (unless there are some exceptions with web based wallets and the like?)
So do you see any drawbacks or advantages to any of the options? What would you do?
I would sit down and read about how Bitcoin works, then come back here and ask a different question. Seriously. Wise words
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
scintill
|
|
June 11, 2013, 05:29:15 AM |
|
You should also not assume every address in the inputs is controlled by the sender. Generally you could send to any of them and the user should be able to receive them, but exceptions are things like sending from an exchange or webwallet where that address isn't owned by the user; or the co-signing stuff people have been playing with, where multiple parties pool their outputs for privacy/taint-confusion purposes (in this case not all input addresses are necessarily owned by the person who sent you the coins.)
So, if you're dead-set on sending back to one of the sending addresses, you should tell the user beforehand, and probably let them choose which one to send it to.
|
1SCiN5kqkAbxxwesKMsH9GvyWnWP5YK2W | donations
|
|
|
Staring Owl (OP)
Member
Offline
Activity: 90
Merit: 10
|
|
June 12, 2013, 11:37:02 AM |
|
What should I do then guys? Aren't there some best practices or something?
I understand that my questions might be lame and I have a lot of reading to do. And I'm getting there. But I would appreciate if someone experienced gives me a hand in the meantime, because i'm kinda pressed by time right now.
|
SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. -> BitBandit.eu
|
|
|
Staring Owl (OP)
Member
Offline
Activity: 90
Merit: 10
|
|
June 12, 2013, 01:46:07 PM |
|
What should I do then guys? Aren't there some best practices or something?
I understand that my questions might be lame and I have a lot of reading to do. And I'm getting there. But I would appreciate if someone experienced gives me a hand in the meantime, because i'm kinda pressed by time right now.
Contact the person you need to send coins to and ask for address he owns. that's obviosly for an app, so i need a general solution
|
SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. -> BitBandit.eu
|
|
|
OnkelPaul
Legendary
Offline
Activity: 1039
Merit: 1005
|
|
June 12, 2013, 01:51:49 PM |
|
It wasn't obvious from your question that this was for an app, it could just as well have been a single transaction that you needed to reverse.
So for an app, let the user specify a withdrawal address. That way he or she can choose to which address any returned bitcoins will be sent. Of course, if you want to lock that you'd need a way to unlock and change it, preferrably with something like 2FA to be reasonably sure that it was the user who requested the change.
Onkel Paul
|
|
|
|
niko
|
|
June 12, 2013, 02:35:36 PM |
|
So for an app, let the user specify a withdrawal address.
Or make it perfectly visible and clear that user must send coins from address he owns, with some explanation on what it means to own address. Yes to both. I think letting the user specify an address when signing up is the best practice. The second solution is fine, except it limits the users in what wallets theyvuse every time they send you money.
|
They're there, in their room. Your mining rig is on fire, yet you're very calm.
|
|
|
Staring Owl (OP)
Member
Offline
Activity: 90
Merit: 10
|
|
July 24, 2013, 05:44:14 PM |
|
Ok, when a user sends money, bitcoind sees 2 addresses and if i have understood correctly we can't tell whch is change and which the original input right? so sending to any of those will be fine as long as the user is not using a web wallet, is that right?
if he is using a web wallet, the only way is to let him set his own receive address, right?
|
SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. -> BitBandit.eu
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
July 24, 2013, 05:56:44 PM |
|
Whatever the case make him specify his address
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
|
July 24, 2013, 08:50:21 PM |
|
Ok, when a user sends money, bitcoind sees 2 addresses and if i have understood correctly we can't tell whch is change and which the original input right? so sending to any of those will be fine as long as the user is not using a web wallet, is that right?
No, this is never right. There is no such thing as a "from address". Banish the idea from your mind. if he is using a web wallet, the only way is to let him set his own receive address, right?
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4284
Merit: 8808
|
|
July 24, 2013, 09:33:48 PM |
|
Aren't there some best practices or something?
Sure, when the user establishes their relationship with you request they give you an emergency refund address. Maybe it's one they use for other things too, maybe not. Then you have one on file that you can safely use. Ideally every time a user requests a payment from you, you should prompt for a new address. Address reuse gums up the privacy of Bitcoin users and fungibility of Bitcoin... but keeping an emergency refund address on file is a best practice for anyone who holds someone elses funds.
|
|
|
|
alp
|
|
July 24, 2013, 09:42:44 PM |
|
Ok, when a user sends money, bitcoind sees 2 addresses and if i have understood correctly we can't tell whch is change and which the original input right? so sending to any of those will be fine as long as the user is not using a web wallet, is that right?
if he is using a web wallet, the only way is to let him set his own receive address, right?
First learn to walk before you run. You have fundamental misunderstandings about how transactions in Bitcoin work. Start here: https://en.bitcoin.it/wiki/TransactionsIf you have this little clue on how things work, you should not even consider writing an app, as it will almost certainly lose a lot of money for whoever uses it. Try reading before making a lot of dumb assumptions and arguing with people who know a lot more than you.
|
I am looking for a good signature. Here could be your advertisement
|
|
|
Staring Owl (OP)
Member
Offline
Activity: 90
Merit: 10
|
|
July 25, 2013, 02:42:14 PM |
|
Ok, when a user sends money, bitcoind sees 2 addresses and if i have understood correctly we can't tell whch is change and which the original input right? so sending to any of those will be fine as long as the user is not using a web wallet, is that right?
No, this is never right. There is no such thing as a "from address". Banish the idea from your mind. if he is using a web wallet, the only way is to let him set his own receive address, right?
why there is no such thing as from address?
|
SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. -> BitBandit.eu
|
|
|
CIYAM
Legendary
Offline
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
|
|
July 25, 2013, 02:46:41 PM |
|
why there is no such thing as from address?
Fundamentally it is because of how *new* coins are created (a tx that goes to an address but has no UTXO that it came *from*). Also in many tx's there will be more than one UTXO (therefore more than one *from* address if you look at it that way) and in the future things like "multi-sig" tx's just make it even more complicated.
|
|
|
|
jackjack
Legendary
Offline
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
|
|
July 25, 2013, 02:50:28 PM Last edit: July 25, 2013, 03:22:58 PM by jackjack |
|
Coins are not sent to addresses but to portions of scripts... Seriously, there's a wiki other there. As a developper aren't you supposed to learn about something before coding about it?
|
Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2 Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
|
|
|
jl2012
Legendary
Offline
Activity: 1792
Merit: 1111
|
|
July 25, 2013, 03:06:58 PM |
|
Making a bitcoin-spending bot without knowing how bitcoin works? It's just flushing your money to the toilet
|
Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY) LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC) PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
|
|
|
alp
|
|
July 25, 2013, 09:08:32 PM |
|
Coins are not sent to addresses but to portions of scripts... Seriously, there's a wiki other there. As a developper aren't you supposed to learn about something before coding about it?
Ready fire aim.
|
I am looking for a good signature. Here could be your advertisement
|
|
|
paraipan
In memoriam
Legendary
Offline
Activity: 924
Merit: 1004
Firstbits: 1pirata
|
|
July 25, 2013, 09:31:45 PM |
|
Making a bitcoin-spending bot without knowing how bitcoin works? It's just flushing your money to the toilet
Yeah, can't forget about this one Mtgox did... https://bitcointalk.org/index.php?topic=50206
|
BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
|
|
|
|