Skip to content

Instantly share code, notes, and snippets.

View gaburipeach's full-sized avatar

boybad gaburipeach

View GitHub Profile
@gaburipeach
gaburipeach / DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9
Created May 1, 2022 01:39
DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9
txSignature amount instructionAction instructionOrder userAddress timestamp currencyName currencyAddress senderAddress senderTokenMint receiverAddress userAction globalId vaultAuthority shareTokenMint depositTokenSymbol depositTokenCoingeckoId
1246 2xMKvWfa1tDGP8SMK44T7yQz8nBwyNRzptZAtRvHfXrw1z... 5.000000 transfer 1-1 DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9 2021-12-22T13:25:36Z Marinade staked SOL (mSOL) mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9 FRKVEZ115sxzi7NXBymeGkxVxywhrxwB6QkJZ3dqxiP 6asST5hurmxJ8uFvh7ZRWkrMfSEzjEAJ4DNR1is3G6eH Deposit mainnet_income_call_marinade 6asST5hurmxJ8uFvh7ZRWkrMfSEzjEAJ4DNR1is3G6eH 6UA3yn28XecAHLTwoCtjfzy3WcyQj1x13bxnH8urUiKt mSOL msol
2175 Vkm2F9iF628oRoUQt8j34PQYiRxubbXJwZ65KwyfMrSKma... 4.561841 transfer 1-1 DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9 2021-12-25T14:09:52Z Wrapped FTT (Sollet) AGFEad2et2ZJif9jaGpdMixQqvW5i81aBdvKe7PHNfz3 DcRQUi3X9Krtqn3b5muCBt8VfUsGyj8jjr6ajbseZ2f9 4MFVURMM78mS7S7kPe9wptJXoyk7tutpngvwxeJG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"id": "e28dabda",
"metadata": {},
"source": [
"## edge cases"
]
},
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaburipeach
gaburipeach / Portfolio.ts
Created June 8, 2022 07:07
Get Friktion Portfolio value for arbitrary wallet
import fetch from 'node-fetch'
export type DataPoint = {
UnixTime: number,
Value: number,
};
export type UserActionDataPoint = {
Amount: number,
// import puppeteer from "puppeteer"; // uncomment to see types lol
const puppeteer = require("puppeteer");
var os = require("os");
console.log(os.userInfo().username);
const fs = require("fs");
// /**
// * The API needs to be stable!!! DONT CHANGE
// */
from fastapi import FastAPI, status
from fastapi.middleware.cors import CORSMiddleware
import asyncpg
import uvicorn
import pandas as pd
import numpy as np
import psycopg2
import traceback
This file has been truncated, but you can view the full file.
,amount,instruction.action.name,instruction.callPath,transaction.signer,transaction.signature,block.timestamp.iso8601,currency.name,currency.address,sender.address,sender.mintAccount,receiver.address
0,1.0,mintTo,4,4DxoqE7eEraY9zgH7dR3qmphb9xuLekuNVbAcyotauG1,3oicCNBhzR6G23p3aw9wjyFjezyWEdTWMqBgiYyawqSose1Sf3iXBBx7VBmveiMusB6pdimYL6rxvihdpQXp7oHP,2022-08-03T00:04:02Z,,Aa6PH3RqcUZTvN19Add4HHjafLx3j5RsrWByHtK1Hpyd,,,CEzN7mqP9xoxn2HdyW6fjEJ73t7qaX9Rp2zyS6hb3iEu
1,1.0,mintTo,4,6BUPvJrFaPwSxqaEBtgyM64TVhQ42eNVgS4esRoLgzVx,324SpHygPTNJAPvfASvpNc5XE1bGLzkAd24sAUkzBpbwnsUCrGumtwqMBL7dUCDR1emi6BMyVZZBnubnNZppnYpn,2022-08-02T23:48:35Z,,9Jcsg7cTKuq7xWDzH2zXroU7ybbo2zYZB3qdWxz6DWQD,,,Htp9MGP8Tig923ZFY7Qf2zzbMUmYneFRAhSp7vSg4wxV
2,1.0,mintTo,4,8sKGKaRbiPMnVaCEEXgSqb5CZh9e1q9f6SLEJ1zoSkyX,aVxPHax3ECmTrAzWfpj6z2p8951SfPo5MGDu96e9HDricpdB8MtZEaxJYtHYkzANoaKt2oqGbgF8MrQxaVajmuh,2022-08-02T23:41:50Z,,2sQo8vdRuSK3wRySnHVgDnayLtGrem67qQZe5g2Mn1NE,,,Htp9MGP8Tig923ZFY7Qf2zzbMUmYneFRAhSp7vSg4wxV
3,1.0,mintTo,4,8sKGKaRbiPMnVaCEEXgSq
@gaburipeach
gaburipeach / hodl_losses
Created December 24, 2022 20:28
Uni V3 %0.05 LP losses vs. HODL (@charliemktplace)
import requests
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from io import StringIO
raw = requests.get("https://raw.githubusercontent.com/FlipsideCrypto/ethusdc-retroactive/master/ethusdc_results.csv").content
df = pd.read_csv(StringIO(str(raw,'utf-8')))
const KeybaseBot = require('keybase-bot');
const fs = require('fs');
async function main() {
// Create a new bot instance
const bot = new KeybaseBot();
/* now you can do things with the bot */
await bot.initFromRunningService()
/* now you can do things with the bot */