Kin Ecosystem Developer Best Practices

Written by: Kin Foundation

A non-profit organization dedicated to growing the reach and impact of the Kin Ecosystem.

April 8, 2022

Set Your App Up For Success Within The Kin Ecosystem

Blockchain development is an ever-evolving process, so it’s easy to lose sight of what’s important, whether you’re starting from scratch or continuing to develop an established application. 

As the Kin Foundation aims to support the growth and sustainability of a thriving Web3 ecosystem, we are consistently working to make the Kin development process as streamlined, easy-to-implement, and efficient as possible.

The easier it is for developers to efficiently integrate Kin within their app’s experience, the faster the ecosystem will grow as a result. 

We’ve put together a list of “Developer Best Practices” to provide yet another resource to help developers on their path to Kin integration. Whether you’re a fully fledged Kin Ecosystem app, or currently working on developing Kin into your app, these best practices are valuable to keep in mind.

Kin Developer Terms

A good place to start for any developer looking to join the Kin Ecosystem is the Kin Developer Terms. Ensuring your application complies with the Kin developer terms will help avoid any bumps in the road relating to the weekly Kin Rewards Engine (KRE) payouts. 

Even if you’re already familiar with these terms, it can’t hurt to take a refresher course if you’re planning on expanding Kin’s use-cases within your app.

Creating Accounts Efficiently

Account creation on the Solana blockchain comes with a SOL cost that is currently paid for by the Kin Foundation when using SDK-based solutions, which will change in the future. Accounts with zero balances or activity are still charged a rent fee by Solana. 

With this in mind, it is in developers best interest to ensure that account creation is done efficiently, so as to avoid any unnecessary fees. Due to this rent exemption fee, it is strongly recommended that apps follow best practices for account creation to avoid any possible hurdles with performance being throttled. 

The following steps will create accounts efficiently and effectively – in short, you will want to avoid initializing accounts until they are actually needed to transact meaningfully by the user.

  1. User installs the app on the client.
  2. Generate the private/public key so that the user can see their address.
  3. Do not call any functions that might trigger the code path for account initialization until necessary – for example, do not check the balance or getAccount details as this is what actively creates the account on Solana, simply set it at zero.
  4. When the user completes an earn event, you can simply send them Kin from the server, this will automatically create the account. This will also work if the user receives a p2p transaction from another user.

Non-Custodial vs Custodial Wallets and Private Key Storage

The Kin Client SDKs create end-user wallets which are non-custodial, where the private keys of end-users are stored on their local devices and are not generally available to the developer. Users have full control both over their private keys and their funds.  However, wallets created via the server SDKs only will be custodial by design.

It is strongly recommended that developers implement a non-custodial wallet solution for their Kin integration as opposed to custodial. Developers should be aware that under a custodial implementation, the hosting of user private keys (and subsequently custody of user funds) brings with it additional mandatory legal responsibilities for app developers. Learn more about non-custodial vs custodial wallet solutions here

Non-Custodial: Generally, a non-custodial wallet is where the end-user has full control over their own funds and the associated private key to the wallet.

Custodial: A custodial wallet is where the end-users’ private keys are under the control of a third party, which may be the developer of the application, and subsequently the developer is said to have custody over their end-users’ funds.

There you have it,  an exhaustive list of developer best practices to ensure your Kin integration is as smooth as possible, and your application is set up for success within the Kin Ecosystem.

This is an evolving resource, so we’d love to take requests on new topics you’d like to see covered, or feedback and questions on what’s already here. To do that head into our Kin Developer Community Discord and drop us a line in the articles-and-tutorials channel.

Happy building Kin developer community!


About Kin

Kin is a decentralized cryptocurrency purposely designed to integrate easily across mobile and web apps, with a built-in incentive model that rewards developers for increased usage. Apps built with Kin get paid for creating compelling cryptocurrency-based user experiences, where greater engagement results in shared economic benefits for users and developers. Today, the Kin Ecosystem boasts 65 million wallets, and has distributed over $70M in rewards across 80+ apps since its inception in 2017. Kin is an SPL token on the Solana blockchain, enabling consumer-scale apps to transact swiftly, with minimal-to-no fees. Learn more at Kin.org.

Build with Kin 

Apply for a Grant (Kin Catalyst Fund) 

Sign up for the Kin Monthly Newsletter

Sign up for the Kin Rewards Engine (KRE) Weekly Payout Snapshot

Follow Kin Ecosystem on Twitter / LinkedIn / Facebook / Instagram / Discord / Reddit