tezos-checker / checker

An in-development "robocoin" system for the Tezos blockchain
24 stars 16 forks source link

Generalization #171

Closed murbard closed 3 years ago

murbard commented 3 years ago

Minor generalizations of Checker greatly increase its use cases. Broadly speaking, the following aspects should be modular:

  1. allow FA1.2 / FA2 token as collateral for burrows instead of tez only. A single form of collateral is still accepted for a given checker instance, but different instances can have different collateral
  2. the control formula that sets the drift derivative as a function of the target should be pluggable, in some cases, a continuous function might make sense as opposed to a bang-bang control
  3. We can distinguish two big classes of contracts: those that attempt to replicate an index provided by an oracle (index-based), and those that attempt to replicate an existing token on the chain (token-based)
    1. For index-based we use the index, the ctez / tez cfmm price, and the ctez / kit cfmm price, with the ctez / kit cfmm being subsidized by the checker contract.
    2. For token-based, the setup is typically a bit different. Suppose we want to replicate USDS using tzBTC as collateral. In that case, we would want to derive prices from 3 cfmms, USDS / cUSDS, tzBTC / ctez and USDS / ctez, with the USDs / cUSDS pair being subsidized by the checker contract.
gkaracha commented 3 years ago

I'm closing this issue, since we've been dealing with each part of it in separate issues (part 1 is tracked in #213, part 2 was discussed in #261 (and finally addressed in #283), and part 3 is tracked in #263).