Skip to content

Instantly share code, notes, and snippets.

View valo's full-sized avatar
👷‍♂️
buidling

Valentin Mihov valo

👷‍♂️
buidling
View GitHub Profile
@valo
valo / gist:49c1b07985c95953f94279329f50fa26
Last active March 5, 2023 18:16 — forked from krisnod/gist:56ff894f400cce7c742fb11fb2fde9cf
RancherOS on Hetzner using software RAID (RAID 1)
Install:
----------
* Activate Hetzner Rescue System (Debian)
* Connect to Hetzner Rescue System using SSH and live boot RancherOS
(thanks goes to William Fleurant for showing how this can be done: https://github.com/wfleurant/boot-rancheros-hetzner/)
* apt-get update
* apt-get install kexec-tools aria2
@valo
valo / YFI_vs_AMPL_stacking.diff
Last active August 12, 2020 09:08
YFI vs AMPL stacking contract. One is the contract used by YFI for token distribution. The other is the contract used by YAM to distribute using AMPL liquidity tokens.
1a2,5
> *Submitted for verification at Etherscan.io on 2020-08-11
> */
>
> /**
12c16
< * Synthetix: YFIRewards.sol
---
> * Synthetix: YAMRewards.sol
668c672
from brownie import Vault, chain, interface
def main():
vault = Vault.at("0x7Cd28e21a89325EB5b2395591E86374522396E77")
decimals = vault.decimals()
print(f"Current pps: {vault.pricePerShare() / 10**decimals}")
print(f"Current degradation: {vault.lockedProfitDegradation().to('ether')}")
print(f"Total assets: {vault.totalAssets() / 10**decimals}")
print(f"Total supply: {vault.totalSupply() / 10**decimals}")