Time-Bucketed Balance Records: Bounded-Storage Ephemeral Tokens for Resource-Constrained Systems
By: Shaun Scovil, Bhargav Chickmagalur Nanjundappa
Fungible tokens with time-to-live (TTL) semantics require tracking individual expiration times for each deposited unit. A naive implementation creates a new balance record per deposit, leading to unbounded storage growth and vulnerability to denial-of-service attacks. We present time-bucketed balance records, a data structure that bounds storage to O(k) records per account while guaranteeing that tokens never expire before their configured TTL. Our approach discretizes time into k buckets, coalescing deposits within the same bucket to limit unique expiration timestamps. We prove three key properties: (1) storage is bounded by k+1 records regardless of deposit frequency, (2) actual expiration time is always at least the configured TTL, and (3) adversaries cannot increase a victim's operation cost beyond O(k)[amortized] worst case. We provide a reference implementation in Solidity with measured gas costs demonstrating practical efficiency.
Similar Papers
The Treasury Proof Ledger: A Cryptographic Framework for Accountable Bitcoin Treasuries
Cryptography and Security
Lets companies prove they own Bitcoin safely.
Cache What Lasts: Token Retention for Memory-Bounded KV Cache in LLMs
Machine Learning (CS)
Keeps important computer memories for faster AI.
Homomorphic Encryption-based Vaults for Anonymous Balances on VM-enabled Blockchains
Cryptography and Security
Keeps your money secret on the internet.