Project Title: Morpho Borrow Optimizer
Organization Name: Untangled
Organization Website and/or Social Media Links:
About Us + Prior Experience
Untangled is a credit investment infrastructure builder. Our products include Untangled Pool, a private credit onchain securitisation platform, Credio, a decentralized risk oracle, and Untangled Vault , a non-custodial vault protocol built on ERC-4626 and Safe wallet standards.
Untangled is backed by Fasanara Capital, an institutional asset manager based in London focusing on fintech private credits., Our team has extensive experience in credit risk management, RWA, lending protocol smart contract development. Some highlighted work include:
-
Launched Karmen Pool, a tokenized private credit pool on Celo for a French SME lending fintech
-
Developed stablecoin risk management framework and a Credio risk oracle streaming machine learning model predicting stablecoin depegs and zero knowledge proofs directly to smart contracts
-
Launching a yield coin backed by tokenized money market funds and ultra short duration private credits leveraging Untangled Vault technology. We have reached out to Morpho Labs team to become the curator of a vault and to whitelist this yield coin.
Contributors:
-
Manrui Tang: (Linkedin) Cofounder, TradFi and worked in blockchain since 2017, ex-Big 4, with degrees from Imperial College and LSE.
-
Quan Le: (Linkedin) Cofounder, TradFi and worked in blockchain since 2017, ex-Big 4, degrees in applied finance and investment.
-
Tan Phan: (Linkedin) Core developer of Untangled Vault, CS graduate from Hanoi University of Science and Technology.
-
Duong Nguyen: (Linkedin) Core developer of Credio contracts and simulation engines, Applied maths graduate from Hanoi University of Science and Technology.
-
Tuan Do: Developer of pyEVM environment, BE and DevOps, Applied maths graduate from Hanoi University of Science and Technology.
-
Minh Nguyen, (Linkedin) Developer of Untangled Pool, Auditor of Untangled Vault, Applied maths graduate from Hanoi University of Science and Technology.
Duong and Minh won the Ethereum Vietnam Buidlathon (2024), presented by Vitalik Buterin.
Tan, Duong won Chainlink Hackathon (2023) for privacy-preserving DAO voting.
Requested Budget: 75k MORPHO
Scope of Work
Why Morpho Borrow Optimizer
As a potential curator, a borrower and a builder on Morpho stack we recognize the advantages of the curated vault model but do concur with the finding in your sample proposal that, with markets spreading over 7 pages long, each with its own set of parameters, it would be difficult for a general borrower to choose the optimal one(s) and stay on top of the borrowing throughout its life. This could explain whilst some markets have high utilization rates, the overall utilization across the protocol is only around 40%.
The Morpho Borrow Optimizer will simplify the borrowing experience on Morpho by automating borrowing and monitoring decisions, leveraging Untangled Vault technology integrated with Safe and Credio, our risk oracle. It will optimize borrowing costs, mitigate liquidation risks, and provide borrowers with real-time monitoring and automated risk management.
Key deliverables:
-
Smart Borrowing Accounts: Borrowers will open smart borrowing accounts using Untangled Vault (with Safe integration). These accounts will track collateral, loans, and borrower-defined permissions for automated actions (borrowing, rebalancing, anti-liquidation).
-
Borrow Optimization Engine: Using machine learning and optimization algorithms, the engine will identify the most efficient borrowing route across Morpho markets. Factors considered include:
- Collateral type and amount.
- Interest rate mechanism, liquidation penalties, oracle risk, and market liquidity.
- Borrower constraints, such as cost limits, risk tolerance and borrowing amount.
-
Simulation of borrowing terms for transparency and approval before transactions are executed.
-
Market Monitoring System: The system will continuously monitor Morpho markets for:
- interest rates.
- Liquidation risks due to price trajectories of collaterals.
- Oracle risks or changes in market conditions including risk alerts from Morpho front end.
Borrowers will receive actionable insights and alerts to minimize risk.
- Automated Rebalancing and Anti-Liquidation Bots: Bots will:
- Rebalance loans across markets to optimize costs.
- Execute anti-liquidation actions, such as topping up collateral or reducing debt.
All actions will follow borrower-defined permissions enforced via Safe’s Zodiac Role Modifier module.
- Simulation and Agent-Based Modeling: The system could use agent-based modeling to optimize borrowing and rebalancing recommendations.
This solution will help Morpho borrowers avoid the complexities of navigating multiple markets, while reducing costs and minimizing liquidation risks.
Architecture and workflows
(1) Borrowing Account Creation: Borrowers open smart borrowing accounts (Untangled Vault technology, integrated with Safe). Borrower deposits collateral into the smart account.
(2) Model development
a. Borrow route optimization
- Objective: Minimize borrowing costs (interest rates + transaction costs + potential penalties).
- Constraints include:
- Ensure collateral amount meets the minimum LTV ratio for the selected market.
- Avoid markets with insufficient liquidity for the desired borrowing amount.
- Minimize risk exposure to liquidation.
b. Market monitoring
Interest Rate Monitoring:
- Compare the borrower’s current interest rate with rates in alternative markets.
- Trigger a rebalancing recommendation if savings exceed a threshold (e.g., 5% lower rate elsewhere).
Liquidation Risk Monitoring:
- Calculate real-time collateral health (collateral value relative to loan amount).
- If collateral-to-loan ratio approaches liquidation thresholds, suggest:
- Adding collateral.
- Reducing debt.
- Rebalancing to a safer market.
(3) Deployment: Once the model is selected it will be deployed to production together with a verification file using ezkl library.
(4) Oracle Data Update: A real-time data pipeline is fed to the model which in turn drives the model outputs. The outputs are updated to a custom oracle adapter contract
(5) Bot Actions:
- The bot (e.g., liquidator-js) monitors the Oracle adapter contracts and identifies a position at risk
- Prepares a transaction to rebalance or anti-liquidate actions.
(6) Credio Safe Module Validation:
- The bot submits the transaction to the Credio Safe Module.
- The module verifies the transaction against Oracle data (e.g., risk score > threshold) and zero-knowledge proof
(7) Smart Account (Safe) Execution:
- The module forwards the validated transaction to the Safe wallet.
- The Safe wallet executes the transaction, ensuring role and permission policies are followed.
Benefit for the Morpho Ecosystem
Borrowing on Morpho, while offering flexibility and market efficiency, can be more complex than traditional protocols like Aave or Compound due to the many market options available. This complexity may discourage borrowers with longer-term positions and low liquidation risk tolerance.
In summary, The Morpho Borrow Optimizer simplifies the borrowing experience by:
- Identifying optimal borrowing routes tailored to individual borrower constraints.
- Continuously monitoring and mitigating liquidation risks, even after the borrowing transaction.
- Automatically rebalancing loans across markets to minimize costs and maximize security.
Metrics
The primary metric for success will be achieving $5M TVL through borrowers using the Morpho Borrow Optimizer within six months of launch.
Timeline
The project will be completed in two months, including development, testing, and integration into Untangled’s frontend. Key milestones:
- Month 1:
- Finalize design and specifications following stakeholder consultation
- Develop Borrow Optimization Engine.
- Implement Market Monitoring System.
- Curate/develop bots for rebalancing and anti-liquidation.
- Month 2:
- Integrate the solution into Untangled’s existing frontend.
- Simulate borrowing workflows.
- Final testing and debugging.
Future Directions
Credio aims to be a public good that links machine learning model inferences to smart contracts in an automated, privacy preserving manner via zero knowledge proof. As it enables borrowing optimisation model outputs to interact with Morpho it could also support other use cases:
- Improve performance:
- The optimizer will be further improved with future iterations e.g., in terms of model efficacy, system latency and user experience.
- Other use cases e.g,:
- Support rebalancing between different stablecoin debt types to further optimize costs and reduce exposure to price volatility.
- Calling on modellers:
-
Credio is designed to decentralize model building to a community of data scientists and rating agencies. The best model will be chosen through a competition and a part of the service fees is to be shared to modellers.
-
Zero-knowledge model proof ensures that outputs come from trusted models without revealing their secrets, thereby protecting the modeller’s intellectual property.