{"id":6081,"date":"2023-11-08T14:10:53","date_gmt":"2023-11-08T13:10:53","guid":{"rendered":"https:\/\/wise-pool.eu\/?page_id=6081"},"modified":"2023-11-13T15:42:12","modified_gmt":"2023-11-13T14:42:12","slug":"coinecta-fiso","status":"publish","type":"page","link":"https:\/\/wise-pool.eu\/index.php\/coinecta-fiso\/","title":{"rendered":"Coinecta FISO"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"6081\" class=\"elementor elementor-6081\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3340b1a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3340b1a\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-dd3b030\" data-id=\"dd3b030\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6b966ec elementor-widget elementor-widget-html\" data-id=\"6b966ec\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t  <title>CNCT Rewards Calculator<\/title>\n  <style>\n   \n\n    h2 {\n      color: #333;\n    }\n\n    label {\n      display: block;\n      margin: 10px 0;\n    }\n\n    input {\n      width: 200px;\n      padding: 8px;\n      margin: 5px;\n      box-sizing: border-box;\n    }\n\n    button {\n      background-color: #4CAF50;\n      color: white;\n      padding: 10px 20px;\n      border: none;\n      border-radius: 5px;\n      cursor: pointer;\n    }\n\n    button:hover {\n      background-color: #45a049;\n    }\n\n    h3 {\n      margin-top: 20px;\n      color: #333;\n    }\n\n    p {\n      color: #555;\n      font-size: 18px;\n    }\n\n    .disclaimer {\n      color: #888;\n      margin-top: 30px;\n    }\n\n    .disclaimer a {\n      color: #007BFF;\n      text-decoration: none;\n    }\n\n    .disclaimer a:hover {\n      text-decoration: underline;\n    }\n  <\/style>\n\n\n  <h2>CNCT Rewards Calculator<\/h2>\n\n  <label for=\"userStake\">User's ADA Stake:<\/label>\n  <input type=\"number\" id=\"userStake\" placeholder=\"Enter ADA stake\" step=\"1\">\n\n  <label for=\"stakePool\">Select a Stake Pool:<\/label>\n  <select id=\"stakePool\" onchange=\"fillDetailData()\"><\/select>\n\n  <label for=\"totalStake\">Total ADA Stake in Pool:<\/label>\n  <input type=\"number\" id=\"totalStake\" disabled step=\"1\">\n\n  <label for=\"activePools\">Number of Active Pools:<\/label>\n  <input type=\"number\" id=\"activePools\" disabled step=\"1\">\n\n  <br>\n\n  <button onclick=\"calculateCNCT()\">Calculate CNCT Rewards<\/button>\n\n  <h3>Results:<\/h3>\n  <p id=\"result\"><\/p>\n\n  <div class=\"disclaimer\">\n    <p>Disclaimer: This calculator provides an estimation based on the given formula. Actual rewards may vary, and users are encouraged to verify calculations using <a href=\"https:\/\/coinecta.medium.com\/coinecta-fiso-details-faq-bd3b5a03991c\" target=\"_blank\">official sources<\/a>. For more information and to track your rewards, visit the <a href=\"https:\/\/coinecta.fi\/projects\/coinecta?tab=fiso\" target=\"_blank\">Coinecta FISO dashboard<\/a>.<\/p>\n  <\/div>\n\n  <script>\n    var successfulStakePools;\n    async function calculateCNCT() {\n\n      const userStake = parseFloat(document.getElementById(\"userStake\").value);\n      const totalStake = parseFloat(document.getElementById(\"totalStake\").value);\n      const activePools = parseFloat(document.getElementById(\"activePools\").value);\n      const totalTokens = 1600000; \/\/ Total tokens for the FISO\n      const totalEpochs = 15; \/\/ Total epochs this FISO\n\n      const tokensPerPool = totalTokens \/ totalEpochs \/ activePools;\n      const cnctEarned = (userStake \/ totalStake) * tokensPerPool;\n\n      document.getElementById(\"result\").innerHTML = `CNCT tokens earned per total $ADA staked per epoch: ${cnctEarned.toFixed(4)}`;\n    }\n\n    async function fillData() {\n      const apiEndpoint = 'https:\/\/prod-202.westeurope.logic.azure.com:443\/workflows\/75ef8331df7a40c4a061e7ff4733251c\/triggers\/When_a_HTTP_request_is_received\/paths\/invoke?api-version=2016-10-01&sp=%2Ftriggers%2FWhen_a_HTTP_request_is_received%2Frun&sv=1.0&sig=91_EsUHM286XNx2OOz-iVYacruYj5O1gU4Q8zy0UqZg';\n      var activePools2;\n      try {\n      \/\/ Fetch active pools count\n      const response = await fetch(apiEndpoint, {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\/json', \n  }\n});\n      const activePoolsData = await response.json();\n      successfulStakePools = activePoolsData[0].result.data.json.successfulStakePools;\n      activePools2 = successfulStakePools.length;\n      console.log(activePools2);\n      document.getElementById(\"activePools\").value = activePools2;\n\n      \/\/ Populate the dropdown with stake pool options\n      const stakePoolDropdown = document.getElementById(\"stakePool\");\n\n      const optionDef = document.createElement(\"option\");\n      optionDef.value = -1;\n      optionDef.text = \"Select a pool\";\n        stakePoolDropdown.appendChild(optionDef);\n      successfulStakePools.forEach(pool => {\n        const option = document.createElement(\"option\");\n        option.value = pool.id;\n        option.text = '['+pool.ticker+'] '+pool.name;\n        stakePoolDropdown.appendChild(option);\n      });\n\n    } catch (error) {\n      console.error('Error fetching active pools count:', error);\n      document.getElementById(\"result\").innerHTML = 'Error data fill. Please try again later.';\n    }\n      \n    }\n    async function fillDetailData() {\n      \n      \/\/ Retrieve the selected stake pool from the dropdown\n      const selectedPool = document.getElementById(\"stakePool\");\n      const selectedPoolId = selectedPool.options[selectedPool.selectedIndex].value;\n      \n     \/\/ Find the selected pool in the array\n     const selectedPoolData = successfulStakePools.find(pool => pool.id === parseInt(selectedPoolId));\n\n      \/\/ If the pool is found, update the totalStake input field\n      if (selectedPoolData) {\n        const liveStake = selectedPoolData.stats.live_stake \/ 1000000; \/\/ Divide by 1000000\n        document.getElementById(\"totalStake\").value = liveStake.toFixed(2);\n      } else {\n        console.error('Selected pool not found');\n        document.getElementById(\"totalStake\").value = '';\n      }\n    }\n    window.onload = fillData();\n  <\/script>\n\n<\/body>\n<\/html>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>CNCT Rewards Calculator CNCT Rewards Calculator User&#8217;s ADA Stake: Select a Stake Pool: Total ADA Stake in Pool: Number of Active Pools: Calculate CNCT Rewards Results: Disclaimer: This calculator provides an estimation based on the given formula. Actual rewards may vary, and users are encouraged to verify calculations using official sources. For more information and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6081","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/pages\/6081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/comments?post=6081"}],"version-history":[{"count":22,"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/pages\/6081\/revisions"}],"predecessor-version":[{"id":6104,"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/pages\/6081\/revisions\/6104"}],"wp:attachment":[{"href":"https:\/\/wise-pool.eu\/index.php\/wp-json\/wp\/v2\/media?parent=6081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}