You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We discussed a potential long-term solution for the borrower exit functionality, which addresses both the need for atomically linked operations and optimization for credit compensation.
Proposed Solution
We identified two long-term solutions that should be implemented after solving the optimal deleveraging strategy on the backend:
Smart Multicall: A mechanism that passes parameters from one function to the next atomically, ensuring that credit position IDs generated in buyCreditMarket can be used directly in compensate.
BorrowerExit Function: A specific function like borrowerExit that handles the entire process, taking inputs from the first operation and applying them in the second, ensuring seamless operation without needing separate multicalls.
Both approaches depend on having the "optimal deleveraging strategy" in the backend, which should:
Evaluate the credit of the borrower willing to exit.
Optimize new credit creation based on yield and temporal constraints (credit.dueDate <= debt.dueDate).
Risks and Considerations
Frontrunning Risk: There is a small risk of transactions being frontrun, especially in scenarios where credit position counts change between getPositionsCount and buyCreditMarket operations. While the risk on Base might be low, we should account for it in the design.
Dealing with Suboptimal Transactions: In cases where frontrunning invalidates an optimal compensation strategy, consider fallback mechanisms such as partial compensation or transaction failure.
Description
We discussed a potential long-term solution for the borrower exit functionality, which addresses both the need for atomically linked operations and optimization for credit compensation.
Proposed Solution
We identified two long-term solutions that should be implemented after solving the optimal deleveraging strategy on the backend:
Both approaches depend on having the "optimal deleveraging strategy" in the backend, which should:
Risks and Considerations
https://t.me/c/1852288641/164/9647
The text was updated successfully, but these errors were encountered: