SIGN IN SIGN UP

neutral-trade: read apy7d, the field the API actually returns (#2896)

The adapter reads vault.apy7dAfterFees, but api.neutral.trade/public/yields
returns apy7d, apy30d, apy90d and apyInception. No vault has an
apy7dAfterFees key, so toPct() gets undefined and returns null for both
apyBase and apyBase7d. utils.keepFinite then requires at least one finite
apyBase/apyReward/apy, so every pool is dropped and the adapter publishes
nothing.

Running the adapter on master returns 0 pools. After the change it returns
all 12 vaults, $12.44M TVL.

apy7d is the realized return net of fees. Checked it against the pool's own
price per share on two vaults: HFT Multi-factor went 2.725121 to 2.740686
over 7 days, an implied 0.3458 against apy7d 0.34575, and Neutral Autopilot
went 1.375248 to 1.376615, implied 0.0532 against apy7d 0.05317. The API
also declares rateUnit "decimal", so the existing *100 is right.

Some vaults currently report a negative 7d APY. Those are real drawdowns in
the published price per share, not a units problem.
₿hari committed
7b0f73c7eb457db566bb7e509c70f0bc3ed1d191
Parent: 0134b86
Committed by GitHub <noreply@github.com> on 8/7/2026, 11:53:56 AM