Back

K9 Finance – Revolutionizing Liquid Staking on Shibarium

K9 Finance – Revolutionizing Liquid Staking on Shibarium
K9 Finance logo

K9 Finance

LSD

Farming

K9 Finance is an innovative liquid staking platform built on the Shibarium network, designed to streamline staking for Shibarium’s native token, BONE. Inspired by the popular model of Lido on Polygon, K9 Finance aims to democratize access to staking rewards while enhancing liquidity, decentralization, and governance within the Shibarium ecosystem. By providing a liquid staking solution, K9 Finance allows users to stake BONE and receive knBONE in return—a tokenized, liquid representation of their staked assets, which can be utilized within the ecosystem while still accruing staking rewards.
Technology Stack:

Solidity

React

Python

Truffle

Django

Next.js

Table of contents

Business Requirements

At its core, K9 Finance is driven by the mission to empower users within the Shibarium community, creating a seamless and transparent staking experience that enables users to maximize their yield without sacrificing liquidity. The platform also supports decentralized governance, allowing the community to actively participate in decision-making processes through its governance token, KNINE. Additionally, K9 Finance facilitates LP farming, enabling users to earn rewards and bonuses by providing liquidity.

With K9 Finance, users gain a full spectrum of staking options, reward systems, and governance controls, all geared toward enhancing user participation and engagement within Shibarium.

Liquid Staking for BONE with knBONE Conversion

  1. Implement liquid staking functionality, allowing users to stake BONE in Ethereum and receive knBONE tokens in Shibariu, as a liquid representation of staked assets.
  2. Enable users to utilize knBONE within the Shibarium ecosystem while continuously accruing rewards.
  3. Ensure that the staking interface provides comprehensive information on knBONE prices, staking balances, APR, and historical rewards to improve transparency.

Real-Yield Staking for Sustainable Rewards

  1. Provide real-yield staking options for users to earn rewards in BONE through sustainable APR mechanisms.
  2. Design the rewards dashboard to display historical data on APR, BONE rewards, and balance overviews, catering to wallet-sensitive data for personalized user experience.

Farming Pools for Enhanced Engagement and Liquidity Provision

  1. Support liquidity farming for BONE and knBONE tokens, where users can stake LP tokens in farming pools to earn additional rewards.
  2. Design and implement farming interfaces compatible with Shibarium’s DEX v2, following an adjustment from initial plans for v3.

Token Vesting for KNINE Governance

  1. Set up a vesting module for the KNINE governance token to manage timed releases of token allocations, ensuring distribution integrity.
  2. Integrate vesting schedules within the platform’s interface to support transparency for vested KNINE tokens.

Cross-Chain Bridge between Ethereum and Shibarium

  1. Enable bridging functionality to facilitate asset transfers between Ethereum and Shibarium networks, ensuring user-friendly token transfers with clear and dynamic fee calculations.
  2. Establish a backend process to monitor and optimize gas fees, maintain a max gas threshold, and handle bridging failures efficiently.

Solution Overview

K9 Finance is a comprehensive liquid staking platform on the Ethereum and Shibarium networks, designed to enhance liquidity and offer seamless staking experiences for users within the ecosystem. The platform includes several core modules, each focused on providing flexible, transparent, and user-centric services that leverage the Shibarium blockchain and ensure ease of use. The primary modules implemented include Liquid Staking, Real Yield Staking, Farming Pools, Vesting, and the Bridge functionality. Below is an overview of these modules, highlighting their frontend, backend, and smart contract implementations:

1. Liquid Staking

