Compound III Governance Office Hours - Friday September 2, 11am PT

The Compound Labs team will be hosting public office hours in the Discord audio channel on Friday, September 2nd at 11am PT / 2pm ET. The purpose of this call is to answer any technical questions that community members have regarding Compound III governance upgrades.

We can provide context for creating a new governance proposal to change parameters, adding a new collateral asset, and also how to deploy new instances of the protocol.

All are welcomed. Those that have sufficient COMP delegation to propose are most encouraged to attend.

Here is a link to the Discord call event. And a Google Calendar Invite.

We hope to see you then!


We’ll get started in about 30 minutes.

Hey Adam! Sorry missed this. I had a question:

transferBase seems to allow you to “transfer” more than your cUSDCv3 balance - as long as you are sufficiently collateralized? So I could withdraw, borrow, help someone repay, then help them supply all in one call?

I’m trying to calculate totalBorrowBase on dune analytics, so trying to handle edge cases of all these events happening in one function.

in the future, it would be super helpful to emit totalBorrowBase and totalSupplyBase and the supplyAmount, repayAmount, borrowAmount, withdrawAmount in events (and indexes too).

Discord is a better place for these questions but I will answer here. Yes, that’s correct. a single transfer can be a withdraw, borrow, repay, and supply all at once. The way you tell the difference between a withdraw and borrow is to look at whether or not a cUSDCv3 Transfer event was emitted. a withdraw will emit Transfer(src, address(0), withdrawAmount) to signal the token is being burned, while a borrow will have no such event. The same applies to repay/supply. Supply will emit a cUSDCv3 Transfer(address(0), dst, supplyAmount) event while repay will not.

thanks! right so you can tell what happened, but not the exact quantity of a repay (unless you’re tracking every user’s principal or supply < amount transferred, in which case you can subtract the two to get repay amount).

just to clarify my question, because of this you can’t calculate totalBorrowBase from events unless you track every single user’s principal state from day 1.

You could use events, but it’s to use this function borrowBalanceOf.

you can’t use events because there’s no way to calculate repay amount in transferBase (if it was only a repay and not a supply) - unless you track user principal for every user from day one. which is fine, just slightly more compute-intensive so I wanted to check with the team for any better work around.

most analytics providers are event-based, so referencing a view function doesn’t help us much here :slight_smile: