Bitcoin Forum
April 24, 2024, 10:01:08 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: [Nxt] Instant transactions with guaranteed confirmation  (Read 7913 times)
murraypaul
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
October 23, 2013, 01:24:48 PM
 #21

What prevents:
1] Initiate first part of double-spend attack
2] Become special account
3] Use the account for instant transaction

The merchant will accept the second transaction, because I am a 'special' account, but the first transaction is also out there waiting to be confirmed.

If the first transactions is confirmed prior to the message of becoming a special account (or in the same block), then amount you can play with will be lowered.

If your account becomes "special" in the first place, then your transaction won't be included into a block until it fits 1/10th rule.  Merchants will see it and act accordingly.

And what if the first transaction isn't confirmed prior to that message?

BTC: 16TgAGdiTSsTWSsBDphebNJCFr1NT78xFW
SRC: scefi1XMhq91n3oF5FrE3HqddVvvCZP9KB
1713996068
Hero Member
*
Offline Offline

Posts: 1713996068

View Profile Personal Message (Offline)

Ignore
1713996068
Reply with quote  #2

1713996068
Report to moderator
1713996068
Hero Member
*
Offline Offline

Posts: 1713996068

View Profile Personal Message (Offline)

Ignore
1713996068
Reply with quote  #2

1713996068
Report to moderator
1713996068
Hero Member
*
Offline Offline

Posts: 1713996068

View Profile Personal Message (Offline)

Ignore
1713996068
Reply with quote  #2

1713996068
Report to moderator
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BCNext (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 60


View Profile
October 23, 2013, 01:25:38 PM
 #22

This is not applied to Nxt because it uses accounts, not inputs.  A well-connected merchant will see most of the transactions, for a double-spending attack to succeed at least 10 of 11 transactions must be lost.
Ok, which step won't work?
1) I have that special account
2) I send 0.1 of my balance to a merchant, to buy something digital.
3) the merchant can't wait for a confirmation, because this is the point - not to wait.
4) for better safety the merchant resends the transaction to as many peers as possible (btw, he would do that anyway) and delivers me the purchase.
5) i know, that there are many miners on the network, which will gladly accept a doublespend if it includes greater fee. They are not malicious, just a bit greedy.
6) state of my account is still unchanged, because it can only change when a block is found. My client is modified and it allows me to send doublespends. Only one 1/10 transaction can be included in a block by the network. So I send another 1/10 transaction, this time with higher fee, to my another account.
7) one of greedy miners accepts the second transaction and includes it in a block.
Doublespend is successfull )

Not really Smiley

2 * 1/10th will be deducted from your balance (2 NXT if you had 10 NXT).  1 NXT will go to your other account and 1 NXT to the merchant.
BCNext (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 60


View Profile
October 23, 2013, 01:28:50 PM
 #23

And what if the first transaction isn't confirmed prior to that message?

It will be listed in the unconfirmed transactions.  Merchants will see it and refuse to sell you anything more expensive than 1/10th minus that transaction.
stdset
Hero Member
*****
Offline Offline

Activity: 572
Merit: 506



View Profile
October 23, 2013, 03:35:54 PM
 #24

A special account has certain limits that don't let to create transactions for more than (for example) 1/10th of the balance in total within a 24 hour timeframe.  The network will simply ignore transactions and blocks that violate this rule.
So, you don't really mean to limit special accounts with transactions summing up to 0.1 of it's balance / 24h? Or do you mean that 1 transaction gets confirmed, and the rest will wait in mempool, getting confirmed one by one every 24 hours?

gatra
Hero Member
*****
Offline Offline

Activity: 583
Merit: 505


CTO @ Flixxo, Riecoin dev


View Profile WWW
October 23, 2013, 03:53:48 PM
 #25

This is not applied to Nxt because it uses accounts, not inputs.  A well-connected merchant will see most of the transactions, for a double-spending attack to succeed at least 10 of 11 transactions must be lost.
Ok, which step won't work?
1) I have that special account
2) I send 0.1 of my balance to a merchant, to buy something digital.
3) the merchant can't wait for a confirmation, because this is the point - not to wait.
4) for better safety the merchant resends the transaction to as many peers as possible (btw, he would do that anyway) and delivers me the purchase.
5) i know, that there are many miners on the network, which will gladly accept a doublespend if it includes greater fee. They are not malicious, just a bit greedy.
6) state of my account is still unchanged, because it can only change when a block is found. My client is modified and it allows me to send doublespends. Only one 1/10 transaction can be included in a block by the network. So I send another 1/10 transaction, this time with higher fee, to my another account.
7) one of greedy miners accepts the second transaction and includes it in a block.
Doublespend is successfull )
,
Not really Smiley

