Subscriptions,
settled by the chain itself.
Customer signs once. The chain fires every recurring charge, every period, on schedule. No off-chain keeper to maintain, no failed-charge retry queue, no payment-provider lock-in. This is what ARC-21 cron + ARC-20 transfers unlock.
No keeper bot. No retry queue.
The chain just fires.
On other chains, "subscription" smart contracts need a keeper service (Chainlink Automation, Gelato) to fire the recurring charge from outside. Extra cost, extra dependency, extra failure mode. On AsentumChain, the cron job runs from inside consensus.
Merchant deploys
A subscription contract goes on-chain once. Defines tiers, amounts, and the cron schedule for due-checks.
Customer subscribes
One signed tx deposits ASE into the contract. That deposit funds N upcoming charges. No card-on-file.
Chain fires charges
Every day, the chain walks every active subscriber. Due ones get charged. Period advances. No keeper.
54 lines of plain JavaScript.
This is the actual contract powering Premium on social.asentum.com. Two methods: subscribe() takes the deposit; chargeAll() is fired daily by the chain's cron registry.
// AsentumPremium — recurring subscription contract.
// Customer deposits ASE → chain debits the merchant every period.
contract AsentumPremium {
init({ merchant }) {
storage.set('merchant', merchant);
cron.schedule(this.address, 'chargeAll', '+1d');
}
subscribe(tier) {
const cfg = tier === 'w'
? { amount: 3, period: 604800 } // 3 ASE / week
: { amount: 10, period: 2592000 }; // 10 ASE / month
storage.set('sub:' + msg.sender, {
tier,
amount: cfg.amount * 1e18,
period: cfg.period,
balance: msg.value,
nextCharge: chain.timestamp + cfg.period,
});
}
// Called by cron every day. The chain itself walks due jobs.
chargeAll() {
const merchant = storage.get('merchant');
for (const [addr, s] of storage.entries('sub:')) {
if (chain.timestamp >= s.nextCharge && s.balance >= s.amount) {
s.balance -= s.amount;
s.nextCharge += s.period;
transfer(merchant, s.amount);
}
}
cron.schedule(this.address, 'chargeAll', '+1d');
}
}Build your own.
Fork the contract, tweak the tiers, redeploy. The wallet integrations (Telegram, Chrome extension) and the on-chain cron firing all work the same — your subscription product is one contract deploy away.