Skip to content

Periphery smart contracts for the DraftTracks Artist DEX, enabling token-based swaps, liquidity provisioning, and artist token interactions on Uniswap v3 infrastructure.

License

Notifications You must be signed in to change notification settings

drafttracks/drafttracks-v3-periphery

 
 

Repository files navigation

Drafttracks v3 Periphery

🧩 Periphery smart contracts for the DraftTracks Decentralized Artist Exchange (DEX), adapted from Uniswap v3. Enables token-based swaps, liquidity provisioning, and artist token interactions using $TRACK.


🔍 Overview

This repository contains the periphery contracts used by the Drafttracks protocol. These contracts provide the logic required to interact with the drafttracks-v3-core, including:

  • Routing for token swaps (e.g. $TRACK ↔ artist tokens)
  • Non-fungible LP position management
  • Quoting utilities and liquidity math
  • Drafttracks-specific extensions for artist token use cases

The Drafttracks DEX empowers fans to support artists (human or AI) by trading artist tokens, staking into battles, and fueling tokenized music careers through $TRACK.


📦 Included Contracts

Contract Description
SwapRouter.sol Main interface for executing token swaps
NonfungiblePositionManager.sol Manages Uniswap v3 liquidity positions (minted as NFTs)
Quoter.sol Utility contract for estimating swap outcomes
DrafttracksHooks.sol (planned) (Optional) Hook interface for Drafttracks voting, tipping, or AI reward extensions

🔗 Related Repos


🚀 Getting Started

1. Clone the Repo

git clone https://github.com/Drafttracks/drafttracks-v3-periphery.git
cd drafttracks-v3-periphery
npm install

2. Compile Contracts

npm run compile

3. Configure for Deployment (Hardhat)

Edit your hardhat.config.js:

require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();

module.exports = {
  solidity: "0.8.20",
  networks: {
    polygon: {
      url: process.env.POLYGON_RPC_URL,
      accounts: [process.env.PRIVATE_KEY],
    },
  },
};

Add .env with:

PRIVATE_KEY=your_wallet_private_key
POLYGON_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/YOUR_KEY

🧪 Deployment Order (Typical)

  1. Deploy core DEX contracts (drafttracks-v3-core)

  2. Deploy:

    • SwapRouter
    • NonfungiblePositionManager
    • $TRACK token
    • Any artist tokens via ArtistTokenFactory
  3. Create LP pools for $TRACK / $ARTIST

  4. Use SwapRouter to allow trading via frontend or app


🎨 Use Cases

  • 🔁 Enable swaps between $TRACK and artist tokens
  • 🎧 Support LP incentives via artist battles or tipping
  • 🖼 Use LP NFTs for gamified fan rewards or battle achievements
  • 🧠 Integrate with Drafttracks AI Producers (e.g. AI battle logic, drop planning)

🔐 License

This repo is originally derived from Uniswap v3-periphery, licensed under Business Source License 1.1 (BSL-1.1) by Uniswap Labs. Commercial use is restricted until April 1, 2025.


📣 Contact

Built and maintained by the Drafttracks protocol team.

For integration requests, security disclosures, or contributions, reach out to:

  • 💼 Jason Amos – jay@drafttracks.com
  • 💬 Join the waitlist & community: drafttracks.com

About

Periphery smart contracts for the DraftTracks Artist DEX, enabling token-based swaps, liquidity provisioning, and artist token interactions on Uniswap v3 infrastructure.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 57.3%
  • Solidity 42.7%