The Liquid Staking module enables users to stake BONE tokens in Ethereum and receive knBONEin Shobarium in return. knBONE is a liquid tokenized representation of the staked BONE, allowing users to continue to use their assets while still earning rewards from staking.

  • Frontend: The Liquid Staking interface allows users to stake BONE, view their knBONE balance, and track earned rewards. It dynamically updates with current metrics, such as knBONE price (calculated based on BONE price and knBONE/BONE ratio), user APR, and reward history.
  • Backend: The backend architecture manages the processing of staking transactions, tracks staked amounts, and calculates rewards. It also integrates the real-time calculation of APR based on the rewards history for each user.
  • Smart Contracts: Custom smart contracts are responsible for handling staking, reward distribution, and minting of knBONE tokens. These contracts ensure secure transactions and accurate reward allocation based on the total supply of knBONE and the user's staked amount.

2. Real Yield Staking

This module enables users to participate in staking activities and earn rewards based on the real yield generated by the K9 Finance platform. The rewards earned are directly tied to the performance of the staking activities on the platform, ensuring a transparent and data-driven approach to reward allocation.

  • Frontend: The user interface provides clear visibility into the staking rewards, including daily APR, earned BONE rewards, and staking history. The APR is calculated dynamically based on the user’s staking actions and total staked amount.
  • Backend: The backend logic aggregates rewards, calculates daily APR, and tracks staking activities. The system ensures that rewards are allocated fairly and reflects the total real yield generated by the platform.
  • Smart Contracts: Smart contracts track the user's staking position and calculate the reward amount to be distributed based on the real yield. These contracts interact with the staking pool to ensure that rewards are fairly distributed in relation to the user’s stake.

3. Farming Pools

Farming Pools allow users to provide liquidity and earn rewards through the platform’s liquidity provision. Users can stake LP tokens and participate in farming activities, with rewards distributed based on their liquidity contribution.

  • Frontend: The farming dashboard displays the available liquidity pools, users' staked amounts, and earned rewards. It also shows important metrics like APR and the user’s share of the pool, enabling easy management of liquidity positions.
  • Backend: The backend coordinates the management of liquidity pools, ensuring accurate tracking of liquidity provision, rewards distribution, and the calculation of share of the pool for each user.
  • Smart Contracts: Smart contracts for farming pools handle liquidity provisioning, reward calculation, and distribution. These contracts ensure that rewards are allocated based on liquidity contributions, and they interact with the staking pools to ensure seamless reward distribution.

4. Vesting (KNINE Governance Token)

The Vesting module was implemented to manage the controlled release of the KNINE governance token. The system ensures a transparent and structured distribution of governance tokens over time, which empowers K9 Finance’s community to participate in decision-making.

  • Frontend: A dedicated section in the user interface displays the vesting schedule and the amount of KNINE that has been released. Users can track their vested tokens and view the remaining unlocked amount.
  • Backend: The backend ensures the proper implementation of the vesting schedule, tracking the release of tokens based on predefined intervals. It provides real-time data on each user’s vesting progress.
  • Smart Contracts: Smart contracts manage the vesting process, ensuring that tokens are distributed according to the schedule. These contracts prevent premature access to tokens, ensuring a fair and transparent vesting procedure.

5. Bridge

The Bridge module facilitates token transfers between the Ethereum and Shibarium networks. This ensures interoperability between the two ecosystems and enables K9 Finance users to move their tokens across chains, maintaining liquidity and ease of use.

  • Frontend: The bridge interface allows users to send tokens from Ethereum to Shibarium and vice versa. It provides a clear view of bridging fees, the amount to be transferred, and transaction status.
  • Backend: The backend manages the bridging logic, estimating gas fees, calculating bridging fees, and ensuring that tokens are transferred correctly between the two networks. It also handles the simulation of transactions to avoid errors and ensure successful transfers.
  • Smart Contracts: Two sets of smart contracts were developed to manage the bridging process. These contracts facilitate token transfers, track the amount being bridged, calculate fees, and ensure correct execution across the Ethereum and Shibarium networks.

Each module of the K9 Finance platform was meticulously designed and implemented to provide a seamless user experience, maintain robust security, and ensure maximum reward distribution for users within the Shibarium ecosystem. Through the combination of these modules, K9 Finance offers a comprehensive liquid staking solution that enhances liquidity, governance, and user participation on the Shibarium network.

