raymo at riseup.net [ARCHIVE] on Nostr: đź“… Original date posted:2021-06-30 đź“ť Original message:Dear ZmnSCPxj Thanks for ...
đź“… Original date posted:2021-06-30
đź“ť Original message:Dear ZmnSCPxj
Thanks for dedicating time to read carefully the Sabu proposal and many
thanks for your accurate point. So, lets fix it.
I didn’t suppose Alice has only one UTXO, instead I expect every issuer
use hundreds or even millions UTXOs (for optimal benefit each worth
exactly 40,000 Satoshi) in Sabu protocol in order to earn notable
Sabu-transactions-fees daily.
Your scenario is correct and Alice can send a batch transaction which
has higher feeRate, but less fee amount comparing total fees of N number
of GT transaction.
It is true, the batch transaction will win the race and will go to next
block instead of N small GT transactions.
But Alice herself is not the winner, since she paid a huge transaction
fee to miner, while in honest acting didn’t have to pay at all.
Let’s show it by numbers.
Imagine Alice convinced some people to pay her money and accept the MT
and GT transactions in exchange.
Alice issued N transactions and delivered to these guys.
Till now Alice got money equal to N * Maximum debt per transaction,
which is 20,000 N.
A single GT length = length of Critical part of GT (named C) + length of
Redundant part of GT (named R)
Coefficient of Honesty benefits (called H) = C/R
The bigger H means less Redundant part, means less benefit in batch
transaction.
The worst H would be 1 or less than 1. I can guess H in Bitcoin
transaction is 4 or higher, but for now we take it 4. Probably you can
help us and tell what H is exactly.
The N GTs length = N * (C + R)
One batch transaction length = (N * C) + R
The GT feeRate = GTfee / (C + R)
The batch transaction feeRate = batchFee / ((N * C) + R)
We need to batch transaction feeRate be higher than each single GT
feeRate (more or less the feeRate for all GTs are same).
Thus
batchFee / ((N * C) + R) must be bigger or at least equal to GTfee / (C
+ R)
so,
batchFee / ((N * C) + R) >= GTfee / (C + R)
we already knew H = C/R then C = HR
after simplifying
batchFee >= (GTfee * ((N * H) + 1)) / (H + 1)
So, this is the minimum fee that Alice has to pay for her batch
transaction in order to compete with GTs feeRate.
Let’s put the numbers
>From my previous example for @Alex Schoof, we already knew that the
GTfee is 25,500 Satoshi
H is 4 (please let me know what is more realistic number)
I think N in max exploitation is 10,000. If Alice takes entire block
space, she won’t be able to put more than 10,000 inputs in a single
transaction in one block.
So,
batchFee must be higher than (25,500 * ((10,000 * 4) + 1)) / (4 + 1)
batchFee must be higher than 2.04 Bitcoins. While if Alice was acting
honestly, she had to pay zero BTC-transaction-fee, since the Sabu
transactions are aimed to be circulated in Sabu network forever.
But how much benefit Alice got? We already knew that Alice had fooled
Some people by 10,000 transactions and got 10,000 transaction * 20,000
Max debt per transaction. She got 2 Bitcoins.
After all, she lost 0.04 BTC. She definitely is a loser, unless she has
conspiracy with miners which is another scenario and I already explained
it.
Note these facts:
H is higher than 4.
It is impossible to fit a batch transaction with 10,000 inputs and one
output in one block.
And after all we can simply hedge batch transaction benefits by fine
tuning the “maximum allowed debt per transaction”.
Finally, the complementary protection to cover 0.01% remind risk of
issuer irrationality, would be the BIPxxx “for flagging/unflagging
promised UTXOs” which is my suggestion.
It will be good for Sabu.
It will be good for adapting wide range of innovative smart contracts on
top of current Bitcoin with no risk and cost.
@James Hilliard
If it implemented wisely, never won't affect on network stability.
> your analysis is based on assuming that miners are perfect rational beings of perfect rationality,
> ***and*** are omniscient.
That’s not true! The proposal just assume miners are looking for more
profit.
The suggested BIPxxx “for flagging/unflagging promised UTXOs” (if
community accept it) would prepare a knowledge about promised UTXOs for
miner.
> Even if Alice is in possession of only a single UTXO, Alice can still feed miners a transaction
> with lower feerate than the MT, then feed the rest of the network with a valid MT.
It is not important in what order Alice propagate which (MT, or whatever
transaction) to Bitcoin network.
The point is, before putting this transaction in next block, the
creditor wallet will be aware of this renege and will send the GT to
network.
The rest is miner’s decision to put transaction with higher fee rate to
next block.
> This attack is essentially costless to Alice,
> especially for big enough transactions where mining fees are a negligible part of the payment.
No, in Sabu we have not big payments. Each big payment must be managed
through N small transactions with each transaction max output less than
20,000 Satoshi.
Regards
Raymo
On 2021-06-29 21:42, ZmnSCPxj wrote:
> Good morning Raymo,
>
>> Hey Alex,
>>
>> Your scenario works perfectly unless we put some restrictions on
>> accepting transaction by creditor (in our case Bob).
>> These are restrictions:
>> Alice has to use a UTXO (or some UTXOs) worth at least 40,000 Sat as
>> transaction input.
>> Alice has to reserve 10,000 Sat as transaction fee (for MT transaction)
>> regardless of transaction length or input/output amounts.
>> Alice always pays at least 4,000 Sat of BTC-transaction-fee, and the
>> 6,000 remined fee must be paid by she and Bob in proportion to their
>> outputs amounts)
>> Alice can issue a transaction the has maximum 20,000 outputs for
>> creditors (Bob and others).
>> The rest (if exist) is change back to Alice address.
>> The GT is formed based on MT.
>> Bob considers a transaction couple (MT, GT) valid only if they respect
>> these rules.
>>
>> Let’s put it in practice using some numbers (although you can find more
>> detailed explanation in paper).
>>
>> The MT would be like that:
>> Input: 40,000 Satoshi
>> Outputs:
>> Bob: 20,000
>> BTC-fee: 10,000
>> Change back to Alice: 10,000
>>
>> Based on this MT the GT will be
>> Input: 40,000 Satoshi
>> Outputs:
>> Bob: 20,000 – 20,00070% = 6,000
>> BTC-fee: 10,000 + (14,000 of Bob’s output) + (1,500 of Alice’s change
>> back) = 25,500
>> Change back to Alice: 10,000 – 10,00015% = 8,500
>>
>> Now if Alice wants to spend UTXO to Charlie with higher fee, she has to
>> pay at least 25,500 + 1 Satoshi as BTC fee in order to convince miners
>> to put his fraudulent transaction instead the GT in next block.
>> Alice already got 20,000 Sat profit from Bob. Now she can earn another
>> 14,999 Sat profit from Charlie because of same UTXO worth 40,000
>> Satoshi.
>> Indeed, she spent 40,000 Sat and in total got equal to 34,999 Sat goods
>> or services.
>> Is she a winner?
>> I am not sure!
>> What do you think?
>
> You assume here that Alice the issuer only has a single UTXO and that
> it creates a single transaction spending that UTXO.
>
> It is helpful to remember that miners consider fee*rate*, but your
> security analysis is dependent on *fee* and not fee*rate*.
>
> Now consider, what if Alice creates 1000 UTXOs, promises GTs and MTs
> to 1000 different Bobs?
>
> Now, a GT has one input and two outputs.
>
> 1000 GTs have 1000 overheads (`nLockTime` and `nVersion` and so on),
> 1000 inputs, and 2000 outputs.
>
> Now Alice the issuer, being the sole signer, can create a fraudulent
> transaction that spends all 1000 UTXOs and spends it to a single Carol
> output.
>
> This fraudulent transaction has 1 overhead, 1000 inputs, and 1 output.
>
> Do you think Alice can get a better fee*rate* on that transaction
> while paying a lower aggregate *fee* than all the GTs combined?
> Remember, you based your security analysis on Alice being forced to
> pay a larger *fee*, but neglect that miners judge transactions based
> on fee*rate*, which is subtly different and not what you are relying
> on.
> I am sure that there exists some large enough number of UTXOs where a
> single aggregating fraudulent transaction will be far cheaper than the
> tons of little GTs your security analysis depends on.
>
> This is why we do not use 1-of-1 signers in safe offchain protocols.
> Not your keys, not your coins.
>
> --
>
> In addition, your analysis is based on assuming that miners are
> perfect rational beings of perfect rationality, ***and*** are
> omniscient.
>
> In reality, miners possess bounded knowledge, i.e. they do not know everything.
>
> Even if Alice is in possession of only a single UTXO, Alice can still
> feed miners a transaction with lower feerate than the MT, then feed
> the rest of the network with a valid MT.
> Because transactions propagate through the network but this
> propagation is ***not*** instantaneous, it is possible for the MT to
> reach the miners later than the fraudulent transaction.
> In this window of time, a block may be mined that includes the
> fraudulent transaction, simply because the lucky miner never managed
> to hear of the correct MT.
>
> This attack is essentially costless to Alice, especially for big
> enough transactions where mining fees are a negligible part of the
> payment.
>
> This is why we do not use 1-of-1 signers in safe offchain protocols.
> Not your keys, not your coins.
>
> Regards,
> ZmnSCPxj
Published at
2023-06-07 22:55:03Event JSON
{
"id": "b8023f6120e9aeadec114bf19ea696d366c6c4479b96bf976266a2289aedabbd",
"pubkey": "e36b7110c1aec7ad324a0dff547934e4613f97664e1e5054ea68afa001b4e173",
"created_at": 1686178503,
"kind": 1,
"tags": [
[
"e",
"3ebd7f928d32c4622a16cd89abc93b788e957c8f9779a11f751efe89917c69af",
"",
"root"
],
[
"e",
"cd537e1da9915875f2cf207dd7db6099e74493c3c05f75a243a1f2d32fb99f9d",
"",
"reply"
],
[
"p",
"4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861"
]
],
"content": "📅 Original date posted:2021-06-30\n📝 Original message:Dear ZmnSCPxj\n\nThanks for dedicating time to read carefully the Sabu proposal and many\nthanks for your accurate point. So, lets fix it.\n\nI didn’t suppose Alice has only one UTXO, instead I expect every issuer\nuse hundreds or even millions UTXOs (for optimal benefit each worth\nexactly 40,000 Satoshi) in Sabu protocol in order to earn notable\nSabu-transactions-fees daily.\n\nYour scenario is correct and Alice can send a batch transaction which\nhas higher feeRate, but less fee amount comparing total fees of N number\nof GT transaction.\nIt is true, the batch transaction will win the race and will go to next\nblock instead of N small GT transactions.\nBut Alice herself is not the winner, since she paid a huge transaction\nfee to miner, while in honest acting didn’t have to pay at all.\nLet’s show it by numbers.\n\nImagine Alice convinced some people to pay her money and accept the MT\nand GT transactions in exchange.\nAlice issued N transactions and delivered to these guys.\nTill now Alice got money equal to N * Maximum debt per transaction,\nwhich is 20,000 N.\n\nA single GT length = length of Critical part of GT (named C) + length of\nRedundant part of GT (named R)\n\nCoefficient of Honesty benefits (called H) = C/R\nThe bigger H means less Redundant part, means less benefit in batch\ntransaction.\nThe worst H would be 1 or less than 1. I can guess H in Bitcoin\ntransaction is 4 or higher, but for now we take it 4. Probably you can\nhelp us and tell what H is exactly.\n\nThe N GTs length = N * (C + R)\nOne batch transaction length = (N * C) + R\n\nThe GT feeRate = GTfee / (C + R)\nThe batch transaction feeRate = batchFee / ((N * C) + R)\n\nWe need to batch transaction feeRate be higher than each single GT\nfeeRate (more or less the feeRate for all GTs are same).\nThus\nbatchFee / ((N * C) + R) must be bigger or at least equal to GTfee / (C\n+ R)\nso,\nbatchFee / ((N * C) + R) \u003e= GTfee / (C + R)\n\nwe already knew H = C/R then C = HR\n\nafter simplifying\n\nbatchFee \u003e= (GTfee * ((N * H) + 1)) / (H + 1)\n\nSo, this is the minimum fee that Alice has to pay for her batch\ntransaction in order to compete with GTs feeRate.\n\nLet’s put the numbers\n\u003eFrom my previous example for @Alex Schoof, we already knew that the\nGTfee is 25,500 Satoshi\nH is 4 (please let me know what is more realistic number)\nI think N in max exploitation is 10,000. If Alice takes entire block\nspace, she won’t be able to put more than 10,000 inputs in a single\ntransaction in one block.\n\nSo,\nbatchFee must be higher than (25,500 * ((10,000 * 4) + 1)) / (4 + 1)\nbatchFee must be higher than 2.04 Bitcoins. While if Alice was acting\nhonestly, she had to pay zero BTC-transaction-fee, since the Sabu\ntransactions are aimed to be circulated in Sabu network forever.\n\nBut how much benefit Alice got? We already knew that Alice had fooled\nSome people by 10,000 transactions and got 10,000 transaction * 20,000\nMax debt per transaction. She got 2 Bitcoins.\n\nAfter all, she lost 0.04 BTC. She definitely is a loser, unless she has\nconspiracy with miners which is another scenario and I already explained\nit.\n\nNote these facts:\nH is higher than 4.\nIt is impossible to fit a batch transaction with 10,000 inputs and one\noutput in one block.\nAnd after all we can simply hedge batch transaction benefits by fine\ntuning the “maximum allowed debt per transaction”.\n\nFinally, the complementary protection to cover 0.01% remind risk of\nissuer irrationality, would be the BIPxxx “for flagging/unflagging\npromised UTXOs” which is my suggestion.\nIt will be good for Sabu.\nIt will be good for adapting wide range of innovative smart contracts on\ntop of current Bitcoin with no risk and cost.\n@James Hilliard\nIf it implemented wisely, never won't affect on network stability.\n\n\n\u003e your analysis is based on assuming that miners are perfect rational beings of perfect rationality,\n\u003e ***and*** are omniscient.\nThat’s not true! The proposal just assume miners are looking for more\nprofit.\nThe suggested BIPxxx “for flagging/unflagging promised UTXOs” (if\ncommunity accept it) would prepare a knowledge about promised UTXOs for\nminer.\n\n\n\u003e Even if Alice is in possession of only a single UTXO, Alice can still feed miners a transaction\n\u003e with lower feerate than the MT, then feed the rest of the network with a valid MT.\nIt is not important in what order Alice propagate which (MT, or whatever\ntransaction) to Bitcoin network.\nThe point is, before putting this transaction in next block, the\ncreditor wallet will be aware of this renege and will send the GT to\nnetwork.\nThe rest is miner’s decision to put transaction with higher fee rate to\nnext block.\n\n\n\u003e This attack is essentially costless to Alice,\n\u003e especially for big enough transactions where mining fees are a negligible part of the payment.\nNo, in Sabu we have not big payments. Each big payment must be managed\nthrough N small transactions with each transaction max output less than\n20,000 Satoshi.\n\n\nRegards\nRaymo\n\n\n\n\nOn 2021-06-29 21:42, ZmnSCPxj wrote:\n\u003e Good morning Raymo,\n\u003e \n\u003e\u003e Hey Alex,\n\u003e\u003e \n\u003e\u003e Your scenario works perfectly unless we put some restrictions on\n\u003e\u003e accepting transaction by creditor (in our case Bob).\n\u003e\u003e These are restrictions:\n\u003e\u003e Alice has to use a UTXO (or some UTXOs) worth at least 40,000 Sat as\n\u003e\u003e transaction input.\n\u003e\u003e Alice has to reserve 10,000 Sat as transaction fee (for MT transaction)\n\u003e\u003e regardless of transaction length or input/output amounts.\n\u003e\u003e Alice always pays at least 4,000 Sat of BTC-transaction-fee, and the\n\u003e\u003e 6,000 remined fee must be paid by she and Bob in proportion to their\n\u003e\u003e outputs amounts)\n\u003e\u003e Alice can issue a transaction the has maximum 20,000 outputs for\n\u003e\u003e creditors (Bob and others).\n\u003e\u003e The rest (if exist) is change back to Alice address.\n\u003e\u003e The GT is formed based on MT.\n\u003e\u003e Bob considers a transaction couple (MT, GT) valid only if they respect\n\u003e\u003e these rules.\n\u003e\u003e \n\u003e\u003e Let’s put it in practice using some numbers (although you can find more\n\u003e\u003e detailed explanation in paper).\n\u003e\u003e \n\u003e\u003e The MT would be like that:\n\u003e\u003e Input: 40,000 Satoshi\n\u003e\u003e Outputs:\n\u003e\u003e Bob: 20,000\n\u003e\u003e BTC-fee: 10,000\n\u003e\u003e Change back to Alice: 10,000\n\u003e\u003e \n\u003e\u003e Based on this MT the GT will be\n\u003e\u003e Input: 40,000 Satoshi\n\u003e\u003e Outputs:\n\u003e\u003e Bob: 20,000 – 20,00070% = 6,000\n\u003e\u003e BTC-fee: 10,000 + (14,000 of Bob’s output) + (1,500 of Alice’s change\n\u003e\u003e back) = 25,500\n\u003e\u003e Change back to Alice: 10,000 – 10,00015% = 8,500\n\u003e\u003e \n\u003e\u003e Now if Alice wants to spend UTXO to Charlie with higher fee, she has to\n\u003e\u003e pay at least 25,500 + 1 Satoshi as BTC fee in order to convince miners\n\u003e\u003e to put his fraudulent transaction instead the GT in next block.\n\u003e\u003e Alice already got 20,000 Sat profit from Bob. Now she can earn another\n\u003e\u003e 14,999 Sat profit from Charlie because of same UTXO worth 40,000\n\u003e\u003e Satoshi.\n\u003e\u003e Indeed, she spent 40,000 Sat and in total got equal to 34,999 Sat goods\n\u003e\u003e or services.\n\u003e\u003e Is she a winner?\n\u003e\u003e I am not sure!\n\u003e\u003e What do you think?\n\u003e \n\u003e You assume here that Alice the issuer only has a single UTXO and that\n\u003e it creates a single transaction spending that UTXO.\n\u003e \n\u003e It is helpful to remember that miners consider fee*rate*, but your\n\u003e security analysis is dependent on *fee* and not fee*rate*.\n\u003e \n\u003e Now consider, what if Alice creates 1000 UTXOs, promises GTs and MTs\n\u003e to 1000 different Bobs?\n\u003e \n\u003e Now, a GT has one input and two outputs.\n\u003e \n\u003e 1000 GTs have 1000 overheads (`nLockTime` and `nVersion` and so on),\n\u003e 1000 inputs, and 2000 outputs.\n\u003e \n\u003e Now Alice the issuer, being the sole signer, can create a fraudulent\n\u003e transaction that spends all 1000 UTXOs and spends it to a single Carol\n\u003e output.\n\u003e \n\u003e This fraudulent transaction has 1 overhead, 1000 inputs, and 1 output.\n\u003e \n\u003e Do you think Alice can get a better fee*rate* on that transaction\n\u003e while paying a lower aggregate *fee* than all the GTs combined?\n\u003e Remember, you based your security analysis on Alice being forced to\n\u003e pay a larger *fee*, but neglect that miners judge transactions based\n\u003e on fee*rate*, which is subtly different and not what you are relying\n\u003e on.\n\u003e I am sure that there exists some large enough number of UTXOs where a\n\u003e single aggregating fraudulent transaction will be far cheaper than the\n\u003e tons of little GTs your security analysis depends on.\n\u003e \n\u003e This is why we do not use 1-of-1 signers in safe offchain protocols.\n\u003e Not your keys, not your coins.\n\u003e \n\u003e --\n\u003e \n\u003e In addition, your analysis is based on assuming that miners are\n\u003e perfect rational beings of perfect rationality, ***and*** are\n\u003e omniscient.\n\u003e \n\u003e In reality, miners possess bounded knowledge, i.e. they do not know everything.\n\u003e \n\u003e Even if Alice is in possession of only a single UTXO, Alice can still\n\u003e feed miners a transaction with lower feerate than the MT, then feed\n\u003e the rest of the network with a valid MT.\n\u003e Because transactions propagate through the network but this\n\u003e propagation is ***not*** instantaneous, it is possible for the MT to\n\u003e reach the miners later than the fraudulent transaction.\n\u003e In this window of time, a block may be mined that includes the\n\u003e fraudulent transaction, simply because the lucky miner never managed\n\u003e to hear of the correct MT.\n\u003e \n\u003e This attack is essentially costless to Alice, especially for big\n\u003e enough transactions where mining fees are a negligible part of the\n\u003e payment.\n\u003e \n\u003e This is why we do not use 1-of-1 signers in safe offchain protocols.\n\u003e Not your keys, not your coins.\n\u003e \n\u003e Regards,\n\u003e ZmnSCPxj",
"sig": "4f4297708708d5e34b89d032d8a1fdebcda7204561f4b58426ecca803da910810d1a9ed548717b544ed398ed3cff579a2720ee7f3335110a7bc8ef6e3d901ef1"
}