@1delta/margin-fetcher 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -47247,13 +47247,14 @@ function parseCurvanceResults(data, meta, context) {
|
|
|
47247
47247
|
const priceUSD = Number(lower3.price) / 1e18;
|
|
47248
47248
|
if (!(priceUSD > 0 && priceUSD < 1e9)) return;
|
|
47249
47249
|
const upperUSD = upper && upper.errorCode === 0n ? Number(upper.price) / 1e18 : void 0;
|
|
47250
|
+
const spreadBps = upperUSD && upperUSD > priceUSD ? Math.round((upperUSD - priceUSD) / priceUSD * 1e4) : 0;
|
|
47250
47251
|
entries.push({
|
|
47251
47252
|
asset,
|
|
47252
47253
|
price: priceUSD,
|
|
47253
47254
|
priceUSD,
|
|
47254
47255
|
marketUid: createMarketUid(chainId, key2, asset),
|
|
47255
47256
|
targetLender: key2,
|
|
47256
|
-
description:
|
|
47257
|
+
description: spreadBps ? `Curvance OracleManager (USD, pessimistic-low; dual feed +${spreadBps}bps)` : "Curvance OracleManager (USD)"
|
|
47257
47258
|
});
|
|
47258
47259
|
});
|
|
47259
47260
|
return entries;
|