feat: Add comprehensive SolidML example contracts#2
Open
giwaov wants to merge 1 commit intoOpenGradient:mainfrom
Open
feat: Add comprehensive SolidML example contracts#2giwaov wants to merge 1 commit intoOpenGradient:mainfrom
giwaov wants to merge 1 commit intoOpenGradient:mainfrom
Conversation
- DynamicFeeAMM: AMM with ML-predicted volatility for dynamic swap fees - LendingRiskAssessor: ML-based lending risk assessment with personalized rates - SentimentGatedMint: NFT minting gated by LLM sentiment analysis - AIGovernance: DAO governance with AI-powered proposal analysis and Q&A All contracts demonstrate production-ready patterns for: - TEE-secured ML inference - LLM chat integration - Historical data queries - Statistical preprocessing Updated README with detailed documentation, architecture diagrams, and usage guides.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a comprehensive suite of production-ready example contracts demonstrating OpenGradient's on-chain AI capabilities with the SolidML library.
New Contracts
1. DynamicFeeAMM (contracts/defi/DynamicFeeAMM.sol)
An Automated Market Maker that uses ML-predicted volatility to dynamically adjust swap fees (1-100 bps).
2. LendingRiskAssessor (contracts/defi/LendingRiskAssessor.sol)
ML-powered lending protocol with personalized risk assessment.
3. SentimentGatedMint (contracts/nft/SentimentGatedMint.sol)
NFT collection where minting eligibility is determined by LLM sentiment analysis.
4. AIGovernance (contracts/governance/AIGovernance.sol)
DAO governance system with AI-powered proposal analysis.
Documentation
Updated README.md with:
Testing
All contracts compile successfully and follow SolidML patterns from the official documentation and solid-ml repository.
Related
These examples complement the existing SDK examples and tee-gateway, providing Solidity developers with production-ready patterns for integrating OpenGradient's AI infrastructure.