IDO protocol is now open source

Overview

Project Overview

Uprock IDO Protocol facilitates Initial DEX Offerings (IDOs) with advanced features for managing token distribution, whitelisting, and fundraising. The project leverages the Anchor framework for Solana smart contracts and includes functionalities such as creating and updating fundraising pools, managing whitelisted users, and handling token distributions. The outlined commands and functions provide a comprehensive guide to deploying, testing, and interacting with the IDO protocol.

Smart Contract

The project is organized into several modules:

  • access_controls: Contains modules for enforcing access control policies, ensuring secure and authorized interactions with smart contract functions.
  • anchor_metaplex: Integrates with the Metaplex library, providing additional features and capabilities for handling NFTs and tokens.
  • errors: Defines custom error types used throughout the project.
  • instructions_ido_v1: Implements the core instructions and logic for the IDO protocol, including pool creation, user whitelisting, token deposits, claiming, and more.
  • state: Defines the data structures representing the state of the smart contracts, including pool information, whitelisted user details, and various statistics.

Devnet Keys

Following private keys (they should be in .keyparis folders) are being used in the smart contract code but not included in the repo. They will be used to keep the devnet program stable

Key Description
devKH8tdPeByT13FWMVcX48B43v3wB1Qsa2xfGvpttm.json Developer (admin) key
funJG6uooFXjJpALB6ExhnBefsPFJkamzy6Gfv7zN98.json Fundraiser (ido owner) key
ido5zRdfphtyeov8grJqBszfWquvTCAvRzGycSfPXuX.json Program (smart contract) key
poo4b5Lsyg5fMdrbmXkf6apxTNKQrAx4booXkbGVNNW.json Pool (IDO ID) key
TicpC2VhBZbknfc4RhYkdPty6SE4HjBozZS9umAMX1d.json Pre Required Token (TICKET)
tokBWvxCaa1AJnVUUbgeNHeVDJYbu1DpYXS9yTuvmjY.json Selling Token Mint
usdA7bUXh1kNAwhCmabJf7QmWsaTk4Mymk26aEsjAeB.json Quote Token (USDC) Mint
usrsq7DVNrLgaZPuuQcrNeFBLQe4i1ZrFGNofvC3Pfw.json User (IDO Participant) Key

Smart Contract Commands

The project includes several commands to deploy, test, and manage the IDO protocol. Ensure you have the necessary environment variables and keypairs configured as specified in the Project Setup section.

Airdrop

Get airdrop to the developer wallet (devnet & testnet only): make airdrop

Build

Build the Solana program: make build

Deploy

Deploy the Solana program: make deploy

Deploy with Resume

Deploy the Solana program with resume functionality (using a buffer): make deploy-resume buffer=

Test

Run the tests: make test

Test (Skip Build and Deploy)

Run the tests without building and deploying: make test-skip

Create Pool Example

Create a pool using the provided TypeScript example: make create-pool

Smart Contract Functions

The smart contract functions represent the core functionalities of the IDO protocol. These include:

  • create_pool: Admin-only function to create a fundraising pool with specified parameters.
  • update_pool: Admin-only function to update the parameters of an existing pool.
  • whitelist_nft and whitelist_ticket: Whitelist users by locking their NFTs or TICKET tokens during specific phases.
  • deposit_nft and deposit_ticket: Allow users to deposit NFTs or TICKET tokens during designated phases.
  • boost: A mechanism to boost participant allocations during specific phases.
  • unlock_nft and unlock_ticket: Unlock NFTs or TICKET tokens for users during the distribution phase.
  • raise: Raise funds by transferring base tokens from users to the fundraising pool.
  • claim: Allow users to claim their allocated tokens during the distribution phase.
  • force_claim: Admin-only function to forcefully claim tokens on behalf of users.
  • refund: Refund users if the raise date has not occurred yet.
  • close_pool: Admin-only function to close a fundraising pool.
  • close_whitelist_account: Admin-only function to close a whitelist account.
  • recover_nft, recover_ticket, recover_usdc: Admin-only functions to recover specific tokens.
  • migrate_ownership: Admin-only function to migrate ownership of the smart contract.
  • just_close_whitelist_account: Admin-only function to close a whitelist account without additional actions.
  • update_pool_rate: Admin-only function to update the rate of tokens for the fundraising pool.
  • force_raise: Admin-only function to forcefully raise funds.
  • update_whitelist_account: Admin-only function to update whitelist account details.

Refer to the source code for detailed information about each function's implementation and usage.

Note

Ensure that the Solana CLI is installed, dependencies are satisfied, and the environment is correctly configured before running any commands. Adjust environment variables, paths, and parameters as needed for your specific setup.

Developer Grant Program: Earn UPT Tokens

We're offering UPT tokens to developers who contribute valuable code to the IDO protocol. Here's how you can earn tokens:

