Revolving Pool: Decision Function

Decision Function

The decision function in the Tinlake contracts is using different weights to achieve the following order:

  1. DROP Redeem
  2. TIN Redeem
  3. TIN Invest
  4. DROP Invest
    uint                public weightSeniorRedeem  = 1000000;
    uint                public weightJuniorRedeem  =  100000;
    uint                public weightJuniorSupply =    10000;
    uint                public weightSeniorSupply =     1000;

Max Function:

max weightSeniorRedeem*DROP_Redeem + weightJuniorRedeem * TIN_Redeem + weightJuniorSupply*TIN_Invest + weightSeniorSupply*DROP_Invest

Tasks

  • Additional Research: Goal Programming. Does it makes sense, how we approach the problem after screening existing literature?
  • Can the weights be improved? Are there any edge cases we didn’t consider?
  • Can our order priority list be always guranteed, can we produce counter examples?
  • What should be the ideal weight difference factor? Currently it is 10x
    - Should we increase it?
  • Should we use preemptive goal programming or non-premetive goal programming?
  • If we use non-preemptive goal programming what are the bests weights?
    • Should we use a min function with penalization?

Intro Goal Programming

Problem can be seen as a Goal Programming Problem.

Web archive link:
http://web.archive.org/web/20180711215700/http://www.maths.ed.ac.uk/hall/Xpress/FICO_Docs/optimizer/HTML/section5004.html

Literature

Book

Relevant Papers

Questions:

  • Why are the different weights working if we only have 10x factor differences?
  • Could it be possible that our decision function would prefer dropInvest over tinRedeem?

Example 1:

11 drop invest order
1 tin redeem order

- Assuming both are not possible because the TINratio would break

DROP_invest_weight = 1
TIN_redeem_weight = 10
  • TIN_redeem should be always prefered over DROP_invest.
  • TIN_redeem, DROP_invest are both reducing the ratio
  • if we can’t satisfy both orders, we still have 21 other combinations
(1 tin redeem, 0 drop invest)
(1 tin redeem, 1 drop invest)
(1 tin redeem, 2 drop invest)
(1 tin redeem, 3 drop invest)
(1 tin redeem, 4 drop invest)
...
(0 tin redeem, 9 drop invest)
(0 tin redeem, 10 drop invest)
  • it is extremely unlikely that we can take exactly 10 drop invest or 1 tin redeem (same score increase) before the ratio breaks
  • everytime we take one more DROP_invest or one TIN_redeem the ratio decreases (costs)
  • we can see the negative impact on the ratio as costs
  • 1 tinRedeem needs to have the same costs on the TINRatio as 10 DROPInvest which is very unlikely, therefore the TIN redeem will be always prefered because of the higher score
  • if we look at the maxReserve constraint each invest (TIN or DROP) have the same costs
  • both of them bring use one point closer to the maxReserve
  • If TIN invest has a higher score(because of the weight) than DROP invest it will be always prefered because of the heigher score with the same costs
Select a repo