Skip to main content
Glama

flashloan_arbitrage_profit_calculator

Calculate net arbitrage profit for multi-hop flashloans across Base L2 DEXes, factoring pool fees, price impact, 0.09% loan premium, and gas costs.

Instructions

Calculates net arbitrage profit for multi-hop flashloans across Base L2 DEXes, factoring pool fee tiers, price impact, loan premium (0.09%), and gas burnt. (0.045 USDC on Base L2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payloadYesInput parameters or JSON string payload for the tool execution
paymentSignatureNoBase L2 USDC micropayment signature or transaction hash for x402 settlement

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the disclosure burden. It usefully reveals formula assumptions such as the 0.09% loan premium and 0.045 USDC gas estimate, but it does not disclose whether the tool is read-only, what output to expect, or that a paymentSignature is involved in settlement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence with a front-loaded verb and resource, followed by concrete assumptions. There is no filler or repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex DeFi calculation with a generic string payload and no output schema, the description does not define the required payload fields, the output units/format, or the payment/settlement mechanics. An agent could not reliably invoke and interpret this tool based on the description alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds domain context and names calculation factors, but the payload parameter is still just a generic JSON string with no field-level structure, leaving the agent unable to construct a proper payload.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Calculates') and a specific resource ('net arbitrage profit for multi-hop flashloans across Base L2 DEXes'), and enumerates the factors involved. This clearly distinguishes it from closely related siblings like compute_uniswap_v3_quote and calculate_dex_slippage_bounds.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear scope: multi-hop flashlolans on Base L2 DEXes. However, it does not explicitly name alternatives or state when not to use this tool, which would be helpful given the large number of overlapping DeFi calculation siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools