Skip to content

Instantly share code, notes, and snippets.

@djrtwo
djrtwo / reward-reduction.md
Created April 24, 2018 02:18
Analysis of Casper PoW Reward Reduction

Analysis of Casper PoW Reward Reduction

EIP 1011 - Hybrid Casper FFG proposes further reducing PoW block reward from 3 ETH to 0.6 ETH. The EIP briefly mentions that this is "because the security of the chain is greatly shifted from PoW difficulty to PoS finality and because rewards are now issued to both validators and miners." This document is to serve as an addendum to that statement, providing additional data, analysis, and arguments.

We aim to show that in Hybrid Casper FFG with an 80% reduction in block reward:

  • a PoW attack on the finality enabled chain cannot do much in comparison to a pure PoW attack
  • a pure PoW attack just as costly as other prominent PoW chains
  • there are options in the event of an attack
  • all of the above is a strong discouragement for an attack to be conducted in the meantime before full pos
@spacehuhn
spacehuhn / deauthall.md
Last active September 19, 2020 21:53
Deauth-All-Button

Disclaimer

Applying and using the following modifications are up to your responsibility.
I provide this example for you to better understand the code and how such an automatic attack-all could work.
It doesn't mean it will work, I won't provide you with further assistence, or keep this up-to-date.
These modifications make it easy to attack devices you wouldn't want to attack, keep that in mind!
You may easily violate law by using such an attack in public space.


@adiabat
adiabat / dlc3point.txt
Last active April 12, 2018 22:29
DLC oracle publicly computable R-points
[DON'T USE]
pretty sure none of this works.
The sigantures in DLC need a pre-committed R point as well as pubkey point.
Oracle pubkey = A, R
value message = v
signature = s
(generator point G)
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active December 3, 2024 21:48
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
@sipa
sipa / covert_ecdh.md
Last active January 4, 2023 10:31
Covert ECDH over secp256k1
@markblundeberg
markblundeberg / atomic-size-attack.md
Created February 16, 2018 05:14
Advisory: secret size attack on cross-chain hash lock smart contracts

Advisory: secret size attack on cross-chain hash lock smart contracts

Dr. Mark B Lundeberg, 2018 Feb 15 bitcoincash:qqy9myvyt7qffgye5a2mn2vn8ry95qm6asy40ptgx2

This security advisory notes a vulnerability in the common construction of cross-chain smart contracts (contracts between distinct cryptocurrencies) through hash locking. I focus on the primary use case in [atomic

@ajtowns
ajtowns / COMPAT.png
Last active March 13, 2018 19:45
github conflicting PRs
COMPAT.png

Explanation of how using Schnorr signatures, we can achieve an atomic swap of the "scriptless script" style.

This is based on Poelstra's ideas as summarised in https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-05-milan-meetup/slides.pdf ; also see the earlier outline in https://lists.launchpad.net/mimblewimble/msg00086.html.

Note that the details here are just my thoughts, so if you come to this randomly, don't take it as some kind of well established protocol!

Preliminaries:

We'll use || for concatenation and capitals for elliptic curve points and lower case letters for scalars.

@naterush
naterush / GasOracle.sol
Created September 10, 2017 04:34
This is taken from a hack-a-thon project w/ the wonderful Eric Tu (https://github.com/tueric) and myself. It's only the essential parts of the gas oracle. More coming soon (hopefully :) ).
pragma solidity ^0.4.8;
// RLP library moved below for readability
contract GasOracle {
using RLP for RLP.RLPItem;
using RLP for RLP.Iterator;
using RLP for bytes;
mapping (uint => BlockHeader) blocks;
@maaku
maaku / .gitignore
Last active December 9, 2021 20:57
BIP specifying new tail-call optimized subscript execution rule
*~