Shader
The hourly burn

DocsConcepts11 of 35 · 1 min read

The hourly burn

How the SHDR behind used credits is queued at each settlement and burned every hour.

Credits bought with SHDR keep the SHDR behind them in escrow, and they are spent before USDC-backed credits. When a settlement spends SHDR-backed credits, it moves the SHDR tied to them into a burn queue in the program's Config. Every hour a crank, a scheduled job Shader's backend runs, calls burn_used, which burns the whole queue from escrow.

#How much is queued

Each Receipt records it in shdr_atoms. A charge that takes part of a wallet's SHDR-backed credits queues the same share of its escrowed SHDR; the charge that takes the last of them queues all that is left. Nothing else ever leaves the escrow except to the burn.

#What shows

burn_used emits ShdrBurned with the amount and the running total, and Earn shows how much has been burned in total and in the last hour. The burn waits until the SHDR mint exists. The SHDR token says where SHDR comes from.