Skip to content

Instantly share code, notes, and snippets.

View 0xAlcibiades's full-sized avatar
😅

Alcibiades 0xAlcibiades

😅
View GitHub Profile
//! THIS IS A GREAT EVIL THAT MUST BE DESTROYED necessitated by the current
//! limitations of the `alloy` crate.
//!
//! This module provides a wrapper for the `SolCall` trait from the `alloy` crate.
//! Its main purpose is to create an object-safe interface for `SolCall` implementations,
//! allowing for dynamic dispatch and easier handling of different Solidity function calls
//! in a uniform manner.
//!
//! ## Motivation
//!
@0xAlcibiades
0xAlcibiades / Multicall.sol
Created March 22, 2022 00:19
A Pre EIP-1559 MEV/Multicall in pure Yul integrated with ApeBank and with Native GasTokens
// SPDX-License-Identifier: MIT
object "Multicall" {
code {
// Deploy the contract
// Store gas token burn cost in zero slot
sstore(0, 0)
sstore(1, 0)
sstore(2, 0)
datacopy(0x0, dataoffset("MulticallRuntime"), datasize("MulticallRuntime"))
@0xAlcibiades
0xAlcibiades / Sheepdog.sol
Created November 20, 2021 15:18
Trivial exploit for weak Pseudo Random Number Generation in the Wolf Game
// SPDX-License-Identifier: UNLICENSED
// It's trivially easy to exploit a weak PRNG based NFT.
// Just bundle this with a flashbots bundle where the mint occurs.
//
// It's also trivially easy to detect/prevent with a took like slither:
// https://github.com/crytic/slither/wiki/Detector-Documentation#weak-PRNG
pragma solidity ^0.8.0;
@0xAlcibiades
0xAlcibiades / airdrop_farming.ipynb
Last active February 7, 2022 04:59
ENS Token Sybil Attack Analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.