{"author":{"username":"ahn","displayName":"justin","fid":8004},"timestamp":"2026-11-13T12:06:23.000Z","text":"[$1]\nGiven our assumption that _p_ > _q_, the probability drops exponentially as the number of blocks the attacker has to catch up with increases. With the odds against him, if he doesn't make a lucky lunge forward early on, his chances become vanishingly small as he falls further behind.\\\nWe now consider how long the recipient of a new transaction needs to wait before being sufficiently certain the sender can't change the transaction. We assume the sender is an attacker who wants to make the recipient believe he paid him for a while, then switch it to pay back to himself after some time has passed. The receiver will be alerted when that happens, but the sender hopes it will be too late.\\\nThe receiver generates a new key pair and gives the public key to the sender shortly before signing. This prevents the sender from preparing a chain of blocks ahead of time by working on it continuously until he is lucky enough to get far enough ahead, then executing the transaction at that moment. Once the transaction is sent, the dishonest sender starts working in secret on a parallel chain containing an alternate version of his transaction.\\\nThe recipient waits until the transaction has been added to a block and _z_ blocks have been linked after it. He doesn't know the exact amount of progress the attacker has made, but assuming the honest blocks took the average expected time per block, the attacker's potential progress will be a Poisson distribution with expected value:\n[$2]\nTo get the probability the attacker could still catch up now, we multiply the Poisson density for each amount of progress he could have made by the probability he could catch up from that point:\n[$3]\nRearranging to avoid summing the infinite tail of the distribution...\n[$4]\nConverting to C code...\n```c\n#include <math.h>\ndouble AttackerSuccessProbability(double q, int z)\n{\n double p = 1.0 - q;\n double lambda = z * (q / p);\n double sum = 1.0;\n int i, k;\n for (k = 0; k <= z; k++)\n {\n double poisson = exp(-lambda);\n for (i = 1; i <= k; i++)\n poisson *= lambda / i;\n sum -= poisson * (1 - pow(q / p, z - k));\n }\n return sum;\n}\n```\nRunning some results, we can see the probability drop off exponentially with z.\n```plain text\nq=0.1\nz=0   P=1.0000000\nz=1   P=0.2045873\nz=2   P=0.0509779\nz=3   P=0.0131722\nz=4   P=0.0034552\nz=5   P=0.0009137\nz=6   P=0.0002428\nz=7   P=0.0000647\nz=8   P=0.0000173\nz=9   P=0.0000046\nz=10  P=0.0000012\n\nq=0.3\nz=0   P=1.0000000\nz=5   P=0.1773523\nz=10  P=0.0416605\nz=15  P=0.0101008\nz=20  P=0.0024804\nz=25  P=0.0006132\nz=30  P=0.0001522\nz=35  P=0.0000379\nz=40  P=0.0000095\nz=45  P=0.0000024\nz=50  P=0.0000006\n```\nSolving for P less than 0.1%...\n```plain text\nP < 0.001\nq=0.10  z=5\nq=0.15  z=8\nq=0.20  z=11\nq=0.25  z=15\nq=0.30  z=24\nq=0.35  z=41\nq=0.40  z=89\nq=0.45  z=340\n```\n**12. Conclusion\\\n**We have proposed a system for electronic transactions without relying on trust. We started with the usual framework of coins made from digital signatures, which provides strong control of ownership, but is incomplete without a way to prevent double-spending. To solve this, we proposed a peer-to-peer network using proof-of-work to record a public history of transactions that quickly becomes computationally impractical for an attacker to change if honest nodes control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes work all at once with little coordination. They do not need to be identified, since messages are not routed to any particular place and only need to be delivered on a best effort basis. Nodes can leave and rejoin the network at will, accepting the proof-of-work chain as proof of what happened while they were gone. They vote with their CPU power, expressing their acceptance of valid blocks by working on extending them and rejecting invalid blocks by refusing to work on them. Any needed rules and incentives can be enforced with this consensus mechanism.\n**References\\\n**[1] W. Dai, \"b-money,\" http://www.weidai.com/bmoney.txt, 1998.\\\n[2] H. Massias, X.S. Avila, and J.-J. Quisquater, \"Design of a secure timestamping service with minimal trust requirements,\" In _20th Symposium on Information Theory in the Benelux_, May 1999.\\\n[3] S. Haber, W.S. Stornetta, \"How to time-stamp a digital document,\" In _Journal of Cryptology_, vol 3, no 2, pages 99-111, 1991. \\\n[4] D. Bayer, S. Haber, W.S. Stornetta, \"Improving the efficiency and reliability of digital time-stamping,\" In _Sequences II: Methods in Communication, Security and Computer Science_, pages 329-334, 1993.\\\n[5] S. Haber, W.S. Stornetta, \"Secure names for bit-strings,\" In _Proceedings of the 4th ACM Conference on Computer and Communications Security_, pages 28-35, April 1997.\\\n[6] A. Back, \"Hashcash - a denial of service counter-measure,\" http://www.hashcash.org/papers/hashcash.pdf, 2002.\\\n[7] R.C. Merkle, \"Protocols for public key cryptosystems,\" In _Proc. 1980 Symposium on Security and Privacy_, IEEE Computer Society, pages 122-133, April 1980.\\\n[8] W. Feller, \"An introduction to probability theory and its applications,\" 1957.","images":["https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/dcf79bf3-61b6-48ba-365f-08b5238cc800/original","https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/34d6b303-9680-42d2-46a3-8d10c301cd00/original","https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/965ec4f0-e910-42ca-4431-f13ba4143600/original","https://imagedelivery.net/BXluQx4ige9GuW0Ia56BHw/9998a11c-71a5-4941-2d52-0f3f9cfa6900/original"],"farcaster":"https://farcaster.xyz/ahn/0xfdf4bb8167fa6b7efe6fa94174ad45212fb87499","firefly":"https://firefly.social/post/farcaster/0xfdf4bb8167fa6b7efe6fa94174ad45212fb87499"}