Subscription

Subscription

The Subscription (opens in a new tab) feature makes renewing your domain on the Starknet network easy and worry-free. It uses a special contract that automatically takes care of renewing your domain for you every year, so you don't have to remember to do it yourself or deal with any gas fees.

🔗 View the source code on GitHub (opens in a new tab)

Overview

Upon subscribing, Starknet ID promises the following:

  • No hidden fees: You are only charged for the domain renewal. Transaction fees are taken care of by Starknet ID.
  • Full control: You can deactivate this feature anytime you wish.
  • Maximum security: The smart contract governing the process is immutable, which means it can't be altered, ensuring utmost reliability and security.

Here's how it works

  • Users authorize the smart contract to spend their funds for domain renewal.
  • A Starknet ID-controlled bot interacts with this contract, using user funds to renew domains.
  • Starknet ID pays Starknet gas fees for you.

Key Guarantees

The smart contract provides the following guarantees:

  1. Dedicated Purpose: Funds will only be used for renewing the domains you have specified.
  2. Charge Limit: The maximum you can be charged is up to a predetermined limit set by you.
  3. Annual Renewal: You can only be charged once in a year.
  4. Expiration-Driven Renewal: Renewals will only happen if the domain is nearing expiration (less than a month left).

Technical Insights

Let's delve into some technical aspects of the automatic renewal contract:

1. Renewal of Non-owned Domains

This feature lets you renew domains even if they're controlled by a smart contract. It's especially handy if you wish to maintain control over the renewal payments, while the domain is governed by a smart contract.

2. Multiple Spending Flows

Flexibility is at the core. You can set up multiple spending streams for various domains or even a single domain. However, even if you have multiple flows directed towards the same domain, it will be renewed only once a year, ensuring no overcharging.

3. Deactivation Parameters

To halt a spending flow, it's essential to use the account that initiated it. The original domain and limit_price must be provided. Events are emitted for users to easily track their allowances and manage them effortlessly.

4. Spending Capacity

The limit_price, or spending capacity, determines the amount deducted from your account. Even if the actual renewal is cheaper, the full limit_price amount will be used. Though there's a provision to reclaim overpaid funds, it's not a guaranteed feature and is generally discouraged for trivial amounts.

5. Admin Control

The contract is under the stewardship of an admin who can permanently halt all renewals — a measure in place for extreme scenarios, like a detected vulnerability. The admin also has authority over the renewer account – the only account permitted to renew domains on behalf of others. This renewer needs StarknetID's trust, especially since it dictates the tax_price. If compromised, while the renewer would continue its function, the tax funds might not reach StarknetID.