Skip to content

Instantly share code, notes, and snippets.

View coffiasd's full-sized avatar
🎯
Focusing

ayden-lee coffiasd

🎯
Focusing
View GitHub Profile
@coffiasd
coffiasd / Panotic_1.sol
Last active May 23, 2024 02:17
SettleLongPremium is incorrectly implemented: premium should be deducted instead of added
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "hardhat/console.sol";
contract Panotic{
function exercise(
int128 realizedPremium
@coffiasd
coffiasd / t.ts
Last active April 1, 2024 13:46
jup swap demo code
require('dotenv').config();
import {
Connection,
VersionedTransaction,
Keypair,
PublicKey,
TransactionInstruction,
AddressLookupTableAccount,
TransactionMessage
@coffiasd
coffiasd / Timelock.sol
Last active July 14, 2023 03:28
Timelock.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
import "./SafeMath.sol";
contract Timelock {
using SafeMath for uint;
event NewAdmin(address indexed newAdmin);
event NewPendingAdmin(address indexed newPendingAdmin);
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "@balancer-labs/v2-interfaces/contracts/vault/IVault.sol";
import "@balancer-labs/v2-interfaces/contracts/vault/IFlashLoanRecipient.sol";
contract Swap is IFlashLoanRecipient {
IVault private constant vault = IVault(0xBA12222222228d8Ba445958a75a0704d566BF2C8);
event eventLog(string eventName);