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_i
amount 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).