Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: MikeJ_NpC on April 30, 2018, 03:43:30 AM



Title: Send/Recieve BTC to the same address (looping)
Post by: MikeJ_NpC on April 30, 2018, 03:43:30 AM
Hi this may seem odd ...

Scenario: if you were to send bitcoin from your wallet ABCDE12345 .. to your wallet (the same wallet) ABCDE12345 .. creating a loop in essence, what is the point or risks associated?
thanks!


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: nc50lc on April 30, 2018, 04:03:29 AM
Nothing, the Bitcoins isn't really held by the address but recorded as inputs/outputs in a block.
Same thing can happen when you're not using a "change address" the excess amount will be sent to the same address.
Example: tx: b345c51064074f5d6c0e11187326567765eb4fa3236ca1be440ccb5745775238 (https://blockchain.info/tx-index/b345c51064074f5d6c0e11187326567765eb4fa3236ca1be440ccb5745775238)


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: MikeJ_NpC on April 30, 2018, 04:44:10 AM
Nothing, the Bitcoins isn't really held by the address but recorded as inputs/outputs in a block.
Same thing can happen when you're not using a "change address" the excess amount will be sent to the same address.
Example: tx: b345c51064074f5d6c0e11187326567765eb4fa3236ca1be440ccb5745775238 (https://blockchain.info/tx-index/b345c51064074f5d6c0e11187326567765eb4fa3236ca1be440ccb5745775238)

okay.. is the same true even in unspent designations? so if they resettle and show as a balance ...
there is no inherit risk of key leakage? its just a harmless action in essence then


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: hugeblack on April 30, 2018, 05:32:25 AM
Okay.. is the same true even in unspent designations? So if they resettle and show a balance ...
there is no inherit risk of key leakage? its just a harmless action in essence then
What is a wallet?
A wallet is a collection of private keys or the software use to manage  those private keys.
your "ABCDE12345" wallet has [pvt1,pvt2,pvt3,...etc ]. the sum of these keys appears as a balance.
When you send bitcoins from your address to your new address, you just update your private key values, but your sum/balance will be same(If we ignore the transactions fee).

risks associated?
Loss of your money and spam the bitcoin network.
check ----> https://blockchain.info/address/1HmixPDLTcVSqiyne2JFLj1F1hKVmpC1pU


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: nc50lc on April 30, 2018, 05:43:46 AM
I didn't get what you meant by "unspent designations" [1] and "resettle as balance" [2].

This is based on a hard guess on what you're thinking:
In addition to what I said earlier, an address isn't like a bank account which holds the balance.
[2] It's more of an "identifier" of the inputs and outputs in a transaction, which you have the control (private key).
[1] By spending, bitcoins aren't moved to the address, but recoded to the newest block as unspent output based on the inputs (previously unspent outputs)

Your wallet (even consists of a single address) just sums up all those outputs "displayed" as the balance.


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: wilwxk on April 30, 2018, 12:44:34 PM
There is any problem with this, I usually create a transaction to the same address when I want to join all the inputs together and and make easier in the next transaction. But rember that is not recommended to reuse the address for anything.


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: aleksej996 on April 30, 2018, 03:27:12 PM
The risk is that in future quantum computers might be able to steal your bitcoins, since your public key is being published every time you spend bitcoins from your address. Quite a low risk, but still.

Once you spent bitcoins from an address, optimally you should never use it again.


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: cabalism13 on April 30, 2018, 04:16:58 PM
Hi this may seem odd ...

Scenario: if you were to send bitcoin from your wallet ABCDE12345 .. to your wallet (the same wallet) ABCDE12345 .. creating a loop in essence, what is the point or risks associated?
thanks!

I think you're just wasting your time and also your coins, as far as I know transferring coins has a fees to be paid for it to be a successful transaction that's why if you're just sending it to your own I think your tokens would be gone after a couple of tries in transferring the money.


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: Thirdspace on May 01, 2018, 01:12:23 AM
I think you're just wasting your time and also your coins, as far as I know transferring coins has a fees to be paid for it to be a successful transaction that's why if you're just sending it to your own I think your tokens would be gone after a couple of tries in transferring the money.
many bitcoin users done this regularly, we called it 'consolidating' utxo at the lowest possible network fee
but it's better, for many reasons, to use/send them to a new different address
it's a good practice so that next time you need to transfer in hurry
you can do it with low tx size & considerably low tx fee even at higher rate (compare to non-consolidated utxo)


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: Lehbane on May 01, 2018, 09:04:39 PM
I believe some wallet allow it, like in email, you can BTC with your own account to your account, their will no risk at all but only deduction on your coin as the transaction fee. What's the benefit of doin it anyway? Just for fun?


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: HCP on May 02, 2018, 03:17:02 AM
What's the benefit of doin it anyway? Just for fun?
No... as mentioned by Thirdspace, you can use it to "consolidate" your UTXOs... so instead of needing to add a large number of UTXOs into a transaction (thereby making the transaction have a larger data size and therefore requiring a larger total transaction fee), you would only need to use one UTXO (thereby keeping the data size of your transaction and the total transaction fee to a minimum).

You can read more at LoyceV's very good thread about Consolidation here: https://bitcointalk.org/index.php?topic=2848987.0


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: MikeJ_NpC on May 11, 2018, 11:23:22 PM
I didn't get what you meant by "unspent designations" [1] and "resettle as balance" [2].

This is based on a hard guess on what you're thinking:
In addition to what I said earlier, an address isn't like a bank account which holds the balance.
[2] It's more of an "identifier" of the inputs and outputs in a transaction, which you have the control (private key).
[1] By spending, bitcoins aren't moved to the address, but recoded to the newest block as unspent output based on the inputs (previously unspent outputs)

Your wallet (even consists of a single address) just sums up all those outputs "displayed" as the balance.

unspent meaning the description of the funds when you send it to another addy... and if they spend it or not

sorry i was away  just now looking over comments.


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: zerotu on May 14, 2018, 09:55:49 AM
i dont know but it is called replay attack ? *CMIIW


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: bob123 on May 14, 2018, 11:16:00 AM
i dont know but it is called replay attack ?

No. An replay attack is a scenario where an attacker takes your transaction from one chain and broadcasts it into another chain (which does have the same address format).
This was the case when btrash bcash forked. They did not change anything in the address-/transaction format allowing tx's to be replayed on the other chain.
Fortunately replay protection has been implemented already.

More information about an replay attack (generally in networks): https://en.wikipedia.org/wiki/Replay_attack (https://en.wikipedia.org/wiki/Replay_attack)
More information about an replay attack (related to bitcoin): https://coinsutra.com/what-are-replay-attacks/ (https://coinsutra.com/what-are-replay-attacks/) or https://themerkle.com/what-is-a-bitcoin-replay-attack/ (https://themerkle.com/what-is-a-bitcoin-replay-attack/)


Title: Re: Send/Recieve BTC to the same address (looping)
Post by: HCP on May 15, 2018, 04:45:55 AM
They did not change anything in the address-/transaction format which would have allowed tx's to be replayed on the other chain, had they not implemented replay protection by using a different sighash algorithm which made it incompatible with Bitcoin.

Initially, Bitcoin Cash were not planning on changing anything other than implementing "Big Blocks"... as they were trying to take over from Bitcoin. When the Bitcoin Cash dev's realised that their fork was going to fail due to lack of support, they implemented replay protection shortly before the fork occurred. This replay protection effectively made them an "Altcoin" and made the two chains completely separate.

Had they not done this, people could have taken a Bitcoin Cash transaction... and broadcast it on the Bitcoin network (and vice versa)... thereby "stealing" coins on the other Network. The scenario being:

- User A sets up a deal to buy 100 BCH from User B for a nominal sum
- User B broadcasts Transaction X, sending 100 BCH to User A
- User A then copies Transaction X and broadcasts it on the BTC network
- User A then receives 100 BCH on BCH Network AND 100 BTC on BTC Network (even though User B only wanted to send 100 BCH)... effectively "stealing" 100 BTC from User B