Balance sheet manipulation: How to yield farm safely on Uniswap

Following the work on MakerDAO accounting and implications, here is an application to yield farming.

In accounting, the asset side is what you own and the liability side is how you finance that. The power of Maker is that it can add DAI to its liability and DAI has value (everyone can create coins but few can make them valuable).

Initially, Aave has some ETH on it (Aave issue aETH when you deposit ETH). This was done by a third party. On MakerDAO we print some DAI. Increasing both asset and liability by a coin you control is a free operation.
image

On the second step, we lend DAI on Aave, we get aDAI tokens.

image

On the third step, we borrow ETH from Aave using our DAI collateral. We now have ETH as asset but have to repay them somehow which is a loan materialized by the dETH part. While we still have aDAI on the asset side, most of it is blocked as collateral (not sure on the details but it doesn’t change the big picture).

For the final step, we add both the ETH and some new DAI to mint ETH/DAI LP tokens (equity of the pool).

Now the cool thing is that ETH price has no impact on MakerDAO solvency. If ETH value drop, the dETH part will drop of the same amount. Both aDAI and the Uniswap LP accrue fees which are revenues for Maker (on the liability side, only dETH accrue interest, but those are lower than the aDAI ones).

The only issue is that if ETH price change, so does the quantity of ETH inside the Uniswap LP. So we need to keep the quantity exposure of ETH on the asset and liability side the same (more or less). We also need to make sure there is enough DAI as collateral (not too hard to put x10 more). Quite sure it’s not impossible to solve. There will be a little bit of deviation (as the rebalancing will be discrete and not continuous), but most likely not much.

An alternative is to lend the ETH on Alpha Homora (but the yield is lower and protocol risk higher).

Therefore, the only main risk is protocol risk (Aave/Compound and Uniswap). I consider it low (as we will have vaults for Uniswap at 1% SF and Compound).

While this is safe and lucrative, it works from an accounting perspective but how to implement that in a smart contract is an open question.

Quite sure a $10M investment in both smart contracts will not change the economics too much and we can expect a 20% yield, i.e. $2M per year for almost no risk and no increase needed of the surplus buffer.

What we need to aim for is to have matched books in terms of risk on the assets and liabilities side. This is modern banking.

Does that makes sense to you or is it too far from Maker roots?

19 Likes

It is far from the roots, yet so are the leaves of the tree.

6 Likes

This is super interesting stuff. I guess the question is where would we be getting the DAI from? Logically, we would just be diverting it from buying/burning MRK since we wouldn’t have other assets on our balance sheet to put up for collateral on our own system. So from a MKR holder perspective, what’s the incentive on giving up some of the buy/burn function that is at the root of the protocol?

Obviously bringing in more income to MakerDAO is a huge advantage, but if you’re a MRK whale why defer your buy/burn for 5 years (in the scenario described above)? Now, incrementally as time passes, the MKR that the platform is buying has potentially (hopefully) gone up in value leading to less pressure from the burn mechanics, and you have no assurances that the income steaming from this set up will be used to make more buy/burn happen.

Personally, (as about the furthest thing from a MKR whale) I would be all for this. It creates income for us to utilize, adds more TVL to the DeFi space, and only adds exposure to platforms that we as a community have already decided to add exposure to this year. But I wonder how we could convince the big MKR holders to vote with us, as they would be deferring DAI for burning and adding risk to a system that is (in theory) already set up to pay them out handsomely. If I’m way off base I apologize, but to me that would be the real hurdle of a proposal like this.

1 Like

Dai is created from thin air, as long as there are sufficient assets to back it. It doesn’t have to be “diverted” from any place, as Maker is the ultimate source of all Dai. In this case, Dai is minted and immediately used for yield farming, at which point it is backed by yield farming assets.

The real concern is that the protocol is then on the hook for any losses in the underlying asset, instead of a random user. This is also the main issue people have with printing Dai to purchase ETH. A hack in the yield farm, for example, would have to be insured by the surplus buffer or MKR issuance. This is basically a proposal to increase the intrinsic leverage of the DAO (which I have no problem with, BTW). It’s a risk tolerance question.

1 Like

Right, but under our protocol DAI is only created through collateralized loans, so we wouldn’t be allowed to create it out of thin air (nor would it be wise to do as, as vault holders can pull their collateral at anytime, making it a big risk to mint unbaked DAI simply because we have “extra” collateral on the books). But even if we were able to get around that with a vote (again I think unwise) we would still have the issue of getting whale support. Not only would they be taking on this extra risk from the yield farming protocol, but by creating unbacked DAI they increase the likelihood of having to mint MRK to cover and draw-downs, rather than just relying on the increasing burn rate the protocol is trying to achieve by having more vault options.

