Skip to content

Instantly share code, notes, and snippets.

awemany

Block or report user

Report or block awemany

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@awemany
awemany / .gitignore
Last active Nov 29, 2018
Testing multithreaded transaction counting methods
@awemany
awemany / ZCF.md
Last active May 14, 2019
Solving the 0-conf problem using forfeits
View ZCF.md

Solving the 0-conf problem using forfeits

by /u/awemany

Overview

The problem of ensuring good security for unconfirmed transactions in Bitcoin is repeatedly discussed in the community. Right now these so-called 0-conf transactions are usually expected to be of low risk in the case of small amounts and face-to-face interaction of merchant and customer.

@awemany
awemany / bet.py
Created Jul 28, 2017
Peter Rizun's memorylessness bet against CSW
View bet.py
#!/usr/bin/env python
# CSW vs. Peter Rizun bet demo by awemany
# Note this discretizes time into seconds for easier understanding. This will
# however-so-slightly bias the calculations in here, due to coincidences etc.
import numpy as np
MEAN_BLOCK_TIME = 600
minute = 60
@awemany
awemany / stickygate.py
Created Nov 30, 2016
Python code awemany vs. dgenr8 block depth probability
View stickygate.py
#!/usr/bin/env python
import numpy as np
from scipy.special import binom
from scipy.integrate import quad
from scipy.stats import erlang
######################################################################
# awemany: look at binomial
def bprop(k, n, p):
"""Binomial probability density.
Probability of drawing exactly k x-like items out of n total, where
You can’t perform that action at this time.