Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/handlers/triggerEnrichment.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ const enrich = (pool, days, offsets) => {
// 3: - more than 1 asset but same underlying assets
const checkIlRisk = (el) => {
const l1Token = ['btc', 'eth', 'avax', 'matic', 'eur', 'link', 'sushi'];
// tokens that merely CONTAIN an l1Token substring but are NOT correlated with it
// (independent governance/utility tokens). Without this, e.g. 'ethfi'.includes('eth')
// collapses ETHFI into the ETH family and mislabels ETHFI-ETH pools as ilRisk 'no'.
const notCorrelated = ['ethfi', 'sethfi', 'ethdydx', 'ethix'];
const symbol = el.symbol.toLowerCase();
const tokens = symbol.split('-');

Expand All @@ -393,6 +397,7 @@ const checkIlRisk = (el) => {
} else {
const elements = [];
for (const t of tokens) {
if (notCorrelated.includes(t)) continue;
for (const x of l1Token) {
if (t.includes(x)) {
elements.push(x);
Expand Down
Loading