We “are allowed” to create Dai out of thin air. Only Dai in the hands of users is a liability to the DAO, because users will have the option to, at some point, redeem it for $1 in collateral. Dai that is minted and kept by the DAO is not a liability, because it will never be redeemed. The DAO can mint 10 billion Dai and keep it for itself and cause no problems until it is transferred out of the protocol.

More importantly, if the DAO mints Dai, and uses it to acquire a priced asset (such as by swapping for ETH, or by using it for yield farming), and by the time of global settlement it is available for redemption, it is backed Dai.

You can think of it as a special vault type that only the Maker DAO can use, but the DAO is not constrained in the amount of capital it can apply to the strategy like a normal user is. The other major difference between this special vault type and a normal vault is that Maker uses the collateral in a standard vault as insurance for drawdowns in the strategy. When liquidation fails, the strategy is then insured by the surplus buffer, then finally by MKR issuance. If you think of this as a special vault type, it becomes apparent that a DAO yield farming vault is actually a good way to rapidly build the surplus buffer.

1 Like

Also, there is a lot of talk about locked Dai in the forums. Locked Dai is not a liability because it will never be redeemed, and it can be safely accounted in the Surplus Buffer.

Are you saying that any DAI that gets confirmed stuck or lost in smart contracts/wallets could just be reminted and put in our own coffers?

1 Like

Yes, that is what I’m saying. Of course, it’s pretty difficult to say what is actually locked. If we do it wrong, then some Dai is unbacked. But Dai stuck in 0x0, for example, we can consider it in the surplus buffer and then suck() it for whatever expenses. If the Dai contract contained a burn() function we could even explicitly burn it, then it becomes more clear.

Yea…if only that had been added. I get the immutability appeal but there are edge cases where I think doing these types of things would be favourable as opposed to having to create an entirely new DAI token to bring in new upgrades.

I think I still want to push back on this, though I am sorry if I’m completely missing the boat.

Technically it would be entirely up to the DAO, once the DAI is created, and especially if we start putting it into “investment” like structures, the DAO would be able to pull the plug on it at any time. Even if you could ensure this unbacked DAI never left our books because of MakerDAO actions, that still leaves the DAI vulnerable to an attack on Uniswap or whatever LP platform. But it’s definitely worth noting that in the future if the DAO was strapped for DAI all of a sudden that yield farming block could easily be converted into a liability. We would have to depend on future DAO members to “keep the promise” of not letting the DAI flow out of our hands, even though we essentially are breaking our own rules by minting the unbacked DAI in the first place. Basically it’s a Pandora’s box to open and I don’t see the incentives adding up for anyone holding a significant portion of MKR would be comfortable with the risk.

I think this is highly interesting. Not sure why anyone would think whales would vote against this. MKR doesn’t exclusively derive its value from price pressure from burning. Just the protocol increasing the amount of revenue it generates would lead to MKR price appreciation. A company stock doesn’t stop increasing just because it stops doing stock buybacks. Companies reinvest capital, both in R&D to increase revenue in the future, as well as capital investments to generate yield.

9 Likes

Basically trying to delta hedge a UNI LP, leveraged by the ability to create DAI.

The risk is impermanent loss, and that you need to adjust your delta hedged position. Not exactly a non zero risk.

Delta Hedging is an interesting strategy to LP with, but you need to think about how often you want to rebalance. The costs can add up if you do it too frequently. But you want to be rebalancing if you’re in a trending market.

2 Likes

This is a good idea, and we should try this strategy. Strategies that can create revenue are worthy of our constant attempts.

2 Likes

Thanks for the discussion.

@prose11 In fact nothing here is new

Protocol risk: My impression is that protocol risks are binary tail risks. If the protocol gets hacked, all is drained. If there is a bug that renders the contract broken, all is lost. We will provide Compound and Uniswap LP vault so the tail risk is exactly the same. But here the reward is ay higher. And you don’t have to play with stability fees to track Aave/Uniswap yields.

Unbacked DAI: USDC-A vaults were close to being undercollateralized (or were already depending on your definition). It wasn’t a big issue as most were fine by increasing the surplus buffer accordingly. Leaving a vault undercollateralized for a client is giving him free money and should be avoided But having a vault we own undercollateralized and the delta accounted somewhere is just an accounting/technical limitation.

