flashloan-profit-calculator
Version:
A library for analyzing flashloan transactions and calculating profits
11 lines (10 loc) • 390 B
TypeScript
import type { TransferLog, TraceCall } from "../types";
export type FlashloanDetection = {
isFlashloan: boolean;
protocol?: string;
borrowedTokens: string[];
borrowedAmounts: bigint[];
repaidAmounts: bigint[];
profit?: bigint;
};
export declare function detectFlashloan(logs: TransferLog[], trace: TraceCall[], contractAddress: string): Promise<FlashloanDetection>;