Impermanent loss is invisible

已关闭
#286 6 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 4 天内回复

@abdulrahmanj383-creator 已经在做这个了。

开始于 2026年10月16日。

  • #400 来自 @abdulrahmanj383-creator —— 未关闭
  • #477 来自 @sparkysolutions10-pixel —— 已关闭,未合并

评估

这个 Issue 还没有评估数据。

描述

area:pricing difficulty:advanced epic:analytics help wanted points:200 Stellar Wave
Background

Fee APR alone is a half-truth that has cost liquidity providers real money across every chain. A pool paying 40% while its pair diverges 30% is a loss presented as a yield, and Lens holds the price history needed to say so.

What to build
  • Divergence loss per pool over a window, computed from the price history already stored.
  • Reported beside the fee APR from L141, never separately — the two numbers are only meaningful together.
  • A net figure, clearly labelled as an estimate with its assumptions stated.
Acceptance criteria
  • Divergence loss per pool over a window, from stored history
  • Always returned alongside fee APR, never alone
  • Assumptions stated in the response and the docs
  • A test against a hand-computed two-point example

Drips Wave · Complexity: Advanced · 200 points


Repo: Divinity-Labs/Lens. Node + Fastify + Prisma + Postgres. Tests are vitest (npm test), not jest — jest against this repo fails every file and tells you nothing.

?network= is not optional on a new route. Every row carries a network and the indexes lead with it. Read req.network ?? activeNetwork, filter on it, echo it in the response, and declare the parameter in openapi.yaml. tests/openapi.test.ts boots the server and fails if a registered route is missing from the spec.

A number without provenance is not an answer. Every figure this batch adds must carry what it was computed from: which venues, how many samples, how fresh. The point of Lens is that its numbers can be checked.

Never elide a contract id or an issuer. Take addresses from the protocol's own documentation and write them whole. A sibling repo's issue wrote CD2W5LUR…XZ4L and five contributors invented plausible contract ids to fill the gap.

Say when you cannot answer. An asset with no liquidity, a pair with one venue, a window with a gap — each has an honest answer that is not zero and not a 500. Zero is a number people act on.


Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk

主要语言
TypeScript
星标
4
派生
71
平均合并
3 天 22 小时
30 天内合并 PR
142

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Divinity-Labs/Lens 的其他 Issue

查看 Divinity-Labs/Lens 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。