{"id":27120670,"url":"https://github.com/potlock/fair-launch","last_synced_at":"2025-04-07T10:07:16.190Z","repository":{"id":280791974,"uuid":"939750656","full_name":"PotLock/fair-launch","owner":"PotLock","description":"Fair launch mecnaism across different chains starting with Soalan","archived":false,"fork":false,"pushed_at":"2025-03-31T08:34:31.000Z","size":332,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-03-31T09:32:28.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PotLock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-27T03:38:05.000Z","updated_at":"2025-03-23T16:36:47.000Z","dependencies_parsed_at":"2025-03-05T10:42:49.456Z","dependency_job_id":"1efcd162-1c8f-45c8-a725-2207c1c2ccbd","html_url":"https://github.com/PotLock/fair-launch","commit_stats":null,"previous_names":["potlock/fair-launch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Ffair-launch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Ffair-launch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Ffair-launch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PotLock%2Ffair-launch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PotLock","download_url":"https://codeload.github.com/PotLock/fair-launch/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631812,"owners_count":20970065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-07T10:07:15.746Z","updated_at":"2025-04-07T10:07:16.180Z","avatar_url":"https://github.com/PotLock.png","language":"Rust","readme":"\n# Fair launch mechanism across different chains starting with Solana\n\nA Solana smart contract implementing customizable bonding curves with fee distribution and liquidity management capabilities.\n\n## Overview\n\nThis smart contract implements an launchpad using bonding curves. It supports multiple curve types, fee collection and distribution, and liquidity management features.\n\n-\u003e Fair launch mechanism with fully customizable business logic\n\n\n## Features\n\n### Bonding Curve Types\n- **Linear Curve**: Price increases linearly with supply\n- **Quadratic Curve**: Price increases quadratically with supply\n\n### Core Functionality\n1. **Buy Tokens**\n   - Calculate token price based on selected curve type\n   - Apply fees\n   - Update reserves and supply\n   - Distribute fees to configured recipients\n\n2. **Sell Tokens**\n   - Calculate token value based on selected curve type\n   - Apply fees\n   - Update reserves and supply\n   - Distribute fees to configured recipients\n\n3. **Liquidity Management**\n   - Add liquidity with configurable lock periods\n   - Remove liquidity after lock period expires\n\n### Fee Management\n- Configurable fee percentage (basis points)\n- Multiple fee recipients with customizable share ratios\n- Claimable accumulated fees for recipients\n\n### Governance\n\n\n\n## How to test \n\n1. Install \n```\nyarn install\n```\n\n2. Add your private key in the config folder\n\n2.1 Signer on `~/.config/solana/id.json` (default signer for anchor config)\n\n2.2 Fee Recipient on `~/.config/solana/id2.json` and `~/.config/solana/id3.json`\n\n\n3. Run script to create token\n\nNoted: Fill the `SIGNER_PRIVATE_KEY` and `USER_PRIVATE_KEY` in the `.env` file\n\n```\nyarn create-token\n```\n\nResult\n\n```\nMint: 3YChZhQqYpriRAiNunKLRxF5jnTuj97RE4SHBBHNAJsu\nATA: 5ZoKnNrLwDw5FSgjuA7S7uSEsYPDHrhPzQ7bUTZxdtSa\n```\n\n4. Run tests\n\nNoted: Replace your mint account in the `tests/bonding-curve.ts` file\n\n```js\nconst mint = new PublicKey(\"3YChZhQqYpriRAiNunKLRxF5jnTuj97RE4SHBBHNAJsu\");\n```\n\nRun test \n```\nanchor test\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Ffair-launch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotlock%2Ffair-launch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotlock%2Ffair-launch/lists"}