Skip to content

Oband1/create-yield

Repository files navigation

Create Yield: Decentralized Investment DAO

A blockchain-powered platform for community-driven yield generation and collaborative investment strategies.

Overview

LoomDAO creates a decentralized governance structure that enables community-driven innovation in the textile and fashion industry. The platform allows members to:

  • Propose new sustainable fabric technologies and fashion concepts
  • Vote on funding allocations using quadratic voting
  • Share in the success of commercialized innovations
  • Participate in a structured project evaluation process
  • Manage milestone-based funding for approved projects

Architecture

The DAO operates through a single smart contract that manages membership, governance, proposal lifecycle, and treasury operations.

flowchart TD
    A[Member Registration] --> B[Token Allocation]
    C[Project Proposal] --> D[Proposal Phases]
    D --> E[Submission]
    D --> F[Discussion]
    D --> G[Voting]
    D --> H[Execution]
    G --> I[Quadratic Voting]
    H --> J[Milestone Funding]
    K[Treasury] --> J
    L[Expert Members] --> G
Loading

Core Components

  1. Membership System

    • Token-based membership
    • Expert member designation
    • Vote delegation capabilities
  2. Proposal Lifecycle

    • Four distinct phases: Submission, Discussion, Voting, Execution
    • Milestone-based funding distribution
    • Quadratic voting mechanism
  3. Treasury Management

    • Secure fund storage
    • Milestone-based disbursement
    • Balance tracking

Contract Documentation

loom-dao.clar

The main contract managing all DAO operations.

Key Functions

  1. Member Management
(define-public (register-member (token-amount uint) (is-expert bool)))
(define-public (delegate-votes (delegate principal)))
(define-public (remove-delegation))
  1. Proposal Management
(define-public (create-proposal (title (string-ascii 100)) 
                               (description (string-utf8 1000))
                               (link (string-ascii 255))
                               (funding-amount uint)
                               (milestones (list 10 {...}))))
  1. Voting and Execution
(define-public (vote-on-proposal (proposal-id uint) (vote-for bool)))
(define-public (execute-proposal (proposal-id uint)))
(define-public (complete-milestone (proposal-id uint) (milestone-index uint)))

Getting Started

Prerequisites

  • Clarinet
  • Stacks wallet
  • LOOM tokens for membership

Basic Usage

  1. Register as a member:
(contract-call? .loom-dao register-member u1000 false)
  1. Create a proposal:
(contract-call? .loom-dao create-proposal "Sustainable Cotton Alternative" 
                "Development of bamboo-based fabric" 
                "https://example.com/proposal" 
                u10000 
                milestones)
  1. Vote on a proposal:
(contract-call? .loom-dao vote-on-proposal u1 true)

Function Reference

Member Functions

Function Description Parameters
register-member Join the DAO token-amount: uint, is-expert: bool
delegate-votes Delegate voting power delegate: principal
remove-delegation Remove vote delegation None

Proposal Functions

Function Description Parameters
create-proposal Submit new proposal title: string, description: string, link: string, funding-amount: uint, milestones: list
vote-on-proposal Cast vote proposal-id: uint, vote-for: bool
finalize-proposal Complete voting phase proposal-id: uint

Development

Testing

  1. Clone the repository
  2. Install Clarinet
  3. Run tests:
clarinet test

Local Development

  1. Start Clarinet console:
clarinet console
  1. Deploy contract:
clarinet deploy

Security Considerations

Access Control

  • Only members can create proposals and vote
  • Milestone funding requires proper phase progression
  • Expert status changes restricted (admin function)

Treasury Security

  • Milestone-based fund release
  • Balance checks before disbursement
  • Proposal state validation

Voting Protection

  • One vote per proposal per member
  • Quadratic voting to prevent token concentration
  • Mandatory phase progression

Known Limitations

  • Simplified quadratic voting calculation
  • Basic treasury management
  • Limited proposal parameter validation

About

no description

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors