With this strategy, we are trying to find the right balance between risk and returns. We are weighting score and apr based on k parameter. This can be modeled as follows:
$max\ q(x) = \sum_{i=0}^{n} \frac{x_i}{tot} * (\frac{\frac{nextRate_i(x_i)}{maxNextRate} + k * \frac{nextScore_i(x_i)}{maxNextScore}}{k + 1})$
where n is the number of lending protocols used, x_i is the amount (in underlying) allocated in protocol i , nextRate(x_i) is a function which returns the new APR for protocol i after supplying x_i ,nextScore(x_i) is a function which returns the new Score for protocol i after supplying x_iamount of underlying, maxNextRate is the highest rate of all implemented protocols after supplying x_i amount, same for maxNextScore with regard to the score, tot is total amount to rebalance, finally k is a coefficient for expressing weights of score and apr (k = 1 means equally weighted, currently k = 2 so score weights twice the APR).
$tot=\sum_{i=0}^{n} x_i$