(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8490],{9942:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/bitcoin-s2f-model",function(){return a(1296)}])},1296:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return BitcoinS2FModel}});var l=a(5893),i=a(9008),o=a.n(i),n=a(7294),r=a(7626),s=a(5912),c=a(1526),d=a(6720),m=a(6488);a(4321),a(813);var h=a(6204),u=a(8688);function BitcoinS2FModel(){let[e,t]=(0,n.useState)(!0),[a,i]=(0,n.useState)(!0),[s,g]=(0,n.useState)("isInfoVisible"),[f,p]=(0,n.useState)(!1),[x,w]=(0,n.useState)(!1),y=(0,u.eI)("https://swmkwzrguapkaodkgcmt.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InN3bWt3enJndWFwa2FvZGtnY210Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTIxODI1NDMsImV4cCI6MjAyNzc1ODU0M30.At51g7QDyI7Pk-nx_-S5ShAcme7bjhSUqX8YsVvGB9A");(0,n.useEffect)(()=>{let e=window.location.pathname,t="isInfoVisible_".concat(e);g(t);let a=localStorage.getItem(t);null!==a&&i("false"!==a)},[]);let toggleInfo=()=>{let e=!a;localStorage.setItem(s,e.toString()),i(e)};(0,n.useEffect)(()=>{(0,m.ZP)(":not(.sidebar-tooltip)[data-tippy-content]",{placement:"bottom",theme:"customTheme"})},[]);let v=(0,n.useRef)(null),fetchData=async()=>{try{let{data:e,error:a}=await y.from("daily_candles").select("candles").eq("token","BTCUSDT");if(a)throw Error("Error fetching BTC data from Supabase: ".concat(a.message));if(!e||0===e.length)return;let l=e[0].candles.map(e=>({timestamp:new Date(e.timestamp).toISOString().split("T")[0],close:e.close})),i=calculateTotalSupply(new Date),o=l.map(e=>{let{timestamp:t,close:a}=e,l=new Date(t),o=calculateS2F(l,i),n=o?calculateModelPrice(o):null;return{date:l,price:parseFloat(a.toString()),s2f:o,modelPrice:n}}),n=generateProjections(o,new Date);drawChart(l,o,n),t(!1);let handleResize=()=>{drawChart(l,o,n)};return window.addEventListener("resize",handleResize),()=>window.removeEventListener("resize",handleResize)}catch(e){console.error("Failed to fetch data from Supabase:",e),t(!1)}};(0,n.useEffect)(()=>{let e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Oxanium:wght@300;400;500;600;700&display=swap",e.rel="stylesheet",e.onload=()=>{document.fonts.ready.then(()=>{p(e=>!e)})},document.head.appendChild(e)},[]),(0,n.useEffect)(()=>{fetchData()},[f]);let generateProjections=(e,t)=>{let a=[],l=new Date(t.getFullYear()+5,t.getMonth(),t.getDate()),i=new Date(t);for(;i<=l;){let e=calculateS2F(i,calculateTotalSupply(i)),t=e?calculateModelPrice(e):null;a.push({date:new Date(i),price:null,s2f:e,modelPrice:t}),i.setDate(i.getDate()+1)}return a},formatAxisLabel=e=>e>=1?e.toFixed(0):e>=.01?e.toFixed(2):e.toFixed(6),formatTooltipValue=e=>e>1e3?e.toFixed(0):e>=1?e.toFixed(2):e>=.01?e.toFixed(2):e.toFixed(6),calculateTotalSupply=e=>{let t=new Date("2009-01-03"),a=(e.getTime()-t.getTime())/864e5,l=Math.floor(144*a),i=0,o=50,n=0;for(;n<l;){let e=Math.min(21e4,l-n);i+=e*o,n+=e,o/=2}return i},calculateS2F=(e,t)=>{let a=getCurrentBlockReward(e);if(null===a)return console.error("Block reward is null for date:",e),null;let l=52560*a;return 0===l?(console.error("Annual production is zero for date:",e),null):t/l},calculateModelPrice=e=>.25*Math.pow(e,3),getCurrentBlockReward=e=>{let t=new Date("2009-01-03"),a=(e.getTime()-t.getTime())/864e5,l=50/Math.pow(2,Math.floor(Math.floor(144*a)/21e4));return l<1e-8?(console.error("Block reward too small:",l,"for date:",e),null):l},generateDailyDates=(e,t)=>{let a=[],l=new Date(e),i=new Date(t);for(;l<=i;)a.push(new Date(l).toISOString().split("T")[0]),l.setDate(l.getDate()+1);return a},getDaysUntilHalving=e=>{let t=[new Date("2012-11-28").getTime(),new Date("2016-07-09").getTime(),new Date("2020-05-11").getTime(),new Date("2024-04-12").getTime(),new Date("2028-04-12").getTime()],a=new Date(e).getTime();for(let e of t)if(a<e)return Math.round((e-a)/864e5);return 0},interpolateColor=(e,t,a)=>{let l=e.slice();for(let i=0;i<3;i++)l[i]=Math.round(l[i]+a*(t[i]-e[i]));return l},hexToRgb=e=>{let t=parseInt(e.slice(1),16);return[t>>16&255,t>>8&255,255&t]},rgbToHex=e=>"#".concat(e.map(e=>e.toString(16).padStart(2,"0")).join("")),getColorForDaysUntilHalving=e=>{let t=[{value:0,color:"#333361"},{value:200,color:"#112885"},{value:400,color:"#0652DD"},{value:600,color:"#45aaf2"},{value:800,color:"#26de81"},{value:1e3,color:"#f9ca24"},{value:1200,color:"#fa8231"},{value:1400,color:"#FF0000"}];for(let a=0;a<t.length-1;a++)if(e>=t[a].value&&e<t[a+1].value){let l=(e-t[a].value)/(t[a+1].value-t[a].value),i=hexToRgb(t[a].color),o=hexToRgb(t[a+1].color),n=interpolateColor(i,o,l);return rgbToHex(n)}return t[t.length-1].color},drawChart=(e,t,a)=>{let l=v.current;if(!l)return;let i=l.getContext("2d");if(!i)return;let o=document.createElement("canvas"),n=o.getContext("2d"),s=l.parentElement,c=s.clientWidth,d=s.clientHeight;l.width=2*c,l.height=2*d,l.style.width="".concat(c,"px"),l.style.height="".concat(d,"px"),i.scale(2,2),o.width=2*c,o.height=2*d,n.scale(2,2);let m=Math.max(...e.map(e=>e.close)),h=Math.min(...e.map(e=>e.close)),u=Math.max(...t.map(e=>e.modelPrice||0),...a.map(e=>e.modelPrice||0)),g=Math.min(...t.map(e=>e.modelPrice||u),...a.map(e=>e.modelPrice||u)),f=Math.max(m,u),p=Math.min(h,g),x=(d-20-30)/(Math.log10(f)-Math.log10(p)),w=generateDailyDates(t[0].date,a[a.length-1].date),y=[new Date("2012-11-28"),new Date("2016-07-09"),new Date("2020-05-11"),new Date("2024-04-19"),new Date("2028-04-12")],b=new Date(t[0].date),S=new Date(a[a.length-1].date),j=((e,t,a,l)=>{let i=[],o=new Date(e);for(;o<=t;){let e=null;if(l.forEach(t=>{let a=new Date(t),l=new Date(a);if(l.setFullYear(a.getFullYear()+1),o>=a&&o<=l){let t=(o.getTime()-a.getTime())/864e5,i=calculateS2F(a,calculateTotalSupply(a)),n=calculateS2F(l,calculateTotalSupply(l)),r=calculateModelPrice(i),s=calculateModelPrice(n);e=r+(s-r)*(t/365)}}),!e){let t=calculateS2F(o,calculateTotalSupply(o));e=t?calculateModelPrice(t):null}i.push({date:new Date(o),modelPrice:e}),o.setDate(o.getDate()+1)}return i})(b,S,[...t,...a],y),drawHalvingLines=e=>{e.strokeStyle="rgba(255, 255, 255, 0.5)",e.lineWidth=.5,y.forEach((t,a)=>{let l=50+w.indexOf(t.toISOString().split("T")[0])*(c-50-60)/(w.length-1);e.beginPath(),e.moveTo(l,20),e.lineTo(l,d-30),e.stroke();let i="Halving ".concat(t.getFullYear());e.save(),e.translate(l-5,d-30-70),e.rotate(-Math.PI/2),e.textAlign="right",e.font="10px Oxanium, Helvetica, Verdana, Tahoma, sans-serif",e.fillStyle="white",e.fillText(i,0,0),e.restore()})},drawAxes=e=>{let t=(Math.log10(f)-Math.log10(p))/5;e.fillStyle="lightgrey",e.textAlign="right",e.font="10px Oxanium, Helvetica, Verdana, Tahoma, sans-serif",e.textBaseline="middle";for(let a=0;a<=5;a++){let l=Math.pow(10,Math.log10(p)+a*t),i=d-30-(Math.log10(l)-Math.log10(p))*x;e.fillText("".concat(formatAxisLabel(l)),40,i),e.strokeStyle="rgba(255, 255, 255, 0.7)",e.lineWidth=.1,e.beginPath(),e.moveTo(50,i),e.lineTo(c-60,i),e.stroke()}e.fillStyle="lightgrey",e.textAlign="center",e.textBaseline="middle",e.font="10px Oxanium, Helvetica, Verdana, Tahoma, sans-serif";let a=new Date(w[0]).getFullYear(),l=new Date(w[w.length-1]).getFullYear(),i=window.innerWidth,o=i<550?4:2;for(let t=a;t<=l;t+=o){let a=new Date(t,0,1).toISOString().split("T")[0],l=50+w.indexOf(a)*(c-50-60)/(w.length-1);l>50&&l<c-60&&e.fillText(t.toString(),l,d-30+20)}},drawPalette=e=>{let t=d-20-30,a=c-60+10,l=e.createLinearGradient(a,20,a,d-30);l.addColorStop(0,"#FF0000"),l.addColorStop(.14,"#fa8231"),l.addColorStop(.28,"#f9ca24"),l.addColorStop(.42,"#26de81"),l.addColorStop(.57,"#45aaf2"),l.addColorStop(.71,"#0652DD"),l.addColorStop(.85,"#112885"),l.addColorStop(1,"#333361"),e.fillStyle=l,e.fillRect(a,20,20,t),e.fillStyle="white",e.textAlign="left",e.font="10px Oxanium, Helvetica, Verdana, Tahoma, sans-serif",e.textBaseline="middle";let i=[{value:0,color:"#333361"},{value:200,color:"#112885"},{value:400,color:"#0652DD"},{value:600,color:"#45aaf2"},{value:800,color:"#26de81"},{value:1e3,color:"#f9ca24"},{value:1200,color:"#fa8231"},{value:1400,color:"#FF0000"}];i.reverse().forEach((l,o)=>{let n=20+t/(i.length-1)*o;e.fillText(l.value.toString(),a+20+5,n)}),e.save(),e.translate(a-15,(d-30+20)/2),e.rotate(-Math.PI/2),e.textAlign="center",e.fillText("Days until next halving",0,0),e.restore()};(t=>{t.clearRect(0,0,c,d),t.fillStyle="#171a1e",t.fillRect(0,0,c,d),e.forEach(e=>{let a=new Date(e.timestamp).toISOString().split("T")[0],l=50+w.indexOf(a)*(c-50-60)/(w.length-1),i=d-30-(Math.log10(e.close)-Math.log10(p))*x,o=getDaysUntilHalving(e.timestamp),n=getColorForDaysUntilHalving(o);t.fillStyle=n,t.beginPath(),t.arc(l,i,2,0,2*Math.PI),t.fill()});let a=((e,t)=>{let a=[],l=calculateS2F(e,calculateTotalSupply(e)),i=calculateModelPrice(l);return a.push({date:e,modelPrice:i}),t.forEach(e=>{let t=new Date(e),l=new Date(t);l.setFullYear(t.getFullYear()+1);let i=calculateS2F(t,calculateTotalSupply(t)),o=calculateS2F(l,calculateTotalSupply(l)),n=calculateModelPrice(i),r=calculateModelPrice(o);a.push({date:t,modelPrice:n}),a.push({date:l,modelPrice:r})}),a})(b,y);t.strokeStyle="#dfe6e9",t.lineWidth=2,t.beginPath(),a.forEach((e,a)=>{let l=50+w.indexOf(e.date.toISOString().split("T")[0])*(c-50-60)/(w.length-1),i=d-30-(Math.log10(e.modelPrice)-Math.log10(p))*x;0===a?t.moveTo(l,i):t.lineTo(l,i)}),t.stroke(),drawHalvingLines(t),drawAxes(t),drawPalette(t)})(n);let T=new Image;T.src="/assets/images/mainLogoLetters.png",T.onload=()=>{i.globalAlpha=.75,n.drawImage(T,50,30,101.4,30.2),i.globalAlpha=1,i.clearRect(0,0,c,d),i.drawImage(o,0,0,c,d)};let D=document.getElementById("cumulative-tooltip"),handleMouseMove=t=>{var a;let n=l.getBoundingClientRect(),s=t.clientX-n.left,m=t.clientY-n.top,h=c-60+10,u=s<50,g=s>c-60,x=m>d-30;if(u||g||x||s>=h&&s<=h+20&&m>=20&&m<=d-30){D.style.display="none",i.clearRect(0,0,c,d),i.drawImage(o,0,0,c,d);return}let v=Math.round((s-50)*(w.length-1)/(c-50-60));if(v<0||v>=w.length)return;let b=w[v],S=e.find(e=>new Date(e.timestamp).toISOString().split("T")[0]===b),T=j.find(e=>new Date(e.date).toISOString().split("T")[0]===b);D.style.display="block",D.style.left="".concat(s+10,"px"),D.style.top="".concat(m+10,"px"),s+50+D.offsetWidth>c?D.style.left="".concat(s-D.offsetWidth-120,"px"):D.style.left="".concat(s+30,"px"),m+10+D.offsetHeight>d?D.style.top="".concat(m-D.offsetHeight-10,"px"):D.style.top="".concat(m+10,"px");let M=S?"$".concat(S.close.toFixed(2)):"N/A",k=T?"$".concat(null===(a=T.modelPrice)||void 0===a?void 0:a.toFixed(2)):"N/A";D.innerHTML="\n Date: ".concat(new Date(b).toLocaleDateString("en-GB"),"<br>\n ").concat(S?'\n <span style="display: flex; align-items: center;">\n <img src="'.concat(r.Y.btcLogo,'" class="w-2" alt="Bitcoin logo" style="width: 16px; vertical-align: middle; margin-right: 4px;" /> \n BTC Price: ').concat(M,"\n </span>\n "):"","\n S2F Model Price: ").concat(k,"<br>\n Days Since Halving: ").concat((()=>{let e=new Date(b),t=y.reduce((t,a)=>{let l=new Date(a);return l<=e&&l>t?l:t},new Date("1970-01-01")),a=e.getTime()-t.getTime();return(a/864e5).toFixed(0)})(),"\n "),i.clearRect(0,0,c,d),i.drawImage(o,0,0,c,d),i.strokeStyle="rgba(255, 255, 255, 0.5)",i.lineWidth=.7,i.setLineDash([5,5]),i.beginPath(),i.moveTo(s,0),i.lineTo(s,d),i.moveTo(0,m),i.lineTo(c,m),i.stroke(),i.setLineDash([]);let F=Math.log10(p),C=Math.log10(f),I=Math.pow(10,F+(d-m-30)/(d-20-30)*(C-F));i.fillStyle="rgba(63, 63, 70, 1)",i.fillRect(-20,m-10,70,20),i.fillStyle="white",i.font="10px Oxanium, Helvetica, Verdana, Tahoma, sans-serif",i.textAlign="right",i.fillText(formatTooltipValue(I),47,m+2.5),i.fillStyle="rgba(63, 63, 70, 1)",i.fillRect(s-35,d-30+10,70,30),i.fillStyle="white",i.textAlign="center",i.fillText(new Date(b).toLocaleDateString("en-GB"),s,d-30+23)};return l.addEventListener("mousemove",handleMouseMove),l.addEventListener("mouseout",()=>{D.style.display="none",i.clearRect(0,0,c,d),i.drawImage(o,0,0,c,d)}),()=>{l.removeEventListener("mousemove",handleMouseMove)}},drawExtraContent=(e,t,a)=>{let l,i,o,n;let r=window.innerWidth;r>640?(l=28,i=14,o=75,n=35):(l=18,i=12,o=47,n=20),e.font="".concat(i,"px Oxanium"),e.fillStyle="#e4e4e7";let s="Created at TradingDigits.io",c=e.measureText(s).width;e.fillText(s,(t-c)/2,n),e.font="".concat(l,"px Oxanium");let d="".concat(a,", ").concat(new Date().toLocaleDateString()),m=e.measureText(d).width;e.fillText(d,(t-m)/2,o)},downloadChart=(e,t)=>{let a=e.current;a.getContext("2d");let l=document.createElement("canvas"),i=a.width+40,o=a.height+20+40+100;l.width=i,l.height=o;let n=l.getContext("2d");n.fillStyle="#171a1e",n.fillRect(0,0,l.width,l.height),drawExtraContent(n,l.width,t),n.drawImage(a,20,100);let r=document.createElement("a");r.download="".concat(t.replace(/\s+/g,"_").toLowerCase(),".png"),r.href=l.toDataURL("image/png"),r.click()},copyChartToClipboard=async(e,t)=>{let a=e.current;a.getContext("2d");let l=document.createElement("canvas"),i=a.width+40,o=a.height+20+40+100;l.width=i,l.height=o;let n=l.getContext("2d");n.fillStyle="#171a1e",n.fillRect(0,0,l.width,l.height),drawExtraContent(n,l.width,t),n.drawImage(a,20,100),l.toBlob(async e=>{try{let t=new ClipboardItem({"image/png":e});await navigator.clipboard.write([t]),w(!0),setTimeout(()=>w(!1),1e3)}catch(e){console.error("Failed to copy chart: ",e)}})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(o(),{children:[(0,l.jsx)("title",{children:"Bitcoin Stock-to-Flow Model: Real-Time S2F Chart"}),(0,l.jsx)("meta",{name:"description",content:"This Stock to Flow model chart, inspired by Plan B, is used to spot macro tops in every Bitcoin cycle by calculating its historical scarcity"}),(0,l.jsx)("meta",{name:"keywords",content:"bitcoin, stock, to, flow, model, s2f, chart, ratio, planb, crypto"}),(0,l.jsx)("meta",{property:"og:title",content:"Bitcoin Stock-to-Flow Model: Real-Time S2F Chart"}),(0,l.jsx)("meta",{property:"og:description",content:"This Stock to Flow model chart, inspired by Plan B, is used to spot maco tops in every Bitcoin cycle by calculating its historical scarcity"}),(0,l.jsx)("meta",{property:"og:image",content:"https://www.tradingdigits.io/assets/images/ogImage.jpg"}),(0,l.jsx)("meta",{property:"og:url",content:"https://www.tradingdigits.io/bitcoin-s2f-model"}),(0,l.jsx)("meta",{name:"twitter:title",content:"Bitcoin Stock-to-Flow Model: Real-Time S2F Chart"}),(0,l.jsx)("meta",{name:"twitter:description",content:"This Stock to Flow model chart, inspired by Plan B, is used to spot maco tops in every Bitcoin cycle by calculating its historical scarcity"}),(0,l.jsx)("meta",{name:"twitter:image",content:"https://www.tradingdigits.io/assets/images/ogImage.jpg"}),(0,l.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,l.jsx)("meta",{name:"twitter:image:alt",content:"Promotional image with crypto-related illustration on black background, company name, and catchphrase about Trading Digits"}),(0,l.jsx)("meta",{name:"twitter:site",content:"@trading_digits"}),(0,l.jsx)("link",{rel:"canonical",href:"https://www.tradingdigits.io/bitcoin-s2f-model"}),(0,l.jsx)("link",{rel:"preconnect",href:"https://fonts.googleapis.com"}),(0,l.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Oxanium:wght@300;400;500;600;700&display=swap",rel:"stylesheet"})]})}),{}),(0,l.jsx)("div",{className:"mt-10 md:mt-[95px] sm:mt-[90px] mt-[80px]",children:(0,l.jsxs)("div",{className:"pb-3 pt-1 sm:pt-1 ".concat(e?"h-screen":"h-full"," 2.5xl:h-full 3xl:h-screen min-[1540px]:pb-[100px]"),children:[(0,l.jsx)("div",{className:"flex items-center justify-between text-center ",children:(0,l.jsxs)("div",{className:"flex items-center text-center ".concat(a?"":"w-full justify-center"),children:[(0,l.jsx)("h1",{className:"pl-2 sm:text-2xl text-xl font-[Oxanium-Regular] my-1.75",children:"BITCOIN STOCK-TO-FLOW (S2F) MODEL"}),(0,l.jsx)(c.M,{children:!a&&(0,l.jsx)(d.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"ml-3",children:(0,l.jsx)("i",{onClick:toggleInfo,className:"fa-solid fa-circle-info fa-lg text-zinc-200 cursor-pointer hover:text-amber-400 transition duration-300"})})})]})}),(0,l.jsx)(c.M,{children:a&&(0,l.jsxs)(d.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.5},className:"relative px-2 py-2 flex items-center mr-0 mb-8 bg-[#363738] justify-center w-full",children:[(0,l.jsx)("i",{className:"fa-solid fa-circle-info fa-2xl mr-3 text-zinc-200"}),(0,l.jsx)("div",{className:"font-[Oxanium-Regular] sm:text-sm text-xs pr-4",children:(0,l.jsxs)("p",{children:["Stock-to-Flow model—which was created by ",(0,l.jsx)("a",{href:"https://x.com/100trillionUSD",target:"_blank",rel:"noreferrer",className:"text-zinc-200 underline hover:text-zinc-50 hover:transition-all duration-150 font-semibold",children:"Plan B"}),"—treats Bitcoin like gold and silver, retaining its value due to its limited supply and the significant effort required to mine the remaining coins. This model calculates scarcity by comparing current stock to annual production, which is reduced every four years upon a halving event, increasing Bitcoin's scarcity and driving up prices."]})}),(0,l.jsx)("div",{onClick:toggleInfo,className:"absolute top-0 right-0 flex items-start hover:bg-zinc-500 cursor-pointer py-0.5 px-1 transition duration-300",children:(0,l.jsx)("i",{className:"fa-solid fa-xmark"})})]})}),e?(0,l.jsx)("div",{className:"flex w-full items-center justify-center mt-32",children:(0,l.jsx)("img",{src:r.Y.logoLoading,className:"quick-pulse w-48 ",alt:"Loading..."})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"w-full flex items-center justify-between gap-3 text-center sm:text-sm text-xs bg-zinc-800 border-1 border-y border-zinc-700",children:[(0,l.jsxs)("div",{className:"flex gap-3 pl-16 sm:text-presm text-prexs font-[Oxanium-Light]",children:[(0,l.jsx)("div",{className:"flex flex-col justify-center items-center",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsxs)("div",{className:"flex items-center mr-1.5",children:[(0,l.jsx)("div",{className:"w-1 h-1 bg-[#ff7f00] rounded-full"}),(0,l.jsx)("div",{className:"w-1 h-1 bg-[#ffd700] mb-1 rounded-full"}),(0,l.jsx)("div",{className:"w-1 h-1 bg-[#f4f500] mb-1.25 rounded-full"}),(0,l.jsx)("div",{className:"w-1 h-1 bg-[#add13f] mb-1 rounded-full"}),(0,l.jsx)("div",{className:"w-1 h-1 bg-[#75d761] mb-2 rounded-full"})]}),(0,l.jsx)("div",{children:"BTC Price"})]})}),(0,l.jsx)("div",{className:"flex flex-col justify-center items-center",children:(0,l.jsxs)("div",{className:"flex justify-center items-center",children:[(0,l.jsx)("div",{className:"w-2.5 h-2.5 bg-[#dfe6e9] mr-1.5 mb-0.75"}),(0,l.jsx)("div",{children:"S2F Model Price"})]})})]}),(0,l.jsxs)("div",{className:"flex pl-[3px] pr-[3px] border-l border-zinc-700",children:[(0,l.jsx)("button",{className:"px-2 py-2 hover:rounded-sm bg-zinc-800 hover:bg-zinc-700 transition duration-300 flex items-center justify-center ".concat(x?"animate-flip":""),onClick:()=>copyChartToClipboard(v,"Bitcoin Stock-to-Flow Model Chart"),children:(0,l.jsx)(h.esY,{className:"text-zinc-300 text-base"})}),(0,l.jsx)("button",{className:"px-2 py-2 hover:rounded-sm bg-zinc-800 hover:bg-zinc-700 transition duration-300 flex items-center justify-center",onClick:()=>downloadChart(v,"Bitcoin Stock-to-Flow Model Chart"),children:(0,l.jsx)(h.aBF,{className:"text-zinc-300 text-base"})})]})]}),(0,l.jsxs)("div",{className:"h-[500px] sm:w-full w-full relative flex flex-col mb-12 bg-[#171a1e] px-5 border-1 border-b border-zinc-700",children:[(0,l.jsx)("div",{className:"w-full flex max-[1080px]:flex-col flex-row justify-between max-[1080px]:items-center max-[1080px]:gap-3"}),(0,l.jsx)("div",{className:"h-full",children:(0,l.jsx)("canvas",{ref:v,className:""})}),(0,l.jsx)("div",{id:"cumulative-tooltip",style:{position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.7)",color:"white",padding:"5px",borderRadius:"5px",pointerEvents:"none",display:"none"}})]}),(0,l.jsxs)("div",{className:"mb-12 text-zinc-200",children:[(0,l.jsx)("h2",{className:"text-center sm:text-2xl text-xl mb-4 font-semibold px-4",children:"Stock to Flow Model by Plan B Explained: What is S2F Model and How to Read the Chart?"}),(0,l.jsxs)("div",{className:"px-4 sm:text-sm text-presm sm:text-start text-center",children:[(0,l.jsx)("div",{className:"font-semibold text-xl mb-4",children:"Indicator Overview"}),"This model views Bitcoin similarly to commodities like gold, silver, or platinum, known as 'store of value' commodities due to their ability to retain value over long periods because of their scarcity. Increasing the supply of these commodities is difficult, as mining is expensive and time-consuming. Bitcoin shares this characteristic as it is scarce and is the first-ever digital object with limited supply. Mining the remaining 3 million coins requires substantial electricity and computing power, ensuring a consistently low supply rate. Stock-to-flow ratios measure the current stock of a commodity (total available amount) against its new production flow (amount mined annually). ",(0,l.jsx)("br",{})," ",(0,l.jsx)("br",{}),"For store of value commodities like gold, platinum, or silver, a high stock-to-flow ratio indicates limited industrial consumption, with the majority stored as a monetary hedge, driving up the ratio. A higher stock-to-flow ratio signifies increased scarcity, enhancing the commodity's value as a store of value. ",(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"font-semibold text-xl my-4",children:"How To View The Chart"}),"The chart above overlays Bitcoin's price on its stock-to-flow ratio line, showing that Bitcoin's price has historically followed its stock-to-flow. This suggests that by observing the projected stock-to-flow line, derived from the known future Bitcoin mining schedule, we can estimate future price movements. ",(0,l.jsx)("br",{})," ",(0,l.jsx)("br",{}),"The colored dots on the price line indicate the number of days until the next Bitcoin halving event. During a halving, the reward for mining new blocks is cut in half, reducing miners' rewards by 50%. These halvings occur every 210,000 blocks, roughly every four years, until the maximum supply of 21 million bitcoins is reached. Halvings increase the stock-to-flow ratio (scarcity), which theoretically drives up the price, as seen in Bitcoin's past. ",(0,l.jsx)("br",{})," ",(0,l.jsx)("br",{}),"The stock-to-flow line on the chart includes a 365-day average to smooth out market fluctuations caused by halving events."]})]})]})]})})]})}BitcoinS2FModel.layout=s.Z}},function(e){e.O(0,[8391,4738,4817,2510,4396,5372,8688,5912,9774,2888,179],function(){return e(e.s=9942)}),_N_E=e.O()}]);