2 * 1/10th will be deducted from your balance (2 NXT if you had 10 NXT).  1 NXT will go to your other account and 1 NXT to the merchant.


it's not clear why...

if 2 * 1/10th are deducted then he violated the 1/10th per day rule... so one of the tx should have been ignored

also, if instead of buying one thing, he buys 19 things, and the merchants are not connected between them, 20 * 1/10th would be deducted. Except he only has 10/10ths. That's a double spend.


           ▄▄▄██████████▄▄▄
       ▄▄██
██████████████████▄▄
     ▄█
█████▀████████████▀██████▄
   ▄█
█████████████████████████████▄
  ▄█
█████████▄█▀▀██████████████████▄
 ▄█
███████████▀██████▄▄█████▄███████▄
▄█
██████████▀██▄▄▄▄██▀▀▀▀▀███████████▄
█████████████▀▀██▀████████▀▀████████
█████████████▄█▀████████████████████
████████▀▀▀▀██▀▀▀▀██████████████████
▀█
██████▀▀▀▀██▀▀▀▀███████████████████▀
 ▀█
███████▄████▄▄███████████████████▀
  ▀█
███████████████████████████████▀
   ▀█
█████████████████████████████▀
     ▀█
█████▄████████████▄██████▀
       ▀▀██
██████████████████▀▀
           ▀▀▀██████████▀▀▀
