From b3e9f49a2dea52ef4170f92c310c89b9eda63280 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sun, 4 Jun 2023 15:27:46 +0530 Subject: [PATCH] Added more definitions and formulas for the Economic System --- index.html | 234 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 196 insertions(+), 38 deletions(-) diff --git a/index.html b/index.html index 68f832a..d1e9cbf 100644 --- a/index.html +++ b/index.html @@ -271,6 +271,148 @@
+

Formulas

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Production Valuation +

+

+ Add up all expenses +

+

+ Production valuation is the sum of all the expenses incurred to operate the system. When tokens are sold the valuation should be atleast equal to cost of operating the system. +

+
+
+

+ Consumption Valuation +

+

+ Number of room nights consumed * Consumption valuation per night +

+

+ Consumption valuation is the result of valuation the system is building on account of the basic good or service being offered for consumption. This represents the gains and earnings from the operation of system. +

+
+
+

+ Ownership token +

+

+ Ownership tokens own the profits of the system +

+
+
+

+ Market valuation +

+

+ Market valuation = Number of ownership token * price per ownership token +

+

+ Market valuation is the future consumption valuation +

+
+
+

+ System Valuation +

+

+ System Valuation = Higher of production valuation and consumption valuation +

+
+
+

+ Reserve Pool +

+

+ Reserve Pool = Market valuation - Production valuation +

+

+ Reserve Pool is a Bitcoin Multisig address which acts as the bank account for this system. All payments and expenses related to the system will happen there. +

+
+
+

+ Investments +

+

+ +

+

+ Investments help in providing for the initial production valuation and they add to the reserve pool. +

+
+
+
+ +
+ +
+ +
+ +
@@ -579,46 +730,52 @@ 'Access-Control-Allow-Origin': '*' } }) - .then(response => response.json()) - .then(data => { - const { productionValuation, consumptionNumber, consumptionCost, consumptionValuation, systemValuation } = data - getRef("total-amount-issued").textContent = formatAmount(productionValuation) - getRef("price-per-unit-consumption").textContent = formatAmount(consumptionValuation / consumptionNumber) - getRef("total-consumption-measured").textContent = consumptionNumber - getRef("total-consumption-cost").textContent = formatAmount(consumptionCost) - getRef("consumption-valuation").textContent = formatAmount(consumptionValuation) - getRef("system-valuation").textContent = formatAmount(systemValuation) - getRef("amount-left-production-consumption-catchup").textContent = formatAmount(Math.max(0, (productionValuation - consumptionValuation))) - resolve() - }) - .catch(error => { - console.error('Error:', error) - reject(error) - }) + .then(response => response.json()) + .then(data => { + const { productionValuation, consumptionNumber, consumptionCost, consumptionValuation, systemValuation } = data + getRef("total-amount-issued").textContent = formatAmount(productionValuation) + getRef("price-per-unit-consumption").textContent = formatAmount(consumptionValuation / consumptionNumber) + getRef("total-consumption-measured").textContent = consumptionNumber + getRef("total-consumption-cost").textContent = formatAmount(consumptionCost) + getRef("consumption-valuation").textContent = formatAmount(consumptionValuation) + getRef("system-valuation").textContent = formatAmount(systemValuation) + getRef("amount-left-production-consumption-catchup").textContent = formatAmount(Math.max(0, (productionValuation - consumptionValuation))) + resolve() + }) + .catch(error => { + console.error('Error:', error) + reject(error) + }) + + + btcOperator.getBalance('bc1qh38s56q6vqahqv758dgsrvh92tkrt5drg259zklqectmj44uy5lsg4ppps') + .then((btcAddresBalance) => { + getRef("reserve-tokens-amount").textContent = `${btcAddresBalance} BTC` + }) }) }) - floDapps.launchStartUp().then((result) => { - console.log(result); - //window.location.hash = '#userinfo'; - // getRef('user_flo_id').value = myFloID - // getRef('user_login_popup_button').classList.add('hide') - // getRef('userpage-userfloid').innerText = myFloID - // getRef('user_signout_popup_button').classList.remove('hide') + floDapps.launchStartUp().then((result) => { + console.log(result); + //window.location.hash = '#userinfo'; + // getRef('user_flo_id').value = myFloID + // getRef('user_login_popup_button').classList.add('hide') + // getRef('userpage-userfloid').innerText = myFloID + // getRef('user_signout_popup_button').classList.remove('hide') - // Check if subadmin - if (floGlobals.subAdmins.includes(myFloID)) { - console.log('This is a subadmin') - document.getElementById('subadmin-nav').classList.remove('hide') - } + // Check if subadmin + if (floGlobals.subAdmins.includes(myFloID)) { + console.log('This is a subadmin') + document.getElementById('subadmin-nav').classList.remove('hide') + } - // Show userinfo - //document.getElementById('userinfo-nav').classList.remove('hide') - //document.getElementById('userinfo-nav').click() + // Show userinfo + //document.getElementById('userinfo-nav').classList.remove('hide') + //document.getElementById('userinfo-nav').click() - //App functions.... + //App functions.... - }).catch((error) => console.error(error)); - } + }).catch((error) => console.error(error)); + } @@ -627,6 +784,7 @@ +