Skip to content

[FEATURE]:Week 3 #7

Description

@aniket866

Feature and its Use Cases

Finalizing & Completing the Contract Repository: Conditional Orders, NatSpec, & Slither Integration

Description

This issue tracks the final stages of completing the Windmill EVM contracts. We need to implement advanced order types, complete the codebase documentation, and run automated static analysis to ensure production readiness.


Scope of Work

1. Stop-Loss & Take-Profit Conditional Orders

Introduce conditional execution logic to allow users to set price-based exit thresholds.

Features to Implement

  • Extend the Order struct or create a new conditional order structure to support:

    • triggerPrice
    • Condition types:
      • Stop-Loss
      • Take-Profit
  • Add validation logic to ensure conditional orders cannot be matched until their respective price threshold conditions are satisfied on-chain.

  • Implement price feed query integration using:

    • Existing price curves, or
    • Oracle-based price checks
  • Add comprehensive unit tests to verify:

    • Orders trigger correctly when conditions are met.
    • Orders revert when matched outside their configured bounds.
    • Edge cases around exact trigger prices.

2. NatSpec Documentation Improvements

Document the entire codebase to improve maintainability, readability, and compatibility with developer tooling.

Tasks

Add complete Ethereum Natural Language Specification (NatSpec) comments:

  • @title
  • @notice
  • @dev
  • @param
  • @return

For all:

  • Public functions
  • External functions
  • Events
  • Custom errors

In:

  • IWindmillExchange.sol
  • WindmillExchange.sol

Additionally:

  • Document all libraries.
  • Document storage layouts and mappings.
  • Improve inline developer comments where necessary.

3. Security Audit & Slither Checks

Integrate automated static analysis to identify security issues early in the development lifecycle.

Tasks

  • Configure Slither GitHub Actions workflow (security-slither.yml) to run on:

    • Push events
    • Pull Requests
  • Review and fix all:

    • High severity findings
    • Medium severity findings
  • Add a slither.config.json file to:

    • Suppress known false positives
    • Ignore safe compiler behaviors
    • Standardize project analysis settings
  • Ensure CI passes successfully after all fixes

Additional Context

N/A

Code of Conduct

  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions