Off-chain vs. On-chain Staking

MiKi Digital
4 min readSep 12, 2023

--

On-chain vs. off-chain is a long-standing debate. Staking is one of the things that can be done both on-chain and off-chain.

What is staking

Staking is crypto’s equivalent of “putting money into the bank”. It’s when you “lock up” a certain amount of cryptocurrency in a digital wallet to support a blockchain network. This helps the network validate transactions and create new blocks. In return, you earn rewards in the form of additional cryptocurrency. Staking is based on the proof-of-stake (PoS) consensus mechanism, where the more tokens you stake, the higher your chances of being chosen to validate transactions and earn rewards.

Courtesy of coinbase

What’s the issue

There are two main ways of staking: off-chain and on-chain. Let’s take a look at the benefits and downsides of each.

First, on-chain staking Benefits:

  • Increased transparency — Since everything is stored on the blockchain, it’s 100% transparent to the end user where his money goes.
  • More secure — You aren’t storing your staking data in a centralized database, so your database provider can’t suddenly ban you.
  • Cheaper — you don’t have to pay for database costs
  • Easier to manage — no need to have backups, setup sharding, and everything else
  • Better performance — If you have staking data on-chain, it’s going to be more automized than off-chain, which will lead to better performance

Downsides:

  • More expensive to the end user — In on-chain staking, users will have to pay more gas when they stake and unstake
  • Requires more blockchain knowledge — Hiring professional blockchain developers might be more expensive than backend devs(for off-chain).

And, off-chain staking Benefits:

  • Cheaper to the end user — they have to pay less gas fees
  • Flexibility — You can use any database your developers are familiar with to store the data

Downsides:

  • Less trust in the project — users won’t know where their funds are going. Transparency is the sole reason behind crypto; with off-chain staking, it becomes much less transparent
  • Centralization — Unless you use a decentralized DB, which you probably won’t, the project will be centralized. Which, again, goes against the nature of crypto

Is there a winner?

Of course, you must pick the right approach based on your project. In an ideal world, on-chain staking would be your go-to choice 100% of the time and has no downsides. However, it’s not the case. Many startups often opt for off-chain staking as it’s cheaper to the end user(less gas) and to the company themselves(a good Blockchain dev, on average, costs more than a Backend one).

Can we improve the gas price downside of on-chain staking?

We absolutely can! By using Layer 2, your solution will be more performant, and gas prices will be much lower. Polygon is one of the most popular L2s, and, at the time of writing this article, on average, the fees are 7x times lower on Polygon compared to Ethereum.

Polygon Logo

Polygon is not the cheapest Layer 2, so you can find something even cheaper.

Gas prices on 12.09.2023

Developer costs will still be higher, but a good Blockchain developer is your most valuable asset in Web3. This “investment” into a developer will bring more trust to your project, making it more secure and decentralized.

Companies using off-chain and on-chain staking

A lot of younger NFT companies use off-chain staking like Keungz, Metakongz. However, when it comes to older and more mature players like “The Bored Ape Yacht Club”, they prefer on-chain staking.

And, of course, all traditional staking projects, like Rocketpool and Lido.fi, EigenLayer all use on-chain staking.

Conclusion

Storing everything on-chain is a bad idea, but if you plan to create a secure & trusted project, staking on-chain is a good decision. You’ll undoubtedly need good devs to pull this off, but the investment is worth it.
HOWEVER, it still has its downsides & difficulties, which you must consider before investing time & money carefully.

Need blockchain help? Feel free to contact us or book a call.

Written by Mikhail Kedzel for MiKi Digital

--

--