Migrate cDai implementation from CDaiDelegate to CErc20Delegate

When the DSR (Dai Savings Rate) was introduced by MakerDAO, the Compound team developed a CDaiDelegate to take advantage of DSR (pre governance). With DSR remaining at 0% for such an extended period of time, it would be advantageous for the sake of gas fees to change back to a system which doesn’t enter DSR.

I propose setting the cDai implementation to a CErc20Delegate which is already the implementation for cUSDT which can be found here.

The following are rough gas estimates for a CDaiDelegate vs CErc20Delegate transactions. They are a very naive at just a few of the most recent transactions–a goes on behind the scene, but there is a definite and significant downwards trend.

Estimated Gas Savings:
Mint 262,972 -> 187,459
Redeem 316,559 -> 186,721
Borrow 565,067 -> 320,452
Repay Borrow 335,807 -> 196,837

8 Likes

This is a great idea–

The cDAI contract was designed to gracefully migrate back and forth between DSR and non-DSR implementations. It might be as simple as switching to the original contract.

2 Likes

It seems like this is a relatively straightforward, uncontested proposal. I will deploy a CAP in the coming days after running some simulations to ensure expected behavior.

1 Like

I ran a forking simulation for this proposal. It switches the cDai implementation to the current cUSDT implementation (a standard cERC20Delegate). The forking simulation indicates that all Dai will be retrieved from DSR successfully and cDai will continue to work as expected.

1 Like

I have deployed a CAP for this proposal here.

Please delegate to 0xE73423c907842744585a93455Efcf3C86dC250b4 to support this CAP.

1 Like

is it some advantage to return back to non-DSR version of cDAI contract instead of using cErc20Delegate for cDAI?

1 Like

The advantage is the significant gas savings for users.

2 Likes

I don’t handle large funds so I always calculate gas fee costs. With this move, you significantly reduce gas fee cost. Great move man. :ok_hand:

4 Likes

CAP status update: 71k delegates received, another 29k needed.

2 Likes

Proposal 34 is live. I wrote a forking simulation post propose and everything checks out.

2 Likes