PageSourceSearch

https://fluid.io/assets/dex-lite-BF6Ywsrc.js

js fluid.io collected 2026-10-03 23:29:46 UTC 3,634 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`03c9727050ff8e4a09da8b23c8d2ebe01aec016f`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`153e2b9e-5db3-4b46-8e4b-b0220f866e4d`,e._sentryDebugIdIdentifier=`sentry-dbid-153e2b9e-5db3-4b46-8e4b-b0220f866e4d`)}catch{}})();import{t as e}from"./big-BDZgBMx3.js";import{i as t,r as n}from"./format-Nnbprxi2.js";function r(e){if(!Number.isFinite(e)||e<=0)return`0s`;let t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=Math.floor(e%60);return[t?`${t}d`:``,n?`${n}h`:``,r?`${r}m`:``,!t&&!n&&!r?`${i}s`:``].filter(Boolean).join(` `)}function i(e){return`$${e.toLocaleString(`en-US`,{maximumFractionDigits:e<10?4:0})}`}function a(e,t){let n=t>=1?0:Math.min(4,Math.ceil(-Math.log10(t)));return`$${e.toLocaleString(`en-US`,{maximumFractionDigits:n,minimumFractionDigits:n})}`}function o(e){return Number.isInteger(e)?String(e):e.toFixed(2)}function s(e){return e===0?`0`:e>=.01?e.toFixed(4):e.toExponential(2)}function c(e,r,a){let c=[{label:`Tick`,value:o(e.tickValue)},{label:e.status===0?`Liquidates below`:`Price level*`,value:i(e.triggerPriceUsd)}];return e.status===1&&(c.push({label:`Debt`,value:`${n(e.debtTokens)} ${a}`},{label:`Collateral`,value:`${n(e.collateralTokens)} ${r} (${t(e.collateralUsd,!0)})`}),e.remainingFraction!==null&&c.push({label:`Debt factor vs initial`,value:`×${s(e.remainingFraction)}`})),e.status===2&&e.connectionFactor!==null&&c.push({label:`Connection factor`,value:`×${s(e.connectionFactor)}`}),e.baseBranchId!==null&&c.push({label:`Base branch`,value:`#${e.baseBranchId}${e.baseBranchTick===null?``:` @ ${e.baseBranchTick}`}`}),c}var l=[1];function u(e){return l.includes(e)}var d=`16777215`,f=9;function p(t,n){return n?new e(`1e27`).div(t).toNumber():new e(t).div(`1e27`).toNumber()}function m(e){return{address:e.address,decimals:e.decimals,logoUrl:e.logoUrl,price:e.price,symbol:e.symbol}}function h(t,n=!1){let i=t.state.dexVariables,a=t.state.centerPriceShift,o=new e(t.reserves.token0RealReserves).div(new e(10).pow(f)),s=new e(t.reserves.token1RealReserves).div(new e(10).pow(f)),c=o.times(t.token0.price).toNumber(),l=s.times(t.token1.price).toNumber(),u=new e(t.prices.centerPrice),h=u.plus(new e(t.prices.upperRangePrice).minus(u).times(new e(100).minus(i.upperShiftThresholdPercent)).div(100)),g=u.minus(u.minus(t.prices.lowerRangePrice).times(new e(100).minus(i.lowerShiftThresholdPercent)).div(100)),_=new e(a.rebalancingShiftingTime).gte(d)?`-`:r(Number(a.rebalancingShiftingTime)),v=p(t.prices.lowerRangePrice,n),y=p(t.prices.upperRangePrice,n),b=p(g.toFixed(),n),x=p(h.toFixed(),n),S=p(a.minCenterPrice,n),C=p(a.maxCenterPrice,n),w=new e(i.lowerRangePercent).div(`1e2`).toNumber(),T=new e(i.upperRangePercent).div(`1e2`).toNumber();return{centerPrice:p(t.prices.centerPrice,n),feePercent:new e(i.fee).div(`1e4`).toNumber(),id:t.id,lastInteractionAt:Number(a.lastInteractionTimestamp)*1e3,lowerBoundPrice:n?x:b,lowerRangePercent:n?T:w,lowerRangePrice:n?y:v,maxCenterPrice:n?S:C,minCenterPrice:n?C:S,poolPrice:p(t.prices.poolPrice,n),revenueCutPercent:new e(i.revenueCut).toNumber(),shiftingTime:_,switched:n,token0:m(n?t.token1:t.token0),token0RealReserves:n?s.toNumber():o.toNumber(),token0RealReservesUsd:n?l:c,token1:m(n?t.token0:t.token1),token1RealReserves:n?o.toNumber():s.toNumber(),token1RealReservesUsd:n?c:l,totalEffectiveReservesUsd:c+l,upperBoundPrice:n?b:x,upperRangePercent:n?w:T,upperRangePrice:n?v:y}}export{i as a,a as i,h as n,r as o,c as r,u as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.