Add JustLend DAO Lending skill#8
Conversation
|
Thank you for this comprehensive JustLend integration! Lending and borrowing capabilities are foundational for maximizing an agent's capital efficiency, and we have this PR on our radar. We are currently establishing whitelisting mechanisms and security standards for core capabilities, so the merge of this large-scale DeFi Skill will be postponed. Since lending inherently carries liquidation risks, to meet our merge criteria, we highly recommend adding monitoring logic for the Health Factor. For example: How does the agent estimate the new health factor before borrowing? How can we set a safety threshold (e.g., 1.2) to prevent risky borrowing behaviors? |
|
Updated to address review feedback:
|
|
Thanks for the update. I re-checked the latest head after your comment. I still see one blocking issue before approval: the supported market table in |
…ad-only client - Update all 7 jToken addresses in SKILL.md to match justlend_contracts.json - Add missing WIN and BTC markets to the supported markets table - Add getTronWebReadOnly() to utils.js for queries that don't need a private key - markets.js: switch to getTronWebReadOnly() (fully read-only, no key required) - position.js: use getTronWebReadOnly() when explicit wallet address provided - SKILL.md/README.md: fix cd path from justlend to justlend-skill
|
I was able to install this PR locally, but I could not validate the write-path in our current Nile QA setup.
After checking Please clarify the intended scope:
|
JustLend contract addresses and market configs are defined for TRON Mainnet only. Added explicit notices so QA does not attempt Nile/Shasta validation.
|
I would have added testnet support, but I wasn't able to find any deployments on testnet |
boboliu-1010
left a comment
There was a problem hiding this comment.
Static review found two blocking issues:
repay.jsmishandlesTRX all: the script mapsalltoMAX_UINT256, but in the native TRX branch it then sendscallValue: 0, sonode scripts/repay.js TRX allsubmits a transaction that does not repay the outstanding borrow.borrow.jsestimates health factor before processing the optional--collateralmarket entry. That means a borrow can be rejected based on the pre-entry state even when the user explicitly asked to enable collateral first. The safeguard needs to reflect the post-entry state, or the collateral entry has to happen before the estimate.
Summary
justlend-skillfor supplying and borrowing assets on JustLend DAO (TRON's largest lending protocol)Scripts
markets.js— Browse available lending marketsposition.js— View lending positions and healthsupply.js— Supply assets to earn interestwithdraw.js— Withdraw supplied assetsborrow.js— Borrow against collateralrepay.js— Repay borrowed assetsSource: https://github.com/M2M-TRC8004-Registry/justlend-skill