Inside the JungleLab.io Liquid Network

Inside the JungleLab.io Liquid Network
Photo by Shubham Dhage / Unsplash

Welcome to our 2023 JungleLab blog & Happy New Year! from the JungleLab team. Developers want to know, Artist's Wanna know, User's wanna know, So what's been cooking in our lab.. over the last few years,  Let's Deep Dive the knowledge together.

We're excited to share with you the latest updates and developments on our platform, as well as tips and insights for artists and developers looking to get the most out of our digital asset marketplace.

For those unfamiliar, JungleLab is a web-based platform that allows artists and collectors to issue, sell, and trade non-fungible tokens (NFTs) on the Bitcoin Liquid Network. Our platform features user accounts and profiles for artists and collectors, a marketplace gallery for browsing and buying artworks, and an integrated liquid wallet for funding accounts and conducting transactions.

One of the key benefits of using JungleLab is the security and decentralization provided by the Liquid Network. Transactions on the Liquid Network are settled on the Bitcoin blockchain, which is known for its robust security and resistance to tampering. Additionally, JungleLab uses atomic swaps to enable peer-to-peer transactions, which means that we don't need to hold onto funds as an escrow service. This means that artists can retain control over their own sales and collectors can feel confident that their purchases are secure.

Features User accounts and profiles for artists and collectors include custom avatars, contact info and biography Users can follow other artists and collectors and like/favorite individual artworks Artists can upload digital media files (jpg, png, gif, mp4) representing an artwork and add metadata like a title, description, and tags Selected metadata is published in the liquid asset registry so that tokens can be recognized by external wallets Media files are added to the IPFS network upon being uploaded and are given a unique content identifier (CID) derived from the SHA256 hash of the file The CID is embedded in the Liquid token issuance transaction contract, permanently and provably linking the file to the token Artworks are listed in a searchable/sortable/filterable marketplace gallery Artists can list an artwork for sale by setting an optional listing price, royalty rate, and/or auction period Bids and sales are conducted peer-to-peer using atomic swaps so the platform host does not need to escrow funds Listings, bids, transfers and new artwork activity are logged and presented in a site-wide feed A web-based liquid wallet is integrated into the user's profile page and allows them to fund their accounts with L-BTC or any kind of liquid asset Wallets can be backed up and imported using a 12-word BIP mnemonic seed phrase Built-in integration with the coinos.io API allows users to instantly convert BTC to L-BTC by depositing to an on-chain address or paying a lightning network invoice Royalties and auction holding periods are enforced through a 2-of-2 signing server that only signs off on transactions that meet certain conditions suggest other important features needed for digital assets

As a developer, you'll appreciate the variety of tools and technologies we've integrated into JungleLab. On the front-end, we use Svelte Kit as our reactive component framework and Tailwind CSS for UI utility classes. For liquid wallet functionality, we use LiquidJS. On the back-end, we rely on Postgres and Hasura for storing relational app data, and Hasura backend plus for JWT-based user auth. We also use IPFS for media storage and hash-based content addressing, and Fastify as our NodeJS api/app server.

In terms of third-party APIs, we use Esplora for Liquid blockchain data, the Liquid asset registry for token metadata, and coinos for BTC/LNBTC <-> L-BTC conversion. We also have a number of pre-requisites for setting up a local development environment, including pnpm, Docker, and the Hasura CLI.

As an artist, we hope you'll appreciate the variety of features we offer to help you showcase and sell your work. In addition to uploading and tagging your artworks, you can also set prices, royalty rates, and auction periods, and interact with other artists and collectors through our social features. We also have a feed that logs all activity on the platform, so you can stay up-to-date on what's happening in the community.

We hope this gives you a good overview of what JungleLab is all about and how it can benefit you as an artist or developer. If you have any questions or feedback, don't hesitate to reach out to us – we'd love to hear from you!

          ‌

Our Tech stack deep dive summary

Bitcoin is secured by a decentralized network of computers around the world that are constantly verifying and validating transactions on the network. This process is known as "mining" and it involves solving complex mathematical problems in order to add new transactions to the blockchain, which is the public ledger that records all bitcoin transactions. The security of the bitcoin network is maintained by a combination of factors, including the distributed nature of the network, the use of strong cryptography to protect against fraud, and the inherent limited supply of bitcoin.