riecoin       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo   
BCNext (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 60


View Profile
October 23, 2013, 03:54:39 PM
 #26

So, you don't really mean to limit special accounts with transactions summing up to 0.1 of it's balance / 24h? Or do you mean that 1 transaction gets confirmed, and the rest will wait in mempool, getting confirmed one by one every 24 hours?

Awaiting transactions will be confirmed one by one.
BCNext (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 60


View Profile
October 23, 2013, 03:57:55 PM
 #27

it's not clear why...

if 2 * 1/10th are deducted then he violated the 1/10th per day rule... so one of the tx should have been ignored

also, if instead of buying one thing, he buys 19 things, and the merchants are not connected between them, 20 * 1/10th would be deducted. Except he only has 10/10ths. That's a double spend.

Nothing bad will happen if someone spends more than 1/10th of the balance.  The rule is set to avoid risk of spending more than 100% of coins.

Merchants don't need to be connected each other.  They need to be connected to the network.
gatra
Hero Member
*****
Offline Offline

Activity: 583
Merit: 505


CTO @ Flixxo, Riecoin dev


View Profile WWW
October 23, 2013, 07:44:24 PM
 #28

it's not clear why...

if 2 * 1/10th are deducted then he violated the 1/10th per day rule... so one of the tx should have been ignored

also, if instead of buying one thing, he buys 19 things, and the merchants are not connected between them, 20 * 1/10th would be deducted. Except he only has 10/10ths. That's a double spend.

Nothing bad will happen if someone spends more than 1/10th of the balance.  The rule is set to avoid risk of spending more than 100% of coins.

Merchants don't need to be connected each other.  They need to be connected to the network.
please notice that 20 * 1/10th is 20/10th, which is twice the original balance, hence a double spend, so it looks like it's bad... what is the point of the 1/10th per day rule if it can be violated? I still don't understand how your proposition works...


           ▄▄▄██████████▄▄▄
       ▄▄██
██████████████████▄▄
     ▄█
█████▀████████████▀██████▄
   ▄█
█████████████████████████████▄
  ▄█
█████████▄█▀▀██████████████████▄
 ▄█
███████████▀██████▄▄█████▄███████▄
▄█
██████████▀██▄▄▄▄██▀▀▀▀▀███████████▄
█████████████▀▀██▀████████▀▀████████
█████████████▄█▀████████████████████
████████▀▀▀▀██▀▀▀▀██████████████████
▀█
██████▀▀▀▀██▀▀▀▀███████████████████▀
 ▀█
███████▄████▄▄███████████████████▀
  ▀█
███████████████████████████████▀
   ▀█
█████████████████████████████▀
     ▀█
█████▄████████████▄██████▀
       ▀▀██
██████████████████▀▀
           ▀▀▀██████████▀▀▀
riecoin       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo   
BCNext (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 60


View Profile
October 23, 2013, 08:26:40 PM
 #29

First of all noone can spend its balance twice, peers won't generate such blocks nor they accept them.

The goal of 1/10th rule is to protect merchants in situation when they don't see some transactions that can be confirmed and lead to cancellation a transaction accepted by a merchant.  The goal is achieved by creating necessity to send at least 10 transactions before attempting a double-spending.  If a merchant sees at least 1 of these transactions they can refuse to sell goods.  Odds that all 10 transactions won't reach a particular merchant are negligibly small.  The network helps to protect merchants by refusing to confirm transactions that violate the 1/10th rule.  If someone sends 2 transactions (first to themselves and second to a merchant) the merchant will wait a little bit longer before getting the money if the first transaction is confirmed in the first place.  This looks like a violation of the rule, but it's completely non-critical.
allwelder
Legendary
*
Offline Offline

Activity: 1512
Merit: 1004



View Profile
January 15, 2014, 12:57:25 AM
 #30

it's not clear why...

if 2 * 1/10th are deducted then he violated the 1/10th per day rule... so one of the tx should have been ignored

also, if instead of buying one thing, he buys 19 things, and the merchants are not connected between them, 20 * 1/10th would be deducted. Except he only has 10/10ths. That's a double spend.

Nothing bad will happen if someone spends more than 1/10th of the balance.  The rule is set to avoid risk of spending more than 100% of coins.

Merchants don't need to be connected each other.  They need to be connected to the network.
please notice that 20 * 1/10th is 20/10th, which is twice the original balance, hence a double spend, so it looks like it's bad... what is the point of the 1/10th per day rule if it can be violated? I still don't understand how your proposition works...
It may be the 1/10th of remaining balance ,not the original balance.

 
                                . ██████████.
                              .████████████████.
                           .██████████████████████.
                        -█████████████████████████████
                     .██████████████████████████████████.
                  -█████████████████████████████████████████
               -███████████████████████████████████████████████
           .-█████████████████████████████████████████████████████.
        .████████████████████████████████████████████████████████████
       .██████████████████████████████████████████████████████████████.
       .██████████████████████████████████████████████████████████████.
       ..████████████████████████████████████████████████████████████..
       .   .██████████████████████████████████████████████████████.
       .      .████████████████████████████████████████████████.

       .       .██████████████████████████████████████████████
       .    ██████████████████████████████████████████████████████
       .█████████████████████████████████████████████████████████████.
        .███████████████████████████████████████████████████████████
           .█████████████████████████████████████████████████████
              .████████████████████████████████████████████████
                   ████████████████████████████████████████
                      ██████████████████████████████████
                          ██████████████████████████
                             ████████████████████
                               ████████████████
                                   █████████
.CryptoTalk.org.|.MAKE POSTS AND EARN BTC!.🏆
rigel
Legendary
*
Offline Offline

Activity: 1240
Merit: 1001


Thank God I'm an atheist


View Profile
January 17, 2014, 10:26:09 AM
 #31

Instant means not waiting at all.

Instant transactions will be implemented after the Messaging feature.  That is how it will work:
1]  You publish on the blockchain a message saying that your account becomes a special account.
2]  You use the account for instant transactions.
3]  At some point you decide to empty the account, so you publish a message saying that the account becomes an ordinary one.
4]  Now you can't use instant transactions and have to wait for 1440 blocks (~24 hours) to withdraw all the coins.

You can send 1/10th of the balance a zillion times, but all the transactions except one of them won't be included into a block.  The odds that a peer will see only 1 transaction are negligibly small, if a merchant notices other transactions that exceed the daily limit they will not sell you anything.

I guess point 1 takes the same propagation time than a normal transaction.
So this is not what I'm looking for if I'm in a hurry. Correct?
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 17, 2014, 10:29:57 AM
 #32

