Cardinal Staking

Cardinal
7 min readMay 6, 2022

--

The Cardinal team’s belief has always been that the sustainable future of NFTs will be built on utility and intrinsic value, and though still very nascent, the Solana ecosystem has already begun to see the beginnings of the consolidation that will ultimately weed out many of the collections that serve to be nothing more than charming PFPs.

More and more projects from all different verticals are realizing this every day, and in looking for clever ways to engage and reward their communities and consequently give more value to their collections, many have created staking initiatives for both their outstanding NFT collections and fungible project tokens. We’re pleased to announce that as part of our mission to bring utility to the Solana NFT ecosystem, we have developed Cardinal Staking — a suite of staking tools comprised of a set of Solana programs and UI components that materially enhance both the user and project admin experience by leveraging our core Token Manager protocol (https://github.com/cardinal-labs/cardinal-token-manager).

We were inspired to build out this offering by the success of our partnership with Jambo Mambo, a Solana NFT gaming project, for whom we rolled out a custom staking platform at the beginning of March 2022. Check it out at https://camp.jambomambo.com/.

The platform is built on our V1 protocol (which has since evolved into the Token Manager) and allows users to track the progress of their staked Jambos by issuing them Cardinal-managed receipt NFTs that they hold in their wallet until the original NFTs are un-staked. Because these receipt NFTs were created by us, we are able to overlay relevant dynamic information about the state and progress of the staked NFTs by simply pointing the metadata URIs to our metadata and image generators (https://github.com/cardinal-labs/cardinal-generator). For example, as shown in the graphic below, the Jambo on the left is not currently staked, while the Jambo on the right is training in the level-up stake pool and will reach level 1 on 4/18/22 at 04:53 GMT.

The magic is that our protocol allows them to hold this receipt in their wallet but not trade it, so the staking process still achieves the non-transferability for which most projects are aiming. If this were not the case, a user could effectively sell their staked Jambo by selling the receipt NFT. When a user goes to un-stake their Jambo, the Cardinal-managed receipt NFT is revoked from their wallet, and the original is returned.

After seeing both the Jambo and broader communities’ resoundingly positive responses to this reimagined UX, we decided to get to work and generalize the offering so that any other project could integrate it and spin up a similar staking platform. At the same time, we sought out ways to enhance the experience even further and refine the logic at the contract level to make it more composable and robust. The result is the newly refined Cardinal Staking toolset. So, what exactly is it?

Cardinal Staking encompasses a suite of contracts and UI tooling designed for staking both NFTs and fungible tokens in either an escrow-less or receipt-style manner. It works well with any standard NFT collection and also composes with other programs in the Cardinal NFT infrastructure ecosystem.

The program layer is two-fold, consisting of a stake pool program (stake-pool) as well as a token minting/allocator reward distributor program (reward-distributor) that is designed as a plugin and can be implemented differently for custom needs.

The stake-pool program supports the creation of NFT and FT stake pools with a variety of customizable parameters including selective stake-ability based on collection and creator specs, identifying metadata, cooldown, threshold progress loss, and more. Within a given stake pool are entries corresponding to each staked NFT or set of FTs that store relevant stake-specific information including the total time the token(s) has/have been staked and the pubkey of the relevant staker.

A reward distributor can be optionally added to a stake pool if its creator requires a means of issuing rewards to staked tokens. The reward-distributor is a simple out-of-the-box reward distributor that accomplishes basic, token-based, fixed linear payouts and entry/mint level multiplier customization (i.e. certain stakes can be assigned a factor to earn more or less than others). However, any complex reward distribution logic can be developed in a similar manner, and other implementations are welcomed and encouraged. For example, one could build any of the following to be plugged directly into a stake pool:

  • Tiered reward system that distributes rewards based on specified stake tiers.
  • Arbitrary non-linear reward distribution functions.
  • NFT mutator that modifies metadata based on stake duration.
  • Probabilistic distributor that may or may not give a reward depending on the outcome of a random iteration. This could apply to a quest or a mission with a given probability of success.

To fund the reward distributor, projects can either transfer tokens to the distributor to act as a bank or transfer mint authority itself for rewards to be minted on demand.

For more granular detail about the architecture of these programs, please visit https://github.com/cardinal-labs/cardinal-staking.

Upon staking their token(s), users are given the option to either 1) claim a Cardinal-managed receipt NFT different from their original token(s) that allows them to track the progress of their stake or 2) opt to hold the original token (in the case of NFTs) in their wallet as a receipt.

Receipt Type — Receipt

When staking using Receipt Type of Receipt, the user receives a copy NFT, similar to the V1 Jambo implementation described earlier. The receipt NFT’s metadata is dynamic by default and uses the Cardinal metadata and image generators. This approach is beneficial because the receipt can be clearly identified in the wallet as a staked NFT because of the mutable and dynamic nature of its metadata that allows for relevant markers/metrics to be displayed. The current staker can un-stake at any time which increments the stake timer for that mint and returns the receipt back to the stake entry. This is currently the only supported receipt type for fungible token staking.

Receipt Type — Original

When staking using receipt type of Original, the actual token will be locked in the user’s wallet. This allows users to continue holding their NFTs while they’re staked which can be advantageous for several reasons including allowing them to participating in DAOs, access gated discord servers, and play games. Although it does sit in their wallet, the token is frozen while it is staked and thus cannot be traded/sent to anyone else. As with type Receipt, the locked aspect of staking that projects hope to achieve is therefore not compromised in any way. While this receipt type is currently only supported for NFT staking, it will soon be available for FTs as well.

In order to make the process of launching a stake pool as frictionless and easy as possible, we’ve also developed a suite of UI tooling. This includes a staking/management UI scaffold that is designed to be forked, restyled to a given project’s liking, and separately deployed. We will also host a generic version of the UI at https://stake.cardinal.so/ to serve as an aggregator where projects and users can view/manage all of their pools and staked tokens. This means that technically speaking, no UI/UX frontend work is necessary to launch a Cardinal stake pool as projects can simply direct their users to the aggregator.

Projects that wish to integrate the protocols into their own custom UIs can do so easily with our APIs, but their pools will always be manageable via the aggregator. For example, we’ve partnered with the Blockasset team which has integrated the protocol into their own custom UI, but their pool is accessible/manageable in the Cardinal aggregator as well.

Blockasset UI

Cardinal Aggregator

For more information about how to use the staking UI components, please visit https://github.com/cardinal-labs/cardinal-staking-ui.

Cardinal Staking is a natural step in our journey to bring infrastructure layer utility tools to Solana NFTs, and we’re excited to finally share it with the ecosystem! The sustainable future of NFT-based digital ownership is one where tokens have purpose and engage their communities in meaningful ways. Staking will have a significant role in this transition, and we’re happy to be building unique tooling to facilitate and enhance it.

**If you are actively integrating or interested in Cardinal Staking and need support, please feel to reach out in our discord staking channel https://discord.com/invite/byq6uNTugq. We will work with you or your team to answer questions and provide development resources

--

--

Cardinal

Issue, manage and verify programmable NFTs using Cardinal on Solana — uses include rentals, identity tokens, tickets, subscriptions, expirable items & more