plasma-contracts
plasma-contracts copied to clipboard
Fast Exit Construction
From Discussions last week-
We can attach lending/borrowing (similar to compound's design) to the liquidity pool of the existing quasar fast exits design. This is to keep the same design and open the quasars pool to be suppliable by everyone. The compound design can be seen as an external attachment wherein the quasar owner is the pseudo borrower from the pool, and uses these borrowed asset to provide liquidity for exiting outputs.
The Ux being 2-3 steps could be an issue, so we might want to be aggressive with the params and run in operator trust method and remove waiting period from the quasar. , since operator is providing liquidity(the funds are borrowed though). Find some discussions about the possibility of making UX simpler here - https://github.com/omgnetwork/plasma-contracts/pull/723#discussion_r549834459
Some additional thoughts-
- Liquidity pool - Should we separate the pool from the quasar i.e differentiate the pool and have quasar owner borrow from the main pool. Or should we have the pool to be the same pool assets are supplied to?
- Do we use compound or borrow a portion of the design for this eg. utilisation ratio, ctokens
- Collateral and repayment or trust?
So one thing that I just remembered is that the biggest issue I saw last week is the two/three step asset transfer:
- ticket claim
- send the tokens via watcher
- claim
but maybe that's not even an issue, if we hide this flow behind the frontend UX? Opinions?
3 can probably be automated, triggered automatically after 2 is success. we take the gas cost of this tx from 1, or from fees? thoughts?
how do we automate claim? part of function submitBlock(bytes32 _blockRoot)
?
I was thinking of a bot that would call the claim
method from quasar contract after getting the inclusion_proof from step 2
So @souradeep-das and me asked ourselves, how much is Compound actually useful to what we're trying to accomplish:
Oracles play a major role in Compound as they act/force on the liquidation ratio and borrow permission ratio. Now here's a problem. Compound specifically works with their Open Oracle solution, that incorporates exchanges to push data. None of their oracles - price feeds provides OMG pairs.
Coming out of the conversation I had with Souradeep: The way we imagine this would all work is that our Quasar borrows assets and provides overcollateralization in OMG, ERC20. The problem is - there are no price data feeds that would provide OMG pairs prices on chain. The question is, how do we get around this?
- CHAINLINK also doesn't provide any OMG pairs, maybe we could collaborate with them and add these pairs.
- Perhaps we insanelly overcollateralize (since we're the only borrowers) we'd be pretty safe. Lets say we overcollateralize 10x a fixed OMG token price. What would be the downsides?
- Coinbase PRO is one of the main sources for Compounds oracle solution, maybe we could also get OMG pairs there?
- Or we simply provide collateral with ETH. But note that fast exits via quasar and compound would still only work for available tokens that have trading pair prices available.
Other stuff: Accrued interest to lenders would only come from pressure of the Quasar borrowing, which in reality means, how many would like to exit fast. Quasar collects fees for each exit and provides that fee back to all the lenders of a specific token. The fee mentioned is determined by utilisation ratio based on the pressure on each side. And if someone wants to withdraw we do the multiplication with the ratio and return the funds.
It would make sense for the Quasar to give "insurance" when it borrows in a default currency, perhaps ETH or OMG. This would be a sort of over-collateral borrowing that Compound already understands. In our case, this is much simpler since the borrowing is only allowed from the Quasar.
Compound uses multi-collateral borrowing, which we'd use very strictly just with one token: Quasar would borrow any asset by providing OMG as collateral, for example.
@souradeep-das anything else you'd want to add? I'm sure I missed something.