Servers are billed by the second in USDG, and the unused balance comes back when you stop. Open the app
A line-art vault with its door open, coins flowing to a wallet and a small flame

Leases and refunds

Every server is a lease on the NoraLeases contract. The contract holds your USDG, knows the price you locked, and decides how much is charged and how much comes back. You do not depend on us to stop paying.

Addresses

The meter

A lease starts at the block of open() and can run until maxEnd. The meter stops at the first of: close(), maxEnd, or a keeper settle on a running lease (a failed boot, a passed egress allowance, an abuse stop). The charge is computed from the seconds used, rounded up to the next USDG unit, and never exceeds the deposit.

The keeper counts from the moment your server actually booted when that came later than the open, so a slow boot is not charged. A boot that fails settles with 0 seconds: the whole deposit comes back.

Where the charge goes

  • 80% to the treasury, which pays for the servers.
  • 20% to the burn vault, which buys $NORA and burns it once the token exists. See $NORA.
  • Everything you did not use goes back to the wallet that opened the lease, in the same transaction.

Functions

FunctionWhoWhat it does
plans(id)anyoneReturns (pricePerHour, active) for plan id 1 to 5, in USDG units per hour.
quote(planId, seconds, wallet)anyoneReturns (pricePerHour, deposit): the price this wallet pays (after any holder discount) and the USDG that open() will pull.
open(planId, seconds)any walletPulls ceil(pricePerHour × seconds / 3600) USDG into escrow and starts the lease. 600 s minimum, 72 h maximum per call. Fails if the wallet already has 3 live servers or the service has 25.
extend(id, seconds)lease ownerBefore maxEnd and before close(): pulls more USDG at the price locked at open and pushes maxEnd. Same bounds as open().
close(id)lease ownerStops the meter at this second (closedAt = now). The server is deleted and the lease settled by the keeper.
settle(id, usedSeconds)keeperRequires usedSeconds ≤ min(closedAt or now, maxEnd) − start. Charges ceil(price × used / 3600), sends 20% of the charge to the burn vault and 80% to the treasury, refunds the rest to the owner, all in one transaction. A settle on a running lease ends it.
settleExpired(id)anyoneThree days after maxEnd, if the keeper never settled: charges the elapsed time (to closedAt or maxEnd) and refunds the rest.
getLease(id)anyoneowner, plan, start, maxEnd, closedAt, settled, priceLocked, deposit.
leasesOf(wallet)anyoneEvery lease id opened by a wallet.
meterEnd(id)anyoneThe last second the meter can count right now: closedAt if closed, else now, capped at maxEnd.
liveCount(), liveOf(wallet)anyoneLeases opened and not yet settled, in total and per wallet.
isHolder(wallet), priceFor(planId, wallet)anyoneWhether a wallet holds the $NORA threshold, and the hourly price it would lock.

Owner functions

setPlan, setToken (callable once, after the $NORA launch), setHolderTerms(threshold, discountBps) (25% off by default, 50% at most), setLimits, setOpenPaused (stops new leases, never touches open ones), setKeeper, setTreasury, setBurnVault, setBurnBps (50% at most). None of them can move a deposit: USDG only leaves the contract through settle and settleExpired.

Events

solidity
event LeaseOpened(uint256 indexed id, address indexed owner, uint256 indexed planId, uint256 pricePerHour, uint64 start, uint64 maxEnd, uint256 deposit);
event LeaseExtended(uint256 indexed id, uint256 seconds_, uint256 added, uint64 maxEnd);
event LeaseClosed(uint256 indexed id, uint64 closedAt);
event LeaseSettled(uint256 indexed id, uint256 usedSeconds, uint256 charge, uint256 burnShare, uint256 refund);

Calling it yourself

With Foundry's cast, a 10-minute nano lease and its close:

shell
cast send 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 "approve(address,uint256)" 0x8f359eC1a6E7BA4007b83a067b5bd70b7939490e 1334 --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $KEY
cast send 0x8f359eC1a6E7BA4007b83a067b5bd70b7939490e "open(uint256,uint256)" 1 600 --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $KEY
cast send 0x8f359eC1a6E7BA4007b83a067b5bd70b7939490e "close(uint256)" <id> --rpc-url https://rpc.mainnet.chain.robinhood.com --private-key $KEY

A lease opened this way still needs a boot call to get its server (or the keeper boots the default Ubuntu box after a minute). See the Agents API.