global: snapshot

This commit is contained in:
nym21
2026-03-16 18:38:16 +01:00
parent ae067739ce
commit 5848d25612
55 changed files with 1366 additions and 1384 deletions

View File

@@ -69,12 +69,12 @@ impl Vecs {
.compute_binary::<Dollars, Dollars, RatioDollarsBp32>(
starting_indexes.height,
market_cap,
&transactions.volume.sent_sum.sum._24h.usd.height,
&transactions.volume.transfer_volume.sum._24h.usd.height,
exit,
)?;
// Thermocap Multiple: market_cap / thermo_cap
self.thermocap_multiple
self.thermo_cap_multiple
.bps
.compute_binary::<Dollars, Dollars, RatioDollarsBp32>(
starting_indexes.height,
@@ -178,7 +178,7 @@ impl Vecs {
)?;
// Seller Exhaustion Constant: % supply_in_profit × 30d_volatility
self.seller_exhaustion_constant
self.seller_exhaustion
.height
.compute_transform3(
starting_indexes.height,

View File

@@ -24,8 +24,8 @@ impl Vecs {
let nvt = RatioPerBlock::forced_import_raw(&db, "nvt", v, indexes)?;
let gini = PercentPerBlock::forced_import(&db, "gini", v, indexes)?;
let rhodl_ratio = RatioPerBlock::forced_import_raw(&db, "rhodl_ratio", v, indexes)?;
let thermocap_multiple =
RatioPerBlock::forced_import_raw(&db, "thermocap_multiple", v, indexes)?;
let thermo_cap_multiple =
RatioPerBlock::forced_import_raw(&db, "thermo_cap_multiple", v, indexes)?;
let coindays_destroyed_supply_adjusted =
PerBlock::forced_import(&db, "coindays_destroyed_supply_adjusted", v, indexes)?;
let coinyears_destroyed_supply_adjusted =
@@ -35,8 +35,8 @@ impl Vecs {
flow: PerBlock::forced_import(&db, "dormancy_flow", v, indexes)?,
};
let stock_to_flow = PerBlock::forced_import(&db, "stock_to_flow", v, indexes)?;
let seller_exhaustion_constant =
PerBlock::forced_import(&db, "seller_exhaustion_constant", v, indexes)?;
let seller_exhaustion =
PerBlock::forced_import(&db, "seller_exhaustion", v, indexes)?;
let this = Self {
db,
@@ -44,12 +44,12 @@ impl Vecs {
nvt,
gini,
rhodl_ratio,
thermocap_multiple,
thermo_cap_multiple,
coindays_destroyed_supply_adjusted,
coinyears_destroyed_supply_adjusted,
dormancy,
stock_to_flow,
seller_exhaustion_constant,
seller_exhaustion,
};
finalize_db(&this.db, &this)?;
Ok(this)

View File

@@ -18,10 +18,10 @@ pub struct Vecs<M: StorageMode = Rw> {
pub nvt: RatioPerBlock<BasisPoints32, M>,
pub gini: PercentPerBlock<BasisPoints16, M>,
pub rhodl_ratio: RatioPerBlock<BasisPoints32, M>,
pub thermocap_multiple: RatioPerBlock<BasisPoints32, M>,
pub thermo_cap_multiple: RatioPerBlock<BasisPoints32, M>,
pub coindays_destroyed_supply_adjusted: PerBlock<StoredF32, M>,
pub coinyears_destroyed_supply_adjusted: PerBlock<StoredF32, M>,
pub dormancy: DormancyVecs<M>,
pub stock_to_flow: PerBlock<StoredF32, M>,
pub seller_exhaustion_constant: PerBlock<StoredF32, M>,
pub seller_exhaustion: PerBlock<StoredF32, M>,
}