The Liquid Network is secured through a combination of different technologies, including:

  1. Merkle tree-based proof of work (PoW): The Liquid Network uses a modified version of the Bitcoin PoW algorithm, which requires validating nodes to solve a cryptographic puzzle in order to add a new block to the chain. This helps to prevent attackers from adding malicious blocks to the chain.
  2. Confidential transactions: Confidential transactions on the Liquid Network allow users to hide the amounts being transferred in a transaction, while still ensuring that the transaction is valid and the inputs and outputs balance. This helps to improve privacy on the network.
  3. 2-of-2 multisignature transactions: The Liquid Network uses 2-of-2 multisignature transactions to secure assets, which require two private keys to sign a transaction before it can be broadcast to the network. This helps to prevent unauthorized access to assets.
  4. Federation-based security: The Liquid Network uses a federation of trusted nodes to validate and secure the network, which helps to prevent attacks and improve the overall security of the network.

The security of a liquid network wallet is based on the security of the private keys associated with it. These keys are used to sign transactions and provide proof of ownership of the funds in the wallet. In order to secure these keys, they should be kept confidential and stored in a secure location, such as a hardware wallet or a password-protected file. It is also important to use strong and unique passwords for any accounts or systems that hold these keys. Additionally, users should be cautious when handling suspicious emails or websites that may be attempting to phish for their private keys.

The Lightning Network is a layer 2 payment protocol that operates on top of the Bitcoin blockchain. It allows users to send and receive payments in a faster and more scalable way by creating payment channels between participating nodes. These channels can be thought of as a kind of "off-chain" layer, where transactions are settled directly between the participating nodes, rather than being broadcasted to the entire network for confirmation. This means that Lightning Network transactions don't require the same level of mining power and therefore can be settled much more quickly than on-chain transactions. Additionally, because the Lightning Network is a layer 2 protocol, it can operate independently of the underlying blockchain, allowing it to support other cryptocurrencies in addition to Bitcoin.

Svelte Kit is a framework for building web applications using the Svelte component framework. It provides tools for building, testing, and deploying Svelte apps, as well as a set of conventions for structuring and organizing your app's code.

Tailwind CSS is a utility-first CSS framework. It provides a set of low-level CSS classes that can be combined to style almost any element in a web page. Instead of defining complex CSS rules, you can use Tailwind's classes to quickly style your elements with a minimal amount of code.

LiquidJS is a JavaScript library for interacting with the Bitcoin Liquid Network. It provides functions for creating and signing Liquid transactions, as well as accessing data on the Liquid blockchain.

Postgres is a powerful, open-source object-relational database management system. It is often used as a data store for web applications. Hasura is a GraphQL engine that sits on top of Postgres and other data sources. It provides a GraphQL API for querying and mutating data in the database, as well as real-time subscriptions and automatic schema generation.

Hasura Backend Plus is an extension to the Hasura GraphQL engine that adds support for user authentication and authorization using JSON web tokens (JWTs). It provides a set of GraphQL mutations and queries for creating and managing user accounts, as well as a set of middleware functions for protecting your GraphQL resolvers with JWT-based authentication and authorization checks.

IPFS (InterPlanetary File System) is a peer-to-peer protocol for sharing and storing files. It allows you to store and retrieve files based on their content, rather than their location. IPFS uses a distributed hash table (DHT) to find the nodes that store a particular file, and it can retrieve the file from multiple nodes in parallel to improve performance.

Fastify is a fast and low-footprint Node.js web framework. It provides a simple and expressive API for building web servers, as well as a set of plugins for common tasks like parsing HTTP requests, handling CORS headers, and serving static files.

Esplora is a block explorer for the Bitcoin Liquid Network. It provides a web-based interface for searching and browsing the Liquid blockchain, as well as a set of APIs for accessing blockchain data programmatically.

The Liquid Asset Registry is a decentralized database of metadata for assets on the Bitcoin Liquid Network. It allows users to register information about their assets, such as their name, symbol, and issuer, which can then be accessed by external wallets and applications.

