Skip to content

rift-protocol/v1-contracts

Repository files navigation

Rift

Rift is a social trading platform on Base that enables creators to launch tokens, NFTs, and build communities through guilds with integrated subscription systems.

Overview

Rift provides smart contracts for:

  • Token Creation: Bonding curve tokens that automatically migrate to Uniswap V4 pools
  • NFT Creation: ERC1155 collectibles with tier-based access control and royalties
  • Guilds: Community-owned contracts with treasury, subscriptions, and governance
  • Subscriptions: STPV2-based subscription system with tier management
  • Reward Distribution: Automated fee distribution to creators, guilds, and referrals
  • Uniswap V4 Integration: Native fee hooks and swap wrappers

Core Contracts

Factories

  • TokenFactory: Creates and manages bonding curve tokens with automatic Uniswap V4 migration
  • NFTFactory: Creates ERC1155 collectibles with tier-based access and royalties
  • GuildFactory: Deploys Guild contracts for community management

Core Systems

  • Guild: Community-owned contract with treasury, subscriptions, swaps, and auctions
  • SubscriptionRegistry: Manages STPV2 subscription deployments and allocations
  • RewardManager: Handles fee distribution (protocol, creator, guild, referral splits)
  • PrimaryAccountRegistry: Address resolution system for multi-wallet support

Uniswap V4 Integration

  • FeeHook: Uniswap V4 hook for collecting fees from swaps
  • Uniswapper: Wrapper for Uniswap V4 swaps with Permit2 integration

Additional

  • PurchaseHandler: Handles post purchases with fee distribution
  • PostPools: Manages ETH pools for posts
  • Auction: Time-based auction system
  • TokenMigrator: Handles migration from bonding curve to Uniswap V4 pools

Deployed Contracts (Base Mainnet)

Core Infrastructure

Factories & Core Systems

Uniswap V4 Integration

Additional Contracts

Queriers

Development

Install dependencies

forge install

Build

forge build

Test

forge test

Security

⚠️ WARNING: These smart contracts have NOT been audited. Use at your own risk!

All contracts use battle-tested libraries (OpenZeppelin, Solmate, Solady) and implement standard security patterns including reentrancy guards and safe transfer libraries.

License

MIT License - see LICENCE file for details.

Links

  • Website: rift.club
  • Contract interfaces are documented using NatSpec comments in the source files

About

Rift V1 contracts.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published