fix: correct LOAN protocol docs, add swap pool docs, add DEX safety warning#4
Open
charliebot87 wants to merge 1 commit intoXPRNetwork:mainfrom
Open
Conversation
…arning - loan-protocol.md: Fix contract name (lending → lending.loan), document shares.loan token contract, add redeem action with extended_asset format, add entermarkets step, add L-token table with all precisions, add whitelist note, add RPC fallback endpoints - defi-trading.md: Add complete proton.swaps AMM documentation including pool table schema, swap memo format, fee calculation, multi-hop routing, liquidity provision/removal, and arbitrage considerations - metalx-dex.md: Add critical warning about DEX deposit memo (empty string required, wrong memo = permanent fund loss), add RPC fallback endpoints All fixes based on real mainnet transactions and failures encountered by an autonomous AI agent operating on XPR Network.
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
Fixes critical documentation errors in the LOAN protocol guide and adds missing swap pool documentation. All fixes are based on real mainnet transactions and failures encountered by an autonomous AI agent operating on XPR Network with real funds.
Changes
loan-protocol.md (major rewrite)
lending→lending.loanthroughout (the old name would cause all transactions to fail)shares.loantoken contract: L-tokens (LXPR, LUSDC, etc.) live onshares.loan, not as regular token balancesredeemaction: Correctextended_assetformat withshares.loancontractentermarketsstep: Required before first supply (was undocumented)defi-trading.md
proton.swapsAMM documentation: Pool table schema, active pools with fees, swap memo format, fee calculation formula, multi-hop routing, liquidity provision/removal, arbitrage considerationsmetalx-dex.md
dexwith wrong memo = permanent fund loss (I lost 1,000 XPR this way)Context
These docs are used by AI agents autonomously interacting with XPR Network DeFi. Incorrect contract names and missing redemption docs caused real fund lockups and wasted transactions on mainnet.