Farms, twins, and payout addresses, demystified

Managing farms in v3, using both the dashboard and the Connect app, can be confusing. This post will cover everything you might want to know about how it all works.

What is a farm?

A v3 farm is an entry on TF Chain that includes a farm id and a Stellar payout address. Farmers use a boot image that references their farm id to boot their nodes and then they get paid all TFT rewards for nodes in their farms to the Stellar payout address. This Stellar address must be active and have a trustline established to TFT, as does the default wallet in our Connect app.

What about twins?

A twin is registered identity on TF Chain. They are created when user activates their account (wallet) and are assigned a twin id. For the purposes of farming, a twin is just a “container” that can hold one or more farms. Farms always belong to the same twin, for now. This contrasts with the payout address, which can be updated by the farm owner at will.

TF Chain accounts are derived from a secret (either a seed phrase or the hex encoded equivalent), so the full chain of “custody” looks like this:

Secret > TF Chain wallet > Twin > Farm > Node(s)

Note that this same secret could also be used to create a Stellar wallet (or any blockchain wallet for that matter), but it wouldn’t have any special relationship to the Stellar payout address used for the farm. Likewise, changing the Stellar payout address doesn’t have any effect on the secret, TF Chain wallet, or Twin associated with your farm.

Creating a farm with the Dashboard (and importing to app)

When you create a farm using the Dashboard (or previously the Portal), you use a account within the Polkadot extension. This account has a secret that you either generated within the extension or imported, and a Twin, which is necessary to create the farm. You can enter or update your payout address in the dashboard.

If you want farms created in the dashboard to be visible in the Connect app, you need to import the secret you used in the Polkadot extension into the app. You can do this using the import wallet functionality on the wallets page in the app.

The TF Connect app will allow you to see the derived Stellar address in the info section, but it won’t activate this wallet for you, like it does for the default wallet in the app. The purpose of importing the wallet is simply to tell the app you want to check for and display farms connected to the TF Chain account derived from that secret.

Creating a farm with the app (and importing to Dashboard)

When you create a farm within the app, you’ll select a wallet from those available in your app. This wallet (secret) is used both for the Stellar payout address and the TF Chain account that owns the Twin. It’s a nice and simple approach, but the feature of changing your payout address is missing from the app for now.

To change your payout address, or for whatever reason, you can import the TF Chain account that owns your farm into the Dashboard. Within the farming section in the app, there’s a “TFCHAIN SECRET” field visible when a farm is expanded. Copy the secret, and import it into the Polkadot extension (it asks for a seed phrase but will accept the hex based secret). Importing the seed phrase from your connect app into the Polkdadot extension, however, won’t work.

Wrapping up

With multiple chains and multiple interfaces involved, v3 farm management has some complexity. We’re always working to simplify and improve the user experience, but I hope for now this explanation is helpful :slight_smile:

6 Likes

Thank you Scott for this clear explanation that, for sure, will help a lot for people to understand how things work! :clap: :clap: :clap:

Reading it made me realize even better that the user shouldn’t be exposed to the twin concept.
I see it like a technical layer with no clear value in terms of user experience.
Or, is there something I am missing? :thinking: :slightly_smiling_face:

Sure thing, @renauter, and thanks for having a look :slight_smile:

It’s true that twins tend to cause confusion, especially since users have a twin and each node gets one too. On the other hand, the twin is the UX piece that corresponds to agreeing to the T&Cs and activating an account on TF Chain. In the TF Connect app, this is all handled in one step during farm creation that doesn’t really highlight the twin. Having this as an option for farmers wanting a simple experience and keeping the twin visible while using the dashboard seems like a good balance to me.