Skip to content

Instantly share code, notes, and snippets.

View kassandraoftroy's full-sized avatar
🏴
OIMOI TALAINA

κασσάνδρα.eth kassandraoftroy

🏴
OIMOI TALAINA
View GitHub Profile
@kassandraoftroy
kassandraoftroy / ObolSetup.md
Last active January 10, 2024 15:27
Obol DVT (Ubuntu + EL + Lighthouse + Charon)

Obol DVT final setup

Prerequisites

  • ubuntu machine with docker
  • have charon-distributed-validator-node repo installed
  • completed DKG
  • EL client + lighthouse synced and running

Charon folder

@kassandraoftroy
kassandraoftroy / RethLighthouseStakingGuide.md
Last active February 5, 2024 21:11
Adaptation of Somer Esat ETH Staking Guide Ubuntu/Lighthouse/Reth

Step 0 - Introduction

This is a step-by-step guide to staking on the Ethereum mainnet via Reth Execution Client and the Lighthouse Consensus Client. It is based on the following technologies:

  • Server: Ubuntu v20.04 (LTS) x64
  • Execution Client: Paradigm's Reth
  • Consensus Client: Sigma Prime Lighthouse

This guide is a fork and slight adaptation of Somer Esat guide here so that it works with the new Reth Execution Client. It is intended for stakers familiar with Somer Esat style staking setup who want to try out Reth Execution Client. It also relies heavily on info you can find in the Reth Book here

Warnings

0x8712e497000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000006200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e0deafe800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000004535bbdcff47df3f4fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb9290fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb929a00000000000000000000000000000000000000000000000000000000000001f400000000000000000000000000000000000000000000000453e982fd38491cb7ffffffffffffffffffffffffffffffffffffffffffffffffffffff
@kassandraoftroy
kassandraoftroy / hex
Created March 28, 2023 12:53
random hex
0x8712e497000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bcd3d800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000011bc47a89db63d8fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb9290fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb929a00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000011be8cee443aedaffffffffffffffffffffffffffffffffffffffffffffffffffffff
type Vault @entity {
id: ID!
blockCreated: BigInt!
timestampCreated: BigInt!
manager: Bytes!
address: Bytes!
uniswapPool: Bytes!
token0: Token!
token1: Token!
feeTier: BigInt!
@kassandraoftroy
kassandraoftroy / LiquidityGaugeV5.vy
Created April 11, 2022 13:08
LiquidityGaugeV4 but with multiple "ve" token boosts supported
# @version 0.2.16
"""
@title Liquidity Gauge v5
@author Arrakis Finance
@license MIT
"""
# Original idea and credit:
# Curve Finance's LiquidityGaugeV4
# https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/gauges/LiquidityGaugeV4.vy
@kassandraoftroy
kassandraoftroy / LiquidityGaugeV4.vy
Created February 13, 2022 22:04
Gauge With multiple ve boosts
# @version 0.2.16
"""
@title Liquidity Gauge v4
@author
@license MIT
"""
# Original idea and credit:
# Curve Finance's LiquidityGaugeV4
# https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/gauges/LiquidityGaugeV4.vy
@kassandraoftroy
kassandraoftroy / LiquidityGaugeV4.vy
Created February 13, 2022 22:00
LiquidtyGaugeUpgrade
# @version 0.2.16
"""
@title Liquidity Gauge v4
@author Angle Protocol
@license MIT
"""
# Original idea and credit:
# Curve Finance's LiquidityGaugeV4
# https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/gauges/LiquidityGaugeV4.vy
import { BigNumber } from '@ethersproject/bignumber';
import { ethers } from 'ethers';
type APRType = {
apr: number
feesEarned0: BigNumber
feesEarned1: BigNumber
}
const X96 = BigNumber.from(2).pow(BigNumber.from(96))
@kassandraoftroy
kassandraoftroy / OneSidedStrategy.sol
Created September 15, 2021 10:00
G-UNI automated strategy in solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.7;
import {
IUniswapV3Pool
} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {
ReentrancyGuard