How Omni simplified BNB staking
Since its launch in late 2020, Binance Smart Chain (BSC or Smart Chain) has become one of the most popular and well known blockchain networks, capturing a huge amount of TVL. Explicitly (and often criticized for) trading decentralization for speed and low gas costs has allowed BSC to become a hot bed of DeFi activity for speculators, developers, and arbitrageurs. Despite its shortcomings, it has undoubtedly opened up the world of Web3 to millions of users and onboarded many Web3 developers.
In this post, we’ll dig into how the BSC (and Binance Chain [BC]) works, some of the complexities associated with building on top of it, and how we rolled out our staking integration despite these.
💡Omni now supports native BNB staking in app – download Omni now on iOS or Android and get a taste of those juicy yields today!
For a bit of context, Omni is a self-custodial, multi-chain mobile wallet. Supporting more than 20 distinct layer one networks and boasting over 30 native yield integrations, Omni is your entry point into DeFi and beyond.
The complexity that presents itself when trying to offer BNB staking as a self-custodial wallet comes down to the fact that BSC (where all DeFi activity takes place) and BC (where delegation occurs) are separate networks. Until now, existing wallets in the Omni ecosystem have required users to painstakingly and manually transfer assets from BSC to BC before picking a validator and delegating to them. Omni looked at these flows and believed we could do better given the tools and SDKs available to us. What has resulted is the easiest BNB staking flow in the market (whether that be on desktop, browser extensions ,or mobile) and a UX that is directly consistent with our other staking flows.
💡Because BSC is EVM compatible, dApps built on BSC can be used with Omni via WalletConnect. Simply lookout for the “Connect” button on your favorite dApps and select Steakwallet when choosing your wallet!
How does BNB staking work?
As mentioned, the Binance network is actually split into two distinct networks, the Ethereum Virtual Machine compatible Smart Chain and the Tendermint powered Binance Chain. Actual delegation happens on the Binance Chain, whereas DeFi activity (like interacting with PancakeSwap) happens on the Smart Chain.
Omni has built a lot of tooling around interacting with both of these types of networks. We can handle issuing and submitting transactions to any EVM compatible network, already supporting the most popular L1s and L2s you’ve probably come to know. On the Tendermint side, we’re no strangers to those networks either, already supporting the CosmosHub, Osmosis, Akash, and a handful of other application specific networks.
Given that the natural starting point for most users is BSC, the complexity here is explicitly due to the cross-chain bridge that Binance has implemented. Without it, transferring your assets means registering with binance.com, depositing your BNB on BSC, then withdrawing them on BC. When it comes to this withdrawal process on BC however, you’re stuck onboarding to and using an outdated browser extension called Binance Wallet, adding yet another extension to your probably already significant list. Once you’ve done all that, you’re able to delegate to your selected validator.
Despite the difficulty associated with this, BNB boasts one of the highest staking participation rates out of any of the top networks at 81%. This is because much of this delegation power certainly comes from delegation happening on Binance (the centralized exchange) itself. Centralized exchanges are able to hold tokens on behalf of users and delegate them behind the scenes, totally cutting holders out of any of the received gains. If you opt in, often called “Earning” on these networks, they’ll give you but a percentage of the gains you could be earning if you delegated via a self-custodial wallet.
To be totally truthful, we of course did our research before starting this integration and found a few self-custodial and mobile wallets that support BNB delegation. However, they lacked the key feature we wanted to implement – delegation being associated with BNB on the Smart Chain. To us, it makes no sense for users to have to transfer their BNB to the Binance Chain in a separate flow before being able to delegate, we wanted to keep everything nice and tight for users and behind our well known 3-tap flow.
Now that we’re familiar with delegation on Binance and the other options available, we can dig into how exactly our integration works. Omni prides ourselves on the three step staking process we’ve created for each yield integration we support, no matter the complexity associated with it. Our challenge was then to make a staking process that seamlessly transfers tokens between the two networks and handles delegation without users needing to know any of the nitty gritty details.
Without getting into code snippets, the BNB staking flow Omni has developed does the following on behalf of users:
Transfers BNB tokens to the Token Hub, a built in system smart contract on the Smart Chain. More information about this native cross chain bridge can be found in the official Binance documentation
Waits for the Bridge Module and oracle relayer running to confirm the claim on BSC and submit the state change on BC
Issues a delegate transaction on BC specifying the amount of BNB and the validator address. Currently Omni is delegating to Coinbase Clouds’ (formerly Bison Trails) validator, however more optionality is coming soon.
Thanks to the fast block times Binance supports, this whole process takes but a few seconds ensuring users have an experience consistent with other interactions on the Smart Chain.
Once in a staked position, your BNB is earning (at the time of writing) an APR of approximately 6.3%, representing a great way to get yield on your BNB without the smart contract risk associated with many other DeFi options present in the Smart Chain..
Unstaking is a similar process, whereby funds are transferred out of BC via the Bridge Module, but is prefaced by the seven day unbonding period users must go through. After this unstaking period is finished, Omni will remind users with a push notification that their BNB is ready to be withdrawn.
Omni's BNB staking integration is certainly one of a kind and needed extensive research into the semantics of both BSC and BC before our Web3 engineers were able to tackle it. We hope after this post you’re encouraged to move whatever BNB you may have in any centralized exchanges to Omni and give self custody a go. Omni is eagerly awaiting the recently announced upgrades to the Binance ecosystem that will bring a beacon chain and a roadmap for improved scalability.