The Pooled Assets
The Compound protocol has become one of the largest DeFi projects to date. With over $12 billion worth of assets supplied, earning interest, and $5.5 billion worth of borrowed assets. The gap in supply to borrow could be put to use much like an AMM, however, Compound already utilizes price feeds for each asset. With utilizing price feeds Compound could 1-up other trading protocols which use pooled assets and rely on a specific balance between the tokens/assets in every market pair.
Price Feeds are better than AMMs
Using price feeds would allow any asset on Compound to be traded with any other asset. Someone wanting to trade UNI for USDC could visit Compound and do just that. However, the real use-case scenario comes into play with borrowers. If a user borrows ETH (maybe to stake it on the beacon chain) but no longer has ETH to repay the debt to avoid liquidation they would have to trade another asset to obtain the ETH to repay. Multiple reasons make this not pleasant, gas fees skyrocketing comes to mind in Ethereum’s current state.
How can Compound facilitate trading with supplied assets?
When a user supplies an asset, the user’s ETH address gets credited with cTokens. When the user wants to redeem that asset, their address gets debited cTokens and the asset returns, plus interest earned. Some of the supplied assets on Compound are borrowed which makes the lending market work much like a bank, but decentralized.
Currently, each asset borrowed must be repaid with the same asset. My idea is to allow borrowers to repay their debt with an alternative asset. To do this they should still have to go to the borrow side and select repay for the asset they borrowed. Then when the UI shows the pop-up with the asset to repay on the top, this could be changed to a dropdown menu and say “repay with:” so that users can select another asset to repay the debt. When filling out the amount, the UI should display to the user an estimate of how much of the debt, calculated in the borrowed asset, will be paid. Then just confirm the transaction and that is the only change on the UI needed.
Now, on the backend, it currently couldn’t work. This is the difficult part.
Scenario: When a borrower repays their ETH debt with UNI.
After the borrower confirms that transaction, the UNI will go into a side pool contract (not yet be used for supply) as well as the amount of cUNI needed to be minted as if the UNI were actually supplied. The amount of ETH would also be removed from the borrow side, since the user was repaying their ETH debt. ETH would go into the side pool contract as well.
The side pool contract will end up holding both cTokens and assets. In this scenario, it would contain ETH, UNI and cUNI. The next Compound user to borrow UNI and/or ETH will obtain a portion of their funds from the side pool contract. Same with the next user to supply UNI, a portion of the cUNI tokens will come from the side pool contract.
Possible issues to solve
Now, the biggest issue I can see is a user repaying a ‘mega-debt’, which could easily be remedied by setting maximum limits that depend on market conditions.
Minting cTokens, I am not so sure about.
Since the user is saving on Ethereum gas fees, Compound could charge a small % of the trade to be paid in COMP. This would give COMP more utility. The fees could go anywhere really, but I was thinking that they could get recycled and added to the next COMP distribution on a subsequent block.
Well, that’s all I have so far.
Yay, nay or feedback?