I guess point 1 takes the same propagation time than a normal transaction.
So this is not what I'm looking for if I'm in a hurry. Correct?

Incorrect. This is done once in advance.
mczarnek
Hero Member
*****
Offline Offline

Activity: 527
Merit: 500


View Profile
January 20, 2014, 06:09:46 PM
 #33

So it is impossible to spend more than 1/10 of your balance at once?  Meaning that if you would like to buy something that cost 10 NXT and you only have 25 in your account, it is impossible to buy it?  That seems like a problem to me...

BitSend ◢◤Clients | Source
www.bitsend.info
█▄
█████▄
████████▄
███████████▄
██████████████
███████████▀
████████▀
█████▀
█▀












Segwit | Core 0.14 | Masternodes
XEVAN | DK3 | Electrum soon
Bitcore - BTX/BTC -Project












BSD -USDT | Bittrex | C.Gather | S.Exchange
Cryptopia | NovaExchange | Livecoin
Litebit.eu | Faucet | Bitsend Airdrop













████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████

████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 20, 2014, 06:42:54 PM
 #34

So it is impossible to spend more than 1/10 of your balance at once?  Meaning that if you would like to buy something that cost 10 NXT and you only have 25 in your account, it is impossible to buy it?  That seems like a problem to me...

Our life is full of trade-offs...
mczarnek
Hero Member
*****
Offline Offline

Activity: 527
Merit: 500


View Profile
January 21, 2014, 02:42:52 AM
 #35

True.. but still I don't like that, maybe something like you can spend up to your entire balance but have to wait for n confirmations first or something?

Big transactions don't need to be instant but they need to be possible.. say someday I want to put down a down payment on the new condo I'm buying.. I want it to be possible to put 90% of my savings into this down payment, without splitting it into say 20 payments?  Because first you'd be able to pay 10%, but then only 90% is left, so next would be 10% of 90%, which is 9%, then 8.1%, then 7.29%, etc. and it'd take a lot more than 9 payments to pay it off.  Or am I missing something?

I don't see it as a huge problem, there are ways to work around it, but it does need to be possible to do somewhat easily. Right?

BitSend ◢◤Clients | Source
www.bitsend.info
█▄
█████▄
████████▄
███████████▄
██████████████
███████████▀
████████▀
█████▀
█▀












Segwit | Core 0.14 | Masternodes
XEVAN | DK3 | Electrum soon
Bitcore - BTX/BTC -Project












BSD -USDT | Bittrex | C.Gather | S.Exchange
Cryptopia | NovaExchange | Livecoin
Litebit.eu | Faucet | Bitsend Airdrop













████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████

████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████
Come-from-Beyond
Legendary
*
Offline Offline

Activity: 2142
Merit: 1009

Newbie


View Profile
January 21, 2014, 06:16:05 AM
 #36

True.. but still I don't like that, maybe something like you can spend up to your entire balance but have to wait for n confirmations first or something?

Big transactions don't need to be instant but they need to be possible.. say someday I want to put down a down payment on the new condo I'm buying.. I want it to be possible to put 90% of my savings into this down payment, without splitting it into say 20 payments?  Because first you'd be able to pay 10%, but then only 90% is left, so next would be 10% of 90%, which is 9%, then 8.1%, then 7.29%, etc. and it'd take a lot more than 9 payments to pay it off.  Or am I missing something?

I don't see it as a huge problem, there are ways to work around it, but it does need to be possible to do somewhat easily. Right?

I don't see a problem here. U r supposed to have 2 accounts, 1 for "slow" transactions without a limit and another for "instant" ones (like pocket money).
mczarnek
Hero Member
*****
Offline Offline

Activity: 527
Merit: 500


View Profile
January 25, 2014, 03:52:57 AM
 #37

Ok, my bad.. good idea!!

BitSend ◢◤Clients | Source
www.bitsend.info
█▄
█████▄
████████▄
███████████▄
██████████████
███████████▀
████████▀
█████▀
█▀












Segwit | Core 0.14 | Masternodes
XEVAN | DK3 | Electrum soon
Bitcore - BTX/BTC -Project












BSD -USDT | Bittrex | C.Gather | S.Exchange
Cryptopia | NovaExchange | Livecoin
Litebit.eu | Faucet | Bitsend Airdrop













