Skip to content

Instantly share code, notes, and snippets.

View VaultKeep3rJob.md

New job: VaultKeep3rJob https://etherscan.io/address/0x4a479E4457841D2D2Ff86e5A5389300963880C10#code // Important! use callStatic for all methods (even work) to avoid spending gas // only send work transaction if callStatic.work succeeded, // even if workable is true, the job might not have credits to pay and the work tx will revert const vaults = await VaultKeep3rJob.callStatic.vaults(); for (const vault of vaults) { const workable = await VaultKeep3rJob.callStatic.workable(vault); console.log({ vault, workable }); if (!workable) continue; await VaultKeep3rJob.connect(keeper).callStatic.work(vault);

View CrvStrategyKeep3rJob.md

New job: CrvStrategyKeep3rJob https://etherscan.io/address/0x02027bDA2425204f152B8aa35Fb78687D65E1AF5#code // Important! use callStatic for all methods (even work) to avoid spending gas // only send work transaction if callStatic.work succeeded, // even if workable is true, the job might not have credits to pay and the work tx will revert const strategies = await CrvStrategyKeep3rJob.callStatic.strategies(); for (const strategy of strategies) { const workable = await CrvStrategyKeep3rJob.callStatic.workable(strategy); console.log({ strategy, workable }); if (!workable) continue; await CrvStrategyKeep3rJob.connect(keeper).callStatic.work(strategy);

View HarvestV2Keep3rJob.md

New job: HarvestV2Keep3rJob https://etherscan.io/address/0x620bd1E1D1d845c8904aC03F6cd6b87706B7596b#code // Important! use callStatic for all methods (even workable and work) to avoid spending gas // only send work transaction if callStatic.work succeeded, // even if workable is true, the job might not have credits to pay and the work tx will revert const strategies = await HarvestV2Keep3rJob.callStatic.strategies(); for (const strategy of strategies) { const workable = await HarvestV2Keep3rJob.callStatic.workable(strategy); console.log({ strategy, workable }); if (!workable) continue; await HarvestV2Keep3rJob.connect(keeper).callStatic.work(strategy);

View Keep3rLiquidityManagerJob.md

// Important! use callStatic for all methods (even workable and work) to avoid spending gas // only send work transaction if callStatic.work succeeded, // even if workable is true, the job might not have credits to pay and the work tx will revert const jobs = await Keep3rLiquidityManagerJob.callStatic.jobs(); for (const job of jobs) { const workable = await Keep3rLiquidityManagerJob.callStatic.workable(job); console.log({ job, workable }); if (!workable) continue; await Keep3rLiquidityManagerJob.connect(keeper).callStatic.work(job); await Keep3rLiquidityManagerJob.connect(keeper).work(job);

View yETH
pragma solidity ^0.5.16;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
View gist:84de88238d3749df31d67c3e96d396b9
Alexander Kamenev <kamenal@protonmail.com>
6:13 AM (54 minutes ago)
to andre@cryptobriefing.com, me
Dear Andre,
We are writing you because Michael has discussed with us that there was an attempt to hack Curve at the emergence of BUSD pool. He explained that you and your friend managed to get a hand on hacker's money (500K USD) and, eventually, decided to return those back to the hacker.
While simply sharing with Michael our humble opinion that the money should've been shared between you, your friend and Curve, we believe that there was no independent hacker.
View busd.curve.fi 29-02-2020
#Slippage transaction
https://etherscan.io/tx/0x8f102ad5cca37362084b86fd78d7f52a73d7bc9eb73f7e2ff482783831a6b5c8
0x44e59f7 does $445k Curve zap withdraw to USDC from the new busd.curve.fi pool (before it's announced) so there is only ~50k liquidity.
Withdraws everything to USDC (after depositing equally in DAI, USDC, USDT, and BUSD)
There is only $25k USDC
$450k turns into $25k due to slippage
View gist:247dd28f9c93583dbe3528d66740409c
const Web3 = require('web3')
const web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/<InfuraToken>'))
let blockNum = 0
let run = async () => {
let addresses = {}
while (true) {