I'll answer myself for now ... from the curent virtual supply showing from the API endpoints it seem not .... I dont even know what is the base supply now for calculating the inflation ... is there an api for that?.... sorry but if we still continue to calculate the virtual supply and the hive market cap with HBD in tressury, while we use another number as a base for the inflation it looks like a lot of makeup on the debt level...

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hive Global Chain Data</title>
<style>
/* Basic styling for presentation */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 40px;
background-color: #f4f7f6;
color: #333;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: #fff;
padding: 25px;
border-radius: 10px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
h2 {
color: #e31337; /* Hive's main color */
border-bottom: 3px solid #e31337;
padding-bottom: 10px;
margin-bottom: 20px;
text-align: center;
}
.data-item {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px dashed #eee;
}
.data-item:last-child {
border-bottom: none;
}
.data-label {
font-weight: bold;
color: #555;
}
.data-value {
color: #1a73e8; /* A clear blue for visibility */
font-family: Consolas, monospace;
font-size: 1.1em;
}
.loading {
text-align: center;
padding: 30px;
color: #999;
}
</style>
</head>
<body>
<div class="container">
<h2>🐝 Live Hive Global Properties</h2>
<div id="hive-data-container">
<div class="loading">Loading blockchain data...</div>
</div>
</div>
<script>
const API_URL = 'https://api.hive.blog'; // Reliable public Hive Node
// Function to format the raw supply string (e.g., "1000000.000 HIVE")
const formatSupply = (supplyString) => {
const parts = supplyString.split(' ');
const numberPart = parseFloat(parts[0]);
const unit = parts[1];
// Format number with commas for readability
const formattedNumber = numberPart.toLocaleString('en-US', { maximumFractionDigits: 3 });
return `${formattedNumber} ${unit}`;
};
async function getHiveGlobalData() {
const container = document.getElementById('hive-data-container');
try {
// 1. Fetch the data using the JSON-RPC POST request
const response = await fetch(API_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
jsonrpc: '2.0',
method: 'condenser_api.get_dynamic_global_properties',
params: [],
id: 1
})
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const props = data.result;
if (props) {
// 2. Build the HTML content dynamically
let htmlContent = `
<div class="data-item">
<span class="data-label">Current HIVE Supply:</span>
<span class="data-value">${formatSupply(props.current_supply)}</span>
</div>
<div class="data-item">
<span class="data-label">Current HBD Supply:</span>
<span class="data-value">${formatSupply(props.current_hbd_supply)}</span>
</div>
<div class="data-item">
<span class="data-label">Virtual Supply (HIVE Equivalent):</span>
<span class="data-value">${formatSupply(props.virtual_supply)}</span>
</div>
<div class="data-item">
<span class="data-label">Total VESTS (Staked Shares):</span>
<span class="data-value">${formatSupply(props.total_vesting_shares)}</span>
</div>
<div class="data-item">
<span class="data-label">Total VESTING HIVE (Staked Fund):</span>
<span class="data-value">${formatSupply(props.total_vesting_fund_hive)}</span>
</div>
`;
// 3. Update the HTML container
container.innerHTML = htmlContent;
} else {
console.error('API response did not contain results:', data);
container.innerHTML = '<div class="loading">Error: Invalid API response structure.</div>';
}
} catch (error) {
console.error('Fetch error:', error);
container.innerHTML = `<div class="loading">❌ Error fetching data: ${error.message}. Please check the console.</div>`;
}
}
// Execute the function when the page loads
getHiveGlobalData();
</script>
</body>
</html>
If you're looking to calculate the debt ratio you should definitely remove HBD from the DHF. If you want to look at the actual calculations look at this function: https://gitlab.syncad.com/hive/hive/-/blob/master/libraries/chain/database.cpp?ref_type=heads#L4869