Commit 23dc22e
authored
feat(frontend): Increase ICPSwap minimum TVL threshold to 500 USD (#12616)
# Motivation
We use ICPSwap as a fallback rate provider when Coingecko has no price
for an ICRC token. For tokens with low-liquidity ICPSwap pools (e.g.
USDC), the reported price is unreliable, so we already filter out pools
below a TVL cutoff (introduced in #12431).
The current threshold of 10 USD is too permissive: pools with only a
handful of dollars in liquidity still pass through and can feed wildly
wrong prices to the wallet.
USDC on ICP has ~$76 tvl and the price seems not reliable, and I'd
rather not show a price than an unreliable one.
<img width="400" alt="image"
src="https://github.com/user-attachments/assets/a0367b97-ef36-4083-8a62-d6810f9b6894"
/>
# Changes
- Raise `ICPSWAP_MIN_TVL_USD` from 10 to 500.
- Update the two threshold-boundary tests to match the new value.
# Tests
`exchange.utils.spec.ts` — all 31 tests pass locally.
🤖 Claude Opus 4.71 parent 9ae0332 commit 23dc22e
2 files changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
0 commit comments