Closed baonguyen1904 closed 3 months ago
now = datetime.now
last_24h = now - 24h
previous tvl = sum of VaultPerformanceBase.total_locked_value
for each vault where datetime <= last_24h order by datetime desc
current tvl = sum of latest VaultPerformanceBase.total_locked_value
order by datetime desc
tvl change = current tvl - previous tvl yield 24h = tvl change - total deposit (in last 24h)
https://docs.google.com/spreadsheets/d/133zuSxHsNNvxzCF8aYe273pHSDNyZnd1xpfr1rrjCi4/edit?gid=0#gid=0