Stage 1: Analytics

The first stage of the project focused on conducting in-depth research to understand the Shibarium network’s capabilities and the specific requirements for K9 Finance’s liquid staking platform. This included analyzing tokenomics, liquidity models, and governance structures. Based on this research, the platform architecture was designed to ensure scalability, performance, and compatibility with Shibarium.

Following the research, technical specifications were created for the platform, covering the frontend, backend, and smart contracts. These specifications served as a blueprint for the design team, ensuring consistency across the platform’s user interface and experience. They also guided the development of smart contracts and backend systems, defining how each module, from staking to bridging, would function and interact within the ecosystem.

Stage 2: UX/UI Design

In the second stage, the focus shifted to creating a user-friendly and intuitive interface for the K9 Finance platform. Given the complexity of liquid staking and DeFi mechanisms, it was essential to design an interface that simplified user interactions while maintaining transparency and accessibility. The design process began with wireframes and mockups that outlined the key features of the platform, such as staking, reward tracking, liquidity farming, and bridging.

The UX/UI team worked closely with the development and product teams to ensure that the designs aligned with the technical specifications and business goals. This collaborative process led to the creation of clickable prototypes, which were tested and refined based on user feedback. The final design prioritized ease of use, enabling users to seamlessly stake, manage rewards, and participate in liquidity pools, all while ensuring a smooth and visually appealing experience across both desktop and mobile platforms.

Stage 3: Development

The development of K9 Finance followed an agile approach, allowing the team to adapt quickly to changes and refine the platform iteratively. Regular sprints facilitated continuous development and testing of key features, such as smart contract implementations, backend integrations, and frontend adjustments. This method ensured a streamlined process that could accommodate evolving requirements, especially as challenges emerged during the development phase.

The project manager played a pivotal role in ensuring smooth project execution, prioritizing tasks, and maintaining clear communication between the development team and the client. This coordination was crucial for managing complex tasks, such as forking and customizing Lido’s contracts. Initially, the requirements called for farming integration with a DEX v3, but midway through development, Shibarium announced their shift to DEX v2. As a result, the team had to quickly adapt, developing new contracts for farming and modifying the interfaces to match the updated requirements. Additionally, the platform required forking Lido’s contracts for Polygon, where the contracts were publicly available but the frontend was closed-source. The team had to leverage Lido’s open-source frontend code for Ethereum, despite significant differences between the Ethereum and Polygon versions. This customization process required extensive backend and frontend adjustments to ensure compatibility with Shibarium’s ecosystem and the platform’s unique needs.

Stage 4: QA

The QA stage of the K9 Finance project was critical in ensuring the platform's stability, security, and overall user experience. The process began with rigorous testing of all smart contracts to ensure they were working as expected and free of vulnerabilities. Special attention was paid to key features such as liquid staking, reward distribution, farming pools, and the bridging mechanism. The contracts were thoroughly audited and tested in various environments to simulate real-world conditions and edge cases, ensuring they would perform flawlessly on the Shibarium network.

In parallel, the QA team focused on frontend and backend integrations, validating that all components were functioning seamlessly together. Extensive manual and automated testing was carried out on the user interfaces, including the staking, rewards history, and farming sections, ensuring that user interactions were intuitive and bug-free. Additionally, the team tested the platform under high load to assess its scalability and responsiveness. Performance benchmarks were established to ensure that all actions, from staking to reward claims, could be executed smoothly under varying levels of traffic. This comprehensive QA process allowed the team to identify and resolve any issues before the platform went live, ensuring a high-quality product that would provide users with a secure and smooth experience.

Challenges

Shibarium DEX Version Change

Initially, farming contracts were designed with DEX V3 in mind, but this sudden shift necessitated rapid changes to both the backend and frontend components. The team had to quickly develop new contracts for farming that were compatible with the updated DEX version. Additionally, the platform interfaces had to be adjusted to accommodate these changes, ensuring that the new farming logic aligned with Shibarium’s V2 DEX functionality.

