DEV Community

Cover image for The Midnight Launchpad
Joseph Martins
Joseph Martins

Posted on

The Midnight Launchpad

Midnight Network Challenge: Protect That Data

This is a submission for the Midnight Network "Privacy First" Challenge - Protect That Data prompt

What I Built

The Midnight Launchpad is a decentralized application (dApp) built on the Midnight blockchain, designed to facilitate seamless, secure, and private token generation and token sales.

Unlike traditional launchpads, The Midnight Launchpad is engineered with privacy at its core, ensuring that both project organizers (sale organizers), token generators, and community members (investors) can participate in fundraising activities without exposing sensitive information.

The Midnight Launchpad aims to empower developers to launch their projects with confidence while giving investors the peace of mind that their identity, financial details, and on-chain activity remain private and protected.

Demo

Midnight Launchpad Live Link

NB: Using the live link requires the local proof server to prove your transactions.

*Install proof server from midnight: *[https://docs.midnight.network/develop/tutorial/using/proof-server]

The Midnight Launchpad Github repository:

The Midnight Launchpad Dashboard

Step-by-step and well-detailed sales information form
Step One

Step Two

Step Three

Step Four

Token generation dashboard

Token generation page

How I Used Midnight's Technology

The Midnight Launchpad was built using Compact, Midnight’s domain-specific language for privacy-preserving smart contracts. By writing the core logic in Compact, I was able to enforce strict data protection rules at the protocol level rather than relying on external wrappers.

I used the Midnight JS Network library to seamlessly connect the Compact smart contract with the frontend interface. This allowed the DApp to interact with the network securely, handle transactions, and retrieve contract state without exposing sensitive data. The Typescript integration ensured that users could interact with the launchpad through a familiar web interface while still benefiting from Midnight’s privacy-preserving features under the hood.

Data Protection as a Core Feature

Privacy and data protection are fundamental to how the Midnight Launchpad is designed. Since it is built on the Midnight Network, the architecture leverages midnight privacy-preserving smart contracts (compact) to ensure sensitive information is never exposed on-chain or to unauthorized parties.

Key measures include:
Confidential Sale Participation: The identities of sale organizers, contributors, and the amounts contributed remain private. This protects participants from unwanted exposure while ensuring fair and secure fundraising.

Token Generation Privacy: Information about token creators and generated assets is shielded, ensuring that strategic project details are not prematurely leaked to competitors or malicious actors.

User Verification with Privacy: A (dummy) KYC mechanism was implemented to ensure only verified users can participate. Importantly, verification proofs are privacy-preserving—users prove compliance without revealing unnecessary personal data.

By embedding privacy into the core workflow, the Midnight Launchpad ensures compliance, fairness, and trust, while aligning with the Midnight Network’s mission: empowering users with control over their data.

Set Up Instructions / Tutorial

Below is a detailed guide on how to interact with the project locally

Pre-requisite

*Install compactc compiler (Guide): *[https://docs.midnight.network/develop/tutorial/building/]#midnight-compact-compiler

Install proof server from midnight: [https://docs.midnight.network/develop/tutorial/using/proof-server]

**Install prebaked proof server version (recommended): _[https://github.com/bricktowers/midnight-proof-server]

Token Aquisation: [https://docs.midnight.network/develop/tutorial/using/proof-server]

*Lace wallet setup: *[https://docs.midnight.network/develop/tutorial/using/chrome-ext]

Documentation:
The-Midnight-Launchpad-Documentation

NB: This project is a monorepo that utilizes turborepo.

`
/* Running the DApp locally*/

// Clone the repository locally
git clone "https://github.com/statera-protocol/statera-midnight-launchpad.git"
// Ensure your have the latest version or node version >=22
node -v

// Install dependencies from the root folder
yarn install

// Create a .env file in the launchpad-ui folder
cd app/launchpad-ui //from the root folder

// Add the content below
VITE_NETWORK_ID=TestNet
VITE_CONTRACT_ADDRESS=02008ef0d13efc0c4417b7a70fda5fa2c2b4590903107228f9ff572751a99637807b
VITE_INDEXER_URL=https://indexer.testnet-02.midnight.network/api/v1/graphql
VITE_INDEXER_WS_URL=wss://indexer.testnet-02.midnight.network/api/v1/graphql/ws
VITE_PROOF_SERVER_URI=http://13.53.62.251:6300/

// Go back to the root folder and compile the compact contract before building the entire package
yarn build:start

// Build all workspaces from the root folder
yarn build

// Move back into the UI folder to start the app
cd apps/launchpad-ui

// Start the app
yarn start // runs on PORT:8080
Enter fullscreen mode Exit fullscreen mode

`

*Your app should be running on PORT 8080 if instructions were correctly followed.
*

Publisher: @joseph_martins_3ddd332012

Thank you, Midnight Network!

Top comments (0)