You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
contracts: subscription credits in OperatorRegistry #2948
An operator is subscribed in an epoch when its credits paid that epoch's flat USDC subscription. Anyone can buy credits for any operator. A subscribed operator keeps 90% of its earnings (the rebate) and counts toward the subscribed 60% in DHT selection and holder selection.
Design
buyCredits(operator, amount): permissionless. Transfers amount USDC from the caller to the treasury and adds amount credits to operator. Credits cannot be transferred, withdrawn or refunded, and never expire. The registry holds no USDC.
Lazy charge. At each epoch start, subscription credits are charged. The charge is applied when anything next touches the operator's credits. projectedCredits(op) and isSubscribed(op, e) return the result without a transaction. The catch-up is one multiplication per recorded change of the price.
subscription is a USDC amount per epoch, set by GOVERNANCE_ROLE within hard bounds, changing by at most ±10% of its value per epoch. Every change is recorded with its epoch, so the lazy charge and the views use the price in force in each epoch.
subscribedSince(op): the first epoch of the operator's current continuous subscription, for a later DAO's tenure.
Activity