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:
-
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
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
Orderstruct or create a new conditional order structure to support:triggerPriceAdd 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:
Add comprehensive unit tests to verify:
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@returnFor all:
In:
IWindmillExchange.solWindmillExchange.solAdditionally:
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:Review and fix all:
Add a
slither.config.jsonfile to:Ensure CI passes successfully after all fixes
Additional Context
N/A
Code of Conduct