Forking and Customizing Lido Contracts

The process of forking the contracts and interfaces of Lido for Polygon was another major hurdle. Although the Lido contracts were available in open-source form, the frontend was not. Lido provided open-source frontend code for Ethereum, but there were significant differences between the Ethereum and Polygon versions. As a result, the team had to spend considerable time adapting and customizing the Ethereum frontend to fit the specific requirements of Polygon. This process led to a nearly custom development of the frontend to ensure full compatibility.

Complexity in Contract Logic and Frontend Integration

The complexity of implementing business logic, especially for farming contracts and liquid staking, added further challenges. The team had to ensure that the smart contracts, backend, and frontend systems worked seamlessly together, managing complex interactions and calculations, such as reward distributions, staking, and liquidity pooling. This level of integration required careful planning and extensive testing to ensure all components operated smoothly and accurately in the live environment.

Results

The K9 Finance project was delivered on time, meeting all of the client's requirements and expectations. The platform is now a top contender in the Shibarium ecosystem, with the client expressing satisfaction with the quality of the final product and its functionality. The seamless integration of staking features, liquid staking solutions, farming pools, and governance systems have made K9 Finance an important addition to Shibarium's decentralized finance offerings.

Achievements:

  1. Top 1 Project on the Shibarium Network – According to DeFiLlama, K9 Finance ranked as the top project in terms of liquidity on the Shibarium network, reinforcing its role as a key player in the ecosystem.
  2. 31st Place in Liquid Staking on Ethereum – K9 Finance secured a position in the top 50 liquid staking protocols on Ethereum, further establishing its reputation within the broader DeFi space.
“At Rock'n'Block, we take your blockchain ideas
and turn them into tangible, innovative solutions."
“At Rock'n'Block, we take your blockchain ideas and turn them into tangible, innovative solutions."
Get a Free consultation
Product manager | Rock’n’Block
To:
Rock'n'Block logo
Rock n Block
This site is protected by reCAPTCHA and the Privacy Policyand Terms of Service apply.
done
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Next case

Concentrated Liquidity DEX Development

BeamSwap

CLAMM, multiple fee tiers, non fungible liquidity, and range orders – read our case study about Concentrated Liquidity DEX Development - BeamSwap v3

Technology Stack:

DPoS blockchain and Infra

CratD2C

We partnered with CratD2C to develop a comprehensive blockchain ecosystem aimed at transforming industries like e-commerce, real estate, and luxury services. Our team helped launch essential features, from token creation and ICO sales contracts to developing a DPoS blockchain, staking mechanisms, and a DEX. The project raised $1.5M and passed critical security audits, setting the stage for a scalable and efficient platform.

Technology Stack:

CLAMM

Bot

Marketplace

Collection

Explorer

NodeService

Launchpad

Social

P2E

CloudMining

Wallet

RealEstate

Commodities

Farming

LSD

DPoS

DEX

Golang

Wagmi

Next.js

Hardhat

Truffle

IPFS

Ethers.js

Mercurio

Firebase sdk

Nginx

Docker

Redis

Celery

Material UI

Redux

PostgreSQL

Django

Fireblocks SDK

TypeScript

Python

React

GraphQL

Solidity

closeChat with us

Let's Connect and Innovate Together!

Reach out to our team

WhatsUp
Contact in Telegram
Book a call
Office image
TEC Business Center FZE Level 3, The Offices 3, One Central, World Trade Center Dubai - UAE
Seoul - South Korea: 5th floor, 40, Godeok-ro, Gangdong-gu
twitterTelegramFacebookLinkedin
To:
Rock'n'Block logo
Rock n Block
This site is protected by reCAPTCHA and the Privacy Policyand Terms of Service apply.
done
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Rock'n'Block logo
© Copyright Rock’n’Block 2024
Privacy Policy