Contribute to Key Features:

  • Add WNS support.
  • Add Token2022 support.
  • Upgrade Anchor version.
  • Implement a fair launch feature.
  • Permissionless pools
    • A frontend for permissionless IDO pool creation & management

Reward Criteria:

We'll review pull requests and reward contributions based on complexity, utility, and overall impact on the community.

Why Contribute?

Earn Rewards: Get UPT tokens for your contributions.
Make an Impact: Help us enhance our project and benefit the ecosystem.

Submit your pull requests, and letโ€™s innovate together!

License

MIT

You might also like...
Automated security testing for open source libraries and applications.

autovet continuously searches for security breaches in open source libraries and applications. Recently processed packages package version channel las

Open-source tool to enforce privacy & security best-practices on Windows and macOS, because privacy is sexy ๐Ÿ‘๐Ÿ†

privacy-sexy Open-source tool to enforce privacy & security best-practices on Windows and MacOs, because privacy is sexy ๐Ÿ‘ ๐Ÿ† privacy-sexy is a data-

A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords

password-generator-pro A fast, simple and powerful open-source cross platform utility tool for generating strong, unique and random passwords. Feature

Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

An open source Rust high performance cryptocurrency trading API with support for multiple exchanges and language wrappers. written in rust(๐Ÿฆ€) with โค๏ธ

Les.rs - Rust Cryptocurrency Exchange Library An open source Rust high performance cryptocurrency trading API with support for multiple exchanges and

Simple, reliable, open-source contract verification built for an L2 centric Ethereum ecosystem

Cove This repo contains the backend verification1 code for Cove, a simple, reliable, open-source contract verification built for an L2 centric Ethereu

[Open Source] Blockchain Decentralized Lightweight VPN in Rust
[Open Source] Blockchain Decentralized Lightweight VPN in Rust

[Open Source] Blockchain Decentralized Lightweight VPN in Rust DCVPN_Rust (Decentralized VPN in Rust) is an open-source initiative started by @anandgo

Notabena, the pure Rust open-source note-taking app.

Notabena About Notabena is the free and open source note-taking app, written in pure Rust. Features These are our current planned features. (Most feat

An open source, high performance limit order book for the Seaport smart contracts. Implemented in Rust using ethers-rs, this offers a turnkey option for digital asset marketplaces.

Quay Quay is an open source, high performance backend for the Seaport smart contracts. The project is implemented in Rust, using Postgres as a storage

Owner
UpRock
UpRock
Open source Rust implementation of the Witnet decentralized oracle protocol, including full node and wallet backend ๐Ÿ‘๏ธ๐Ÿฆ€

witnet-rust is an open source implementation of the Witnet Decentralized Oracle Network protocol written in Rust. Components witnet-rust implements ma

The Witnet Project 155 Nov 21, 2022
An open source desktop wallet for nano and banano with end-to-end encrypted, on chain messaging using the dagchat protocol.

An open source wallet with end-to-end encrypted, on chain messaging for nano and banano using the dagchat protocol.

derfarctor 22 Nov 6, 2022
โ› An open protocol for launching liquidity mining programs on Solana.

โ› Quarry An open protocol for launching liquidity mining programs on Solana. Background Quarry was built with the intention of helping more Solana pro

Quarry Protocol 207 Dec 19, 2022
An extensible open-source framework for creating private/permissioned blockchain applications

Exonum Status: Project info: Community: Exonum is an extensible open-source framework for creating blockchain applications. Exonum can be used to crea

Exonum 1.2k Jan 1, 2023
HyperCube is a free and open source blockchain project for everyone to use.

XPZ Public Chain HyperCube is a free and open source blockchain project for everyone to use. ๆ—ฅๆœฌ่ชž ็ฎ€ไฝ“ไธญๆ–‡ ๆญฃ้ซ”ไธญๆ–‡ HyperCube Wiki Wha is HyperCube HyperCube i

null 949 Dec 31, 2022
Crates - A collection of open source Rust crates from iqlusion

iqlusion crates ?? This repository contains a set of Apache 2.0-licensed packages (a.k.a. "crates") for the Rust programming language, contributed to

iqlusion 335 Dec 26, 2022
CKB's vm, based on open source RISC-V ISA

Nervos CKB VM About CKB VM CKB VM is a pure software implementation of the RISC-V instruction set used as scripting VM in CKB. Right now it implements

Nervos Network 297 Jan 3, 2023
Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Outp0st is an open-source UI tool to enable next-level team collaboration on dApp development over Terra blockchain

Genolis 2 May 4, 2022
Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets

Tradechain is an open source blockchain designed for fast trading & interoperability for new, existing assets. Help build the future of trading with other Tradians.

Matt Shaver 5 Jul 5, 2022
Open-Source Gamestreaming SDK

RhinoStream SDK OpenSource AppStream SDK aims to be (or GameStream) equivalent of FFMpeg or GStreamer aimed for use by developers. Stats for 2560x1440

null 4 Nov 22, 2022