Skip to content

Instantly share code, notes, and snippets.

@waynenilsen
waynenilsen / gitt.sh
Last active February 7, 2024 18:48
A zsh script to streamline Git operations, featuring branch creation, commit amendments, and push actions with user confirmations.
#!/usr/bin/env zsh
# Explicitly set the script name
SCRIPT_NAME=$(basename "$0")
# Exit when any command fails, unset variables are an error, and fail on error in any pipeline.
set -euo pipefail
# Help function for displaying usage information
function help() {
@waynenilsen
waynenilsen / nocturne-v1_attestation.log
Created October 23, 2023 19:50
Attestation for nocturne-v1 MPC Phase 2 Trusted Setup ceremony
Hey, I'm waynenilsen-3612857 and I have contributed to the nocturne-v1 MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (canonaddrsigcheck)
Contributor # 3
Contribution Hash: 9d538e3c 5d3cc211 c3715951 d7e135c3
d3fc8ff7 17eefb9e 6000bd26 adc2cfc5
3bf9b197 9bb5d294 9463c0ec 950fa148
75d6f4a6 7035079c 2d4b1bb7 f73109d5
@waynenilsen
waynenilsen / dry-run_attestation.log
Created October 20, 2023 20:21
Attestation for dry-run MPC Phase 2 Trusted Setup ceremony
Hey, I'm waynenilsen-3612857 and I have contributed to the dry-run MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (joinsplit)
Contributor # 1
Contribution Hash: cf28e248 c9ab2d38 0b7aaee8 fd06f1d8
c702b38b 04c72fbe e3bfdc7f 1ee79c5b
9e75177b edba6963 5d761d45 27b8902d
d4c93dec 1a630809 07eb7901 77d3c2fc

Power Claims for fun and profit

Options are bad on Ethereum and how to make things better

There are some problems with vanilla options on Ethereum and more broadly for some market participants. The markets for options are stratified across two dimensions, strike and expiry. Markets must constantly be opened up and closed based on price movements and time movements. This fragments liquidity and makes it costly for market makers to update their offers. These problems also exist in traditional markets but to a lesser degree due to the fact that there are no gas costs.

Many people trade options to get a convex payoff function with respect to the underlying asset. This means that for a small upfront investment the investor is able to get a large gain if the price increases(decreases) for a call(put). They also have limited liability. This represents the single biggest difference between leveraged products and convex products. When you trade with leverage it is entirely possible that the asset reaches your p

0x404f0989A2c96A8c6667A2AB0268F4910eE0f0aD
@waynenilsen
waynenilsen / gpg.txt
Created September 12, 2018 19:52
circle gpg key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFuZa8sBEADKNi4gE2GGJvNc/BH4Y1JoGAxF3xsttH1EazqcWv0gtJsqFk4J
BO1fzZKEMjXUBUxJWrXn+aW35LVO/50lUC1T+/hHAukfM8po92plL8UtlFbqj3fe
EvAJUKpU/3wLioLV55Y8AVAFOe9odY6FvrOQU81HZVerFA/QOAHdOqAdSGTs3iSL
LJbDFPgXhGtNj1/9xPW+FVvT3ZO/7ip/QjrFDkm+MWL3moH10NSy7PV98WD+dQo0
LVwrr9AAca+iy09FpJNLWwn3uSkBb9LW9Csa9qDX75/s9KYQ5ENr5kquiJGEWD3f
65Xa1gFHeYKs64ftzRaxb7BKju5xXU9DsAmmhzfsCRFlFMv/az6NN6HFmjQZS6nJ
dt7qIEqrOQwAxEchL465R+OCFt4psRT4+NWpRdeZGVNdy9+821x6+EKOlO44IxVC
2dnQKSo02/O/MlUDcME1I2luQ8t61gFdO/geRK/VzOMQY6e7mBDK7lx1qnCIJaSR
@waynenilsen
waynenilsen / polo-arbitrage
Last active June 30, 2017 01:58
Poloniex arbitrage check
#!/usr/bin/env node
var https = require('https');
var fee = 0.002;
var uri = "https://poloniex.com/public?command=returnTicker";
function parse(ticker){
var pairs = [], pair, parts;
for (pair in ticker){
parts = pair.split('_');
@waynenilsen
waynenilsen / playground.rs
Created September 4, 2015 14:44 — forked from anonymous/playground.rs
Shared via Rust Playground
#[derive(Debug)]
struct Node<T> {
content : T,
parent : usize,
children : Vec<usize>,
}
#[derive(Debug)]
struct Heiarchy<T> {
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
GLX_ARB_create_context, GLX_ARB_create_context_profile,
GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
GLX_EXT_create_context_es2_profile, GLX_EXT_framebuffer_sRGB,
GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info,
@waynenilsen
waynenilsen / dict.rs
Last active November 12, 2015 18:50
python-like dict syntax in rust thanks to macros
use std::collections::HashMap;
macro_rules! dict {
( $( $k:expr => $v:expr ),* ) => {{
let mut m = HashMap::new();
$(
m.insert($k, $v);
)*
m
}};