Skip to content

Instantly share code, notes, and snippets.

@trayvox
trayvox / LShit.sol
Last active July 21, 2022 19:49
Example "exploit" showing how the Layer Zero multisig can rug StarGate by itself
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol";
struct Packet {
uint16 srcChainId;
uint16 dstChainId;
@trayvox
trayvox / L0_2.sol
Last active February 20, 2023 03:03
Example showing how Layer Zero can rug if team is malicious
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol";
struct Packet {
uint16 srcChainId;
uint16 dstChainId;
@trayvox
trayvox / L0.sol
Last active April 1, 2024 19:09
Example to show how LayerZero can rug all LP's if unverified contracts are malicious
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import {ERC20, SafeTransferLib} from "solmate/utils/SafeTransferLib.sol";
import {DSTestPlus} from "solmate/test/utils/DSTestPlus.sol";
struct Packet {
uint16 srcChainId;
uint16 dstChainId;