pay per request
Deposit ENERGY once and the API spends from it. Usage is settled and burned on-chain every hour, and you can withdraw what you don't need.
Vault stats · live from the chain
// 01 · HOW IT WORKS
From wallet to API call
01
Get ENERGY
Stake STARDUST and claim, or buy with USDG. Both put ENERGY in your wallet.
02
Deposit in the vault
ENERGY in your wallet isn't spendable yet. Only the vault balance pays for API requests.
03
Use the API
Each paid request uses Energy from your vault right away, with any API key you create.
04
Settled every hour
Once an hour the used Energy is charged on-chain and burned, so the vault balance catches up.
// 02 · ON-CHAIN FLOW
Deposit, use, settle
Requests are metered off-chain so they stay fast; the vault contract is the source of truth for what you hold and what was charged.
You
wallet / API key
EnergyVault
your balance
Stardust API
meters usage
ENERGY
token
deposit(amount)after approve
API request
read your vault balancebefore the request
response, Energy used is reserved
charge(batchId, users, amounts)every hour
burn the total used
call payout / reply you smart contract off-chain
You
wallet
EnergyVault
your balance
requestWithdraw(amount)starts the delay
wait withdrawDelaypending usage settles first
withdraw()
ENERGY back to your wallet
call payout / reply you smart contract off-chain
EnergyVault
0xE46A…2A5e · Robinhood ChainHolds the ENERGY you deposit for API usage. Only the settlement role can charge it, and every charge burns the Energy used.
Functions
deposit(uint256 amount)Move ENERGY from your wallet into your vault balance.
requestWithdraw(uint256 amount) · cancelWithdraw()Start or cancel a withdrawal.
withdraw()Pay out the withdrawal after the delay.
accountOf(address) · spendable(address)Your balance, pending withdrawal and what the API may use.
Guarantees
- A charge can never take more than your balance or the per-user limit.
- Batch numbers run in order and each can be used once: no double charging.
- Used Energy is burned, not moved to anyone.
- Withdrawals keep working even while deposits are paused; the delay is capped at 7 days.
// 03 · IN YOUR DASHBOARD
Your Energy, at a glance
Deposit & withdraw
Move ENERGY in and out of your vault and follow pending withdrawals.
OpenUsage
Every request with its Energy cost, plus what is settled on-chain.
OpenAPI keys
Create keys for your apps; they all spend from this vault.
OpenBuy Energy
Top up with USDG when the vault runs low.
OpenStake STARDUST
Earn Energy every second instead of buying it.
OpenLiquidity pool
Stake spare ENERGY and earn USDG.
Open// 04 · FAQ
Questions
Why does my Energy number not change?
Three usual reasons: the ENERGY is still in your wallet (deposit it), part of it is set aside for a withdrawal you requested (cancel it to use it again), or it is staked in the liquidity pool (withdraw it first).
What happens to Energy I use?
It is burned. Every hour the settlement batch lowers each user's vault balance by what they used and burns the total, so ENERGY supply goes down as the API is used.
Can Stardust take more than I used?
A batch can never charge more than your vault balance, never more than the per-user limit set in the contract, and every batch has a number that can only be used once, so the same usage can't be charged twice. Every charge is a public event on the explorer.
How do I get my ENERGY back?
Request a withdrawal, wait the withdrawal delay (2 hours now; the contract only allows 1 hour to 7 days), then withdraw. The delay makes sure usage from the last hour is settled first.
Do withdrawals work if the vault is paused?
Yes. Pausing only stops new deposits. Requesting and completing a withdrawal always works.