████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████

████
 ████
  ████
   ████
    ████
     ████
      ████
       ████
        ████
       ████
      ████
     ████
    ████
   ████
  ████
 ████
████
Fry
Newbie
*
Offline Offline

Activity: 45
Merit: 0


View Profile
February 16, 2014, 08:59:02 PM
 #38

What do you think about random lock times for transactions to make instant transactions safe?
If you have a random lock time for special accounts an attacker can't predict any more who will be the forger of the transaction. So an attacker could not attempt to doulbe spend by replacing the transaction with another.
The transaction would be immediately broadcasted to the Network, but have to wait a random time until added to the Blockchain
Example implementation:
Every forger adds an one random number (only 1 or 0) to his forged block on the Blockchain.
A transaction for these specific accounts can only be added to the Blockchain if the last 8 bits of hash of (the random numbers in the last 100 Blocks plus the accounts public key) are zero.
Advantage of this is that you can spend the entire account balance at once.
chanc3r
Sr. Member
****
Offline Offline

Activity: 952
Merit: 253



View Profile
March 08, 2014, 06:18:42 PM
Last edit: March 08, 2014, 06:32:18 PM by chanc3r
 #39

i see complexity in moving NXT between the normal account and the special account.
Also the chance to end up with money in the wrong account at the wrong time.

Could this be done by implementing a reserved balance?

So I reserve 10 or 20% of my balance for 'instant transactions', this reserved balance is not available for normal transactions
I can create instant transactions against my 'reserved balance'
NXT checks the total of instant transactions broadcast against the reserved balance
If instant transaction balance >= reserved balance then no more instant transactions will be allowed.
If any instant transactions are outstanding confirmation then the reserved balance cannot be released so this cannot be used for other normal transactions.
If a forger rejects the instant transaction then the instant balance of course reduced.

Attack - the instance balance is updated on broadcast so you would have to spam nodes which did not get the broadcast and know which these were .... every time there is a broadcast the instant balance is updated so there is a small race window where a spammer would have to outpace the networks ability to update the instant balance.

BrianNowhere
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile WWW
March 08, 2014, 06:32:01 PM
 #40

This thread is dedicated to discussion of Nxt features (https://bitcointalk.org/index.php?topic=303898.0), don't confuse it with Bitcoin or other altcoins.


In Bitcoin a payment is made by transferring all coins from input to output addresses with difference between input and output paid as transaction fee.  If someone wants to send only part of the coins they must send the rest back to one of their own addresses.  An attempt to use the same input twice is a double-spending, only one of the transactions will be confirmed even if enough money is sent back.

Unlike Bitcoin and its forks, Nxt uses a single account instead of multiple addresses for each user.  It is possible to send multiple transactions from the same source address (called "account"), all these transactions will be confirmed if the account holds enough coins.  Someone still can attempt a double-spending by paying for something with low fee and then sending all their coins to other account with higher fee, making it impossible to confirm the first payment.

We can counteract a double-spending attack in Nxt by using special accounts.  A special account has certain limits that don't let to create transactions for more than (for example) 1/10th of the balance in total within a 24 hour timeframe.  The network will simply ignore transactions and blocks that violate this rule.

A merchant (or a vending machine) can accept payments from special accounts without waiting for confirmations.  The only thing should be done is checking that a received transaction doesn't violate the rule.

Does anybody see flaws or disadvantages in such design?

P.S.  Payment privacy in Nxt will be provided via mixing.

One disadvantage I see is that people might be reluctant to do it because what happens if a crisis occurs? Ie: a major bug is found, the NXT economy collapses, Mt Gox scenario, etc. However, it might work for people's hot wallets ie: an account set up for "mad money" with only trivial amounts held there.

In that scenario I think it should be as easy o set up as possible ie: checking a box saying "designate this account as hot wallet" with a clear explanation of the implications posted and warning about putting large amounts there.

Iis there a way to simply have the client watch for double-spends until confirmations come in? I thought that's what the "double-spending transactions" servlet was going to be for when implemented.

Quote
P.S.  Payment privacy in Nxt will be provided via mixing.

IMHO I think mixing stands a high chance of being made illegal in the future. Tread with caution.

NXT: 4957831430947123625
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!