Motivation
The GMX perp mark is pinned to the on-chain fair price every block, while AMM pools (Uniswap/Balancer/Curve) drift away from fair under orderflow. This creates a real, tradable spot–perp basis, and capturing it delta-neutrally is exactly the α-style edge the environment is meant to reward (ADR 0007).
Proposal
A spot(AMM)–perp(GMX) basis arbitrage agent:
- Monitor basis = AMM spot price (per-venue observation, e.g.
priceUsdcPerWeth) vs GMX mark (protocols.gmx.marketPriceUsd).
- When |basis| exceeds total cost (AMM swap fee + GMX open/close + execution fee + expected keeper delay), open a delta-neutral pair: trade the mispriced AMM leg and take the opposite GMX position.
- Close on convergence; size by basis magnitude vs cost, respecting keeper-latency risk (GMX orders execute asynchronously — avoid stacking duplicate opens while an order is pending).
- Ship as
example/agents/<id>/ with both agent.ts and prompt.md per ADR 0015.
Funding-rate (FR) leg — currently blocked on env support
Funding is not modeled today: the local GMX deployment leaves fundingFactor/borrowingFactor at 0, and no funding/OI fields are surfaced in GmxObservation. The strategy should treat funding as 0 for now, but be structured so an FR carry signal (harvest funding by holding the cheap side while delta-neutral) can slot in once the environment models funding and exposes it in the observation. That env work is out of scope for this issue.
Motivation
The GMX perp mark is pinned to the on-chain fair price every block, while AMM pools (Uniswap/Balancer/Curve) drift away from fair under orderflow. This creates a real, tradable spot–perp basis, and capturing it delta-neutrally is exactly the α-style edge the environment is meant to reward (ADR 0007).
Proposal
A spot(AMM)–perp(GMX) basis arbitrage agent:
priceUsdcPerWeth) vs GMX mark (protocols.gmx.marketPriceUsd).example/agents/<id>/with bothagent.tsandprompt.mdper ADR 0015.Funding-rate (FR) leg — currently blocked on env support
Funding is not modeled today: the local GMX deployment leaves
fundingFactor/borrowingFactorat 0, and no funding/OI fields are surfaced inGmxObservation. The strategy should treat funding as 0 for now, but be structured so an FR carry signal (harvest funding by holding the cheap side while delta-neutral) can slot in once the environment models funding and exposes it in the observation. That env work is out of scope for this issue.