Skip to content

Instantly share code, notes, and snippets.

View larry0x's full-sized avatar
🇵🇹
PT

Larry larry0x

🇵🇹
PT
View GitHub Profile
const MONTHLY_PAYMENT = 558;
const BORROW_APR = 0.2607;
const REWARD_APR = 0.446;
const TARGET_LTV = 0.3;
const ETH_STAKING_APR = 0.0483;
let collateral = 100000;
let debt = 30000;
let cost = 0;
const axios = require("axios");
const { table } = require("table");
const pair = "ETH/USD";
const initialAmount = 1.0;
const numberOfWeeks = 26;
const firstSellTimestamp = 1609473600;
const firstBuyTimestamp = 1609747200;
const interval = 7 * 24 * 60 * 60; // a week
@larry0x
larry0x / thorsynth-charts.ipynb
Last active June 29, 2021 05:34
Script used to generate charts for the THORSynth article
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@larry0x
larry0x / generate.js
Last active May 31, 2021 08:05
Generate vanity Ethereum addresses
// ethers.js doesn't seem to support generating 24-word mnemonic phrases. Instead, we use
// terra.js to generate the phrases, and use ethers to convert them to Ethereum addresses.
//
// How to use:
//
// > npm install ethers @terra-money/terra.js
// > node generate.js
//
const { MnemonicKey } = require("@terra-money/terra.js");
const { Wallet } = require("ethers");