epoch coordinator no valid optimisation solution
Closed this issue · 0 comments
xmxanuel commented
It is not guaranteed that the pool is always in a health state.
A health state means that all constraints can be satisfied. Loan repayments or a dropping of the NAV can violate certain pool constraints.
If the pool is in an unhealthy state the orders might not be able to move the pool state to healthy.
In that case the order solution which improves the current state the best should be chosen.
Changes in constraints
- split constraints into two groups
- pool constraints
- minSeniorRatio
- maxSeniorRatio
- maxReserve
- core constraints
- need to be always satisfied
New SubmitSolution Logic
Change submitSolution method to following logic
-
- check if current lender state satisfies all constraints if not:
- if yes. continue with standard score method
- if not: check if core constraint are satisfied
- if not return. solution not valid
- if yes continue
- if no full valid solution(satisfied pool and core) was submitted until now
- and only core constraints are satisfied
- calculate improvement score
- if the improvement score is better than the current => new best solution
introduce improvement score
- calculate new seniorEquity Ratio
- distance from newSeniorEquityRatio to (maxSeniorEquityRatio+minSeniorEquityRatio/2)
- smaller distance higher points
- equal points look at maxReserve
changes in in closeEpoch
- if the current state is not health calculate current improvement score