Skip to content

Latest commit

 

History

History
253 lines (198 loc) · 8.07 KB

File metadata and controls

253 lines (198 loc) · 8.07 KB

Weekly Challenge Template (SMC-Workshop)

Template for creating comprehensive weekly smart contract development challenges

📋 Challenge Overview

Week N: [Challenge Name]

Focus Area: [Primary learning objective]
Difficulty Level: [Beginner/Intermediate/Advanced]
Estimated Time: [X hours over Y days]
Prerequisites: [Required knowledge/skills]

🎯 Learning Objectives

Primary Goals

  • Master [specific concept/pattern]
  • Understand [key principle]
  • Implement [core functionality]
  • Apply [best practices]

Secondary Goals

  • Learn [additional concept]
  • Practice [skill development]
  • Explore [advanced topic]
  • Contribute [community value]

🛠️ Technical Requirements

Core Implementation

// Required contracts and features:
- [ContractName].sol: [Description]
- [InterfaceName].sol: [Description]
- [LibraryName].sol: [Description]
- [UtilityName].sol: [Description]

Key Features to Implement

  • Feature 1: [Description and requirements]
  • Feature 2: [Description and requirements]
  • Feature 3: [Description and requirements]
  • Feature 4: [Description and requirements]

OpenZeppelin Integration

// Required OpenZeppelin contracts:
- [ContractName]: [Purpose and usage]
- [ContractName]: [Purpose and usage]
- [ContractName]: [Purpose and usage]

🧪 Testing Requirements

Test Coverage Target

  • Minimum: 90% line coverage
  • Recommended: 95%+ line coverage
  • Test Types: Unit, Integration, Security, Gas

Test Categories

  • Unit Tests: Individual function testing
  • Integration Tests: Cross-contract interactions
  • Security Tests: Vulnerability and attack simulation
  • Gas Tests: Performance and optimization validation
  • Edge Case Tests: Boundary conditions and error handling

Required Test Scenarios

  • Happy Path: Normal operation flows
  • Error Conditions: Invalid inputs and edge cases
  • Security Scenarios: Attack prevention and protection
  • Gas Optimization: Efficiency and cost analysis

🔒 Security Requirements

Security Patterns

  • Access Control: Role-based permissions
  • Input Validation: Parameter checking and sanitization
  • Reentrancy Protection: Guard against reentrancy attacks
  • Integer Safety: Overflow/underflow protection
  • State Validation: Contract state consistency

Security Analysis

  • Static Analysis: Slither security scan
  • Dynamic Testing: Fuzz testing with Foundry
  • Manual Review: Code review and security audit
  • Vulnerability Assessment: Common attack pattern testing

📚 Documentation Requirements

Code Documentation

  • NatSpec Comments: All functions documented
  • Inline Comments: Complex logic explained
  • README: Comprehensive usage guide
  • API Documentation: Function signatures and parameters

Learning Documentation

  • Design Decisions: Technical choices and rationale
  • Lessons Learned: Key insights and discoveries
  • Challenges Faced: Problems and solutions
  • Best Practices: Recommended approaches

🚀 Deployment Requirements

Testnet Deployment

  • Network: [Sepolia/Base/Other]
  • Verification: Contract source code verified
  • Testing: Post-deployment functionality testing
  • Documentation: Deployment details and addresses

Deployment Checklist

  • Environment Setup: Network configuration
  • Gas Optimization: Cost-effective deployment
  • Verification: Source code verification
  • Testing: Post-deployment validation

🏆 Success Criteria

Technical Requirements

  • All core features implemented
  • 90%+ test coverage achieved
  • Security analysis passed
  • Gas optimization completed
  • Documentation complete

Learning Requirements

  • Key concepts understood
  • Best practices applied
  • Challenges overcome
  • Knowledge documented
  • Community contribution made

📊 Evaluation Rubric

Code Quality (25%)

  • Clean Code: Readable and maintainable
  • Best Practices: Following Solidity standards
  • Documentation: Comprehensive and clear
  • Organization: Well-structured and modular

Functionality (25%)

  • Requirements Met: All features implemented
  • Correctness: Logic works as intended
  • Edge Cases: Handles boundary conditions
  • Error Handling: Graceful failure management

Security (25%)

  • Vulnerability Free: No security issues
  • Best Practices: Security patterns applied
  • Testing: Security tests comprehensive
  • Analysis: Static analysis clean

Testing (25%)

  • Coverage: Meets coverage requirements
  • Quality: Tests are meaningful and effective
  • Scenarios: Covers happy path and edge cases
  • Documentation: Tests are well-documented

🎯 Challenge Phases

Phase 1: Planning (Day 1)

  • Review requirements and objectives
  • Design contract architecture
  • Plan testing strategy
  • Set up development environment

Phase 2: Implementation (Days 2-4)

  • Implement core contracts
  • Add required features
  • Write comprehensive tests
  • Apply security patterns

Phase 3: Testing & Security (Days 5-6)

  • Run full test suite
  • Perform security analysis
  • Optimize gas usage
  • Fix identified issues

Phase 4: Documentation & Deployment (Day 7)

  • Complete documentation
  • Deploy to testnet
  • Verify deployment
  • Submit for review

📝 Submission Requirements

Code Submission

  • GitHub Repository: Clean, organized code
  • Commit History: Clear, descriptive commits
  • Branch Structure: Proper branching strategy
  • Pull Request: Detailed PR description

Documentation Submission

  • README: Complete project overview
  • Technical Docs: Architecture and design decisions
  • Learning Docs: Lessons learned and insights
  • Deployment Docs: Setup and usage instructions

Verification Submission

  • Test Results: Coverage and test reports
  • Security Analysis: Slither and audit reports
  • Deployment Proof: Contract addresses and verification
  • Demo: Working demonstration or video

🏅 Badge Requirements

Completion Badge

  • All requirements met
  • Code quality standards met
  • Documentation complete
  • Community contribution made

Excellence Badge

  • Exceeds requirements
  • Innovative solutions
  • Outstanding documentation
  • Significant community contribution

Specialization Badge

  • Demonstrates expertise in specific area
  • Advanced implementation
  • Knowledge sharing
  • Mentoring others

🔄 Iteration and Improvement

Feedback Integration

  • Code Review: Incorporate feedback
  • Testing: Address test failures
  • Security: Fix security issues
  • Documentation: Improve clarity

Continuous Learning

  • Reflection: What did you learn?
  • Improvement: What would you do differently?
  • Sharing: How can you help others?
  • Next Steps: What's your next challenge?

Ready to tackle this challenge?

Start Challenge View Examples Get Help GitHub Repository

Last Updated: 2025-10-10 | Version: 1.0.0

SMC-Workshop: Master smart contract development through structured weekly challenges