coinos is a cryptocurrency exchange that supports trading between Bitcoin and the Liquid Network's native asset, L-BTC. It provides APIs for exchanging BTC and L-BTC, as well as for managing user accounts and conducting trades.

pnpm (Performance NPM) is a package manager for Node.js packages. It is similar to npm, but it is designed to be faster and more efficient by using a local cache and a flat dependency tree.

Docker is a containerization platform that allows you to package and deploy your applications as lightweight, portable containers. You can use Docker to run your applications in isolated environments, making it easy to deploy and manage your apps on any server or cloud provider.

The Hasura CLI (Command Line Interface) is a tool for managing Hasura GraphQL engines. It provides commands for creating and managing Hasura projects, as well as for running GraphQL queries and mutations against a Hasura instance.

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It allows developers to run JavaScript on the server side, creating server-side applications with JavaScript. Node.js uses an event-driven, non-blocking I/O model, which makes it lightweight and efficient. It is commonly used for building fast, scalable network applications. In addition to its widespread use on the server side, Node.js can also be used to build command-line tools and for creating browser applications.

JWT-based user authentication is a method for securely authenticating users using JSON Web Tokens (JWTs). In this system, the server creates a JWT when a user successfully logs in and sends it back to the client. The client stores the JWT and sends it back to the server on subsequent requests to prove that the user is authenticated.

The JWT is digitally signed using a secret key, so the server can verify that the JWT was not tampered with. It may also contain additional claims, such as the user's identity, permissions, and other information.

This method is useful because it allows the server to authenticate users without maintaining a session state, which can be more scalable and secure than other methods. It also allows the client to authenticate itself without sending the user's credentials on each request.

Cloudflare is a content delivery network (CDN) and distributed domain name server (DNS) service. It provides a global network of data centers that helps to improve the performance and security of websites. When a user accesses a website that is using Cloudflare, their request is routed through the nearest data center, which serves the content to the user and helps to reduce the load on the origin server. In addition to serving content, Cloudflare also offers a range of security features, such as a web application firewall (WAF), DDoS protection, and SSL/TLS encryption, to help protect websites from online threats.

SSL SHA-256 ECDSA (Elliptic Curve Digital Signature Algorithm) is a combination of two cryptographic techniques used for creating and verifying digital signatures.

SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function that takes an input (or 'message') and returns a fixed-size string of characters, uniquely representing the input. It is a one-way function, meaning that it is almost impossible to recreate the original message from the hash value.

ECDSA, on the other hand, is a public-key cryptography algorithm that allows two parties to create and verify digital signatures. It involves the use of an elliptic curve and a private and public key pair. The private key is used to create the signature, and the public key is used to verify it.

When combined, these two techniques can be used to securely sign and verify messages and documents, ensuring their authenticity and integrity.


Your Digital Assets are held on The InterPlanetary File System (IPFS) is a peer-to-peer protocol for sharing and storing files on a distributed network. It aims to replace traditional centralised methods of storing and sharing files, such as HTTP, with a distributed system that is more resilient, efficient, and censorship-resistant.

In the IPFS network, each file is assigned a unique identifier known as a hash. When a file is added to the IPFS network, it is divided into smaller chunks and distributed across multiple nodes, or "peers," in the network. The file can then be accessed by other users by requesting the file's hash from the network.

One of the key features of the IPFS network is that it is content-addressed, meaning that each file is identified by its content rather than its location. This allows users to access the same file from any node in the network, even if the file has moved or been deleted from its original location.

The IPFS network is decentralized, meaning that it is not controlled by any single entity. Instead, it relies on a distributed network of nodes to store and share files. This makes the IPFS network more resistant to censorship and downtime, as there is no central point of failure.

Overall, the IPFS network is designed to be a more efficient, decentralized, and censorship-resistant alternative to traditional methods of storing and sharing files on the internet.

Developers Wanted, Contribute and help us build future wiser together. As Satoshi & Hal intended.  Dont Trust.. Verify

JUNGLELABᵀᴹ
Upload, collect, and transact rare digital assets on the Liquid Network