-
Notifications
You must be signed in to change notification settings - Fork 78
Add comprehensive Flow Credit Market (FCM) documentation #1626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This commit introduces complete documentation for Flow Credit Market (FCM), a DeFi yield platform that combines automated lending, yield farming strategies, and a synthetic stablecoin. ## Documentation Structure ### ALP (Automated Lending Platform) - 8 documents - Overview and architecture - Credit market mechanics with health factor calculations - Position lifecycle management - Automated rebalancing system - Liquidation mechanisms and safety features - MOET integration and role - DeFi Actions composability framework ### FCM (Flow Credit Market) - 4 documents - Product overview and component integration - Basics tutorial progressing from traditional lending to FCM - Technical architecture with data flow diagrams - Mathematical foundations with formulas and proofs ## Key Features - Visual mermaid diagrams throughout for clarity - Progressive learning path from basics to advanced topics - Cross-referenced sections linking related concepts - Practical examples with real-world scenarios - Mathematical formulas with step-by-step derivations - Professional narrative flow with minimal bullet points ## Content Highlights - Yield-powered liquidation prevention mechanism - Automated capital efficiency through rebalancing - Multi-component architecture (ALP + FYV + MOET) - Complete position lifecycle documentation - Security features and risk management - Integration patterns and best practices This documentation provides comprehensive coverage for users, developers, and DeFi builders looking to understand or integrate with FCM.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Replace non-existent flow-yield-vaults and moet directory links with placeholders
- Remove \text{} LaTeX commands causing acorn parsing errors in math.md
- All formulas now use plain text variables instead of \text{} wrapper
- Replace broken links: capital-flows.md, risk-management.md, integration.md - Convert all $$ LaTeX blocks to ```math code blocks for MDX compatibility - Remove LaTeX \sum and \in operators causing acorn parsing errors - Use plain mathematical notation instead of LaTeX commands
- Convert LaTeX math operators to Unicode equivalents (× ÷ ≤ ≥ ≈)
- Replace \frac{a}{b} with (a / b) notation
- Simplify subscripts from _{text} to _text
- Fix misaligned code block markers throughout document
- Remove all remaining LaTeX that causes MDX parsing errors
|
Instead of FCM as the sidebar title, I think having 'Flow Credit Market (FCM)' for discoverability would be more useful. I think it would also help a bit with LLMs. |
docs/defi/fcm/index.md
Outdated
|
|
||
| ### For Conservative Users | ||
|
|
||
| FCM provides liquidation protection through yield maintaining position health, flexible health targets allowing you to choose your risk tolerance (1.1-1.5), support for multiple collateral types including FLOW, stFLOW, USDC and more, and complete transparency with all logic on-chain and auditable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mention 'automatically' quite a few times in the overall doc. Also I think its worth pointing out frequency of rebalances or that they can occur many times in a given day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awkward wording: 'USDC and more, and complete...'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What word should we use instead of repeating automation/automatically/etc.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we can remove most of them and it will still flow as long as we clearly highlight in the beginning once that everything is executed automatically by FCM
Updated basics.md: - Converted bullet points to paragraphs for better readability - Added diagram styling to highlight key components - Added explanations for TracerStrategy and AutoBalancer - Enhanced composability section Updated math.md: - Fixed liquidation formulas with complete implementation details - Corrected collateral seizure calculations - Added proper debt ratio vs leverage distinction - Fixed mathematical notation and formatting issues - Improved formula parenthesis handling for clarity
Created complete FYV documentation with 9 files covering: - Core concepts: architecture, strategies, AutoBalancer, vault lifecycle - Advanced features: leveraged farming, scheduling system, cross-chain integration - Composability: DeFi Actions framework Documentation follows same structure and quality as ALP and FCM docs.
|
|
||
| **5. Liquidation**: User closes vault, strategy liquidates all positions (closes ALP position for leveraged strategies), converts all value to collateral, and returns final value to user. | ||
|
|
||
| ## Best Practices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who are these best practices for? Users of apps that leverage it?
|
|
||
| Despite atomicity guarantees, vaults can become stuck for several reasons: | ||
|
|
||
| 1. **Transaction failure** during reschedule due to gas issues or network congestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not super clear who pays for gas with the rescheduling or if you need to fund an account that sponsors the txns indefinitely
|
|
||
| ## mUSDCStrategy: Cross-Chain Yield Farming | ||
|
|
||
| The mUSDCStrategy leverages the EVM bridge to access Ethereum-compatible ERC4626 yield vaults. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, it's much clearer here than the previous reference I commented on. It's just using the Cross-VM bridge, the other doc I already left a comment on made it seem like it was going to a different chain that was EVM. I would change these references to Cross-VM instead of cross-chain if I'm understanding this piece correctly.
|
|
||
| ### Mitigation Strategies | ||
|
|
||
| **Bridge Audits**: Use only audited, established bridge infrastructure and verify escrow contract security. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a good one to highlight because there is only one cross-VM bridge and we created it.
| @@ -0,0 +1,440 @@ | |||
| --- | |||
| title: DeFi Actions | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should rename this to FYV DeFi actions because we already have a Flow Actions section of the docs
- Replace technical sequence diagrams with intuitive flow diagrams in architecture.md - Add clear asset flow visualization for deposit/auto-borrow and price drop recovery - Convert mermaid diagrams to tables and bullet points for better readability - Fix LaTeX math formulas (health factor, utilization, reserve factor) - Clarify MOET as primary debt token and unit of account - Add time-weighted fairness explanation for interest accrual - Update DeFi Actions section with link to Flow Actions documentation - Condense verbose sections into concise paragraphs - Fix incorrect borrowing capacity calculations in examples - Add security architecture explanation for fund protection
Added new MOET documentation section: - Basic concepts and role in FCM ecosystem - Tokenomics and supply mechanics - Stability mechanisms and peg maintenance - Integration guide for developers Updated existing documentation: - Refined ALP index page structure - Updated MOET role explanations in ALP docs - Improved FCM index page clarity
Remove anchor fragment from DeFi Actions PriceOracle link to resolve build error
Overview
This PR introduces comprehensive documentation for Flow Credit Market (FCM), a DeFi yield platform that combines automated lending, yield farming strategies, and a synthetic stablecoin.
Documentation Structure
ALP (Automated Lending Platform) - 8 documents
FCM (Flow Credit Market) - 4 documents
Key Features
✅ Visual Documentation - Extensive mermaid diagrams for clarity and understanding
✅ Progressive Learning - Structured path from basics to advanced topics
✅ Cross-Referenced - Links connecting related concepts across documents
✅ Practical Examples - Real-world scenarios with concrete numbers
✅ Mathematical Rigor - Step-by-step formula derivations
✅ Professional Writing - Clear narrative flow optimized for readability
Content Highlights
Documentation Quality
Target Audience
Testing