If you want, we can use some DAI from the surplus buffer to add a buffer to the vault so it is always overcollateralized. It’s really taking money from your left pocket to put them in your right pocket.

I think it’s best for everyone (mainly DAI users) to leave all that in the surplus buffer. But we need to be transparent and show a provision if the aDAI/Uniswap LP vault is underwater. Just like we should have done for USDC-A vaults. Stablecoin vaults were almost 4M underwater at some point.

Also, the PSM will leave use exactly without overcollateralization.

Funny collateral: SIXS/RWA-001 will have no value, so from the vault perspective, it would be unbacked DAIs (real ones). We just know that somewhere there is a piece of paper saying someone will give us some DAIs at some point.

Here, I’m quite sure @NikKunkel team can find the price. We (will) have oracles for each component so the missing piece is to aggregate it. Not saying it’s easy, far from it.

So at worst, we use the SIXS trick and get the value off-chain, at best we have a nice on-chain price feed.

Impermanent losses: Balancing the position will cost a bit of money, but with a 10M position and a ~10% yield, it’s peanuts I guess. Once a day, once an hour? I don’t know.

–

I shouldn’t have used the word yield farming in the title. What we are really discussing here is to lend our excess DAI on money markets (just like any retail bank does) and manage a trading book (just like any big bank does, but here using AMM). Those are basics bank functions.

The big step here is to have an autonomous vault instead of waiting on the market for someone to use the vault. If this step is too big we can provide the strategy to Yearn, they make a Y vault, and we onboard this collateral with a CR 125% and SF 2-3%. It’s like giving a third party our power of DAI minting for just a small fee …

2 Likes

I think this is an interesting proposal. Have you thought about going the curve route instead? Could use compound pool which is cDAI/cUSDC, apy is ~ 4% + 10-30% in CRV. Could vote lock some CRV for veCRV to earn admin fees and vote to divert more CRV rewards to compound pool. Do something like vote lock 20% CRV and sell 80% (maybe vote lock more in the beginning).

Would be lower risk than the above strategy and yield may be around the same. Risk is USDC peg.

Also gas costs when the market goes like crazy (as past 2 or 3 days) can add a certain loss, i.e. a gas of 300 or more, depending on the protocol we are interacting with it can means a loss for the strategy.

1 Like

It seems my whale fears are well in the minority here and that’s a good point @NikKunkel, though I would point out extra revenue does not necessarily lead to higher valuations. The valuation of a share-like asset is the sum of all future dividends. Since our only mechanism for dividends is buy/burn currently it would have to translate into that action. Additionally while this proposal increases revenue, it also increases cost and risk. I think it’s pretty clear we’d be getting out more than we’d put in, and I think this conversation would hopefully convince MKR holders of the same.

Thanks for the rundown @SebVentures, I think by presenting the risks/continuation of previous decisions like you did in that follow up post it becomes clear that this proposal would be a win for MKR holders big and small alike. As long as we proceed with a relatively low cap (the 10M from your scenario seems like a reasonable start to me) I would now be fairly optimistic we could push it through. Really great proposal and thanks for taking the time to break down potential objections.

The issue here is that we are not delta hedged USDC (lending DAI to borrow USDC would be costly). So it really depends on your vision on USDC. It’s less interesting conceptually for me, but could work the same. Farming is transitory, money markets and AMM are here to stay. But it’s a building block so possibilities are endless. My favorite use case will be for yield curve trading (as that takes a good amount of capital for small spreads). This might push DAI on the spot until big banks come to the space.

Regarding fees, with a 10% yield, a $10M investment generates $2700 per day. That should cover enough rebalancing even with gas at 500 gwei. The rebalancing is mostly oracle work and 2 uniswap calls, you compute the exposure of ETH in the LP and the ETH exposure on the debt side, then convert some DAI to ETH and add to the pool or do the opposite.

We can forward excess capital from this smart vault to the surplus buffer so it is burned. Or we can have the vault loan to match the vault assets. This will increase the surplus buffer in real time like other vaults (and trigger MKR burn). Again, implementation will require some smart brains.

1 Like

Maker is short ETH in your case, but if ETH rallies Maker’s position at Aave gets liquidated and Maker incurs penalty fee / loss. Unless the plan was to mitigate this risk with a very high collateralization ratio.

Its definitely closer to Yearn :slight_smile: Risks are higher for sure, but also risk compensation is higher.

1 Like