Deploying your smart contract

Loop will deploy a smart contract on your behalf on each network that you would like to collect payments on. In the future, there will be a self-serve option through the Company dashboard.

Below is the information we need to deploy your smart contract. You can provide this information to Loop via your dedicated Telegram channel. If you do not yet have a Telegram channel and would like to use Loop, please contact support.

Initial contract properties

To get started, you’ll need to specify the following properties for us to set up your subscription contract:

AttributesDescription

Inbound Treasury

The address of the wallet you want to receive transfers to An inbound treasury address is required to enable auto-invoicing; otherwise, it is optional. We recommend using a multi-sig or custodial wallet (i.e. wallet at an exchange) for your inbound treasury if you plan on holding significant funds there.

Signer

The address of the wallet signing the transfer order / payment requests. Note: in most cases, the best option is for Loop to be the delegated signer, because this enables auto-invoicing and other invoice management features.

Accepted Tokens

Optional. By default, the contract will accept these supported tokens. If you enable Stripe / Chargebee integration, all tokens in the contract will automatically be applied to any product pulled into the system. However, you can modify the list of accepted for a given subscription by editing the subscription on the dashboard or API call.

Companies can modify this list by providing the token addresses and chainlink aggregator addresses for the token that you want to use for transfers. Transfers will only be able to be processed using this list of tokens.

Accepted tokens can optionally be configured per network.

Companies can further restrict which tokens are accepted at the item level. For example, a company could specify for the "Developer plan" that only USDC and WETH are accepted but for the "Enterprise plan" only WBTC is accepted. Thus, if the company wants a given token accepted for a specific plan, that token needs to be specified in the contract.

Signer Wallet

For those that want to use the Loop protocol completely trustlessly, we allow for end-users to be the Signer address. This address is used to sign all individual transfer orders sent to Loop. This assures that only the owner of this wallet can submit transfer orders on your behalf or modify any of the transfer order parameters that are submit. See Securing with Signatures for more detail.

Since this wallet needs to sign every transfer order, it is recommended that this not be a multi-sig wallet. The most efficient way to sign these orders is programmatically, so using a multi-sig would be prohibitively slow and cumbersome.

An example of how to programmatically sign and send transfer requests can be found here.

Last updated