The Jellyfish Story: Building DeFiChain’s SDK

Birthday Research
Birthday Research
Published in
4 min readJul 18, 2022

Building lite decentralized finance applications on DeFiChain can be complex. However, this should not be the case. Introducing Jellyfish, a bridge into an alternative future, where non-custodial decentralized transactions can be performed with speed and ease.

(Jellyfish was chosen as the SDK name to pay tribute to the DeFiChain logo)

Jellyfish is DeFiChain’s SDK for building lite DeFi Applications at scale. Built using modern JavaScript approaches — ES6, Strict & Mono-repo — Jellyfish is transpiled and bundled for backward compatibility, and is written in TypeScript with added first-class support.

Although Jellyfish was incubated under Birthday Research as an infrastructure project, the team working on Jellyfish were neither part of the core maintainer nor the technical steering DeFiChain community; instead, the team acted as an advisory unit and built the JellyFish SDK to abstract away the complexity of writing C++ (which is what Native DeFi is based on) for developers.

In the initial days, bugs were aplenty. Motivated to fix these bugs, the team came together as a group and set an all-encompassing goal: The ability for anyone to create modern lite DeFi applications at scale.

Jellyfish started with 3 packages in a mono repository, but today, it has over 40 packages across the ecosystem and multiple ocean nodes distributed globally, serving millions of requests per hour.

A trip down memory lane

The Inception

Like any other ecosystem project, the foundation of the Jellyfish development was grounded in principles such as high standards, proper error handling, rigorous testing, and clear documentation.

Introducing the HD Wallet

Once the foundation was ready, the team then worked on high-level abstraction to expedite developers’ ability to perform non-custodial transactions with built-in HD wallet constructs.

Transactions were launched

After HD wallets were introduced, efforts were pivoted to blockchain scripting. To scale native DeFi scripting, scaling buffer composing had to be tackled. Similar to Bitcoin, which uses a scripting system for transactions, this script needed to be simple, stack-based, and processed from left to right. Furthermore, it had to be non Turing-complete with no loops. The script features a composer-like, bi-directional toBuffer or fromBuffer implementation, which was created to have high compatibility with the Transaction Composer.

Playground

The team then worked on ‘Playground’ which was a side project to ocean infrastructure. It provided a deterministic DeFi playground for blockchain engineers to build applications without running their own nodes or using real funds.

Ocean APIs

Although the Jellyfish SDK provided a foundation for developers, providing access to promote scalability was still lacking. This is where Ocean played a key role; used by over 100 public and private community developers, the team built Ocean, a global API infrastructure project hosted by the Jellyfish team which democratized access for everyone.

After launching Ocean, the team went through several technical spikes to further Ocean’s ability to scale, including separating the network backbone (mainnet, testnet, playground) to allow fault tolerance in each namespace. The team started with 2 regional zones, but have since expanded to 3 to serve increasing traffic, and will continue to add other regions which become a hot zone to optimize latency.

Scaling Jellyfish request to billions

Since inception, the team has seen incredible growth:

  • 30x the volume of daily requests ocean nodes handle
  • 10x the size of the data indexes and node snapshots
  • 10x growth of node auto-scaling groups
  • 10x the memory footprint to scale traffic growth
  • 3x the number of services/APIs hosted
  • Expanded to an additional AWS region to serve traffic from the Americas

Throughout this period of tremendous growth, the team remained steadfast in their North Star: The ability for anyone to create modern lite DeFi applications at scale. In the earlier days of their journey, the team focused on the first part of the goal, which was to enable users to create modern lite DeFi applications. Today, the latter is the focus, enabling scale through sustained innovation and decentralized growth.

Accelerated growth of Ocean

What’s next for Jellyfish

To build the next horizon of growth for the Jellyfish ecosystem, the team submitted the following community fund proposals (CFPs):

  1. Ocean Infrastructure
  2. Jellyfish API Development
  3. Jellyfish SDK Development

Supported by the community, the CFPs were successfully approved by the masternode owners and funds will be allocated over the course of Q2 2022. Stay tuned as we continue to share more updates over the coming months!

Jellyfish is developed by Birthday Research. Read more about other projects by Birthday Research or join our community to get updates.

About Birthday Research

Birthday Research is the blockchain R&D arm of Cake DeFi that develops best-in-class blockchain innovations, with the mission of enabling the next bound of Web3 through open-source blockchain research and development.

Birthday Research’s work spans cryptographic research, deep blockchain consensus development, and smart contracts development — with a laser-sharp focus on pushing the industry frontier while tackling the most demanding DeFi challenges of today.

--

--

Birthday Research
Birthday Research

Birthday Research is the Blockchain Research and Development arm of Cake DeFi, a Singapore-based blockchain and fintech company.