Skip to content

WIP: compound v3 asset proxy#252

Open
rahul-kothari wants to merge 1 commit intodelvtech:mainfrom
rahul-kothari:comp3_asset_proxy
Open

WIP: compound v3 asset proxy#252
rahul-kothari wants to merge 1 commit intodelvtech:mainfrom
rahul-kothari:comp3_asset_proxy

Conversation

@rahul-kothari
Copy link

@rahul-kothari rahul-kothari commented Nov 2, 2022

Hi! I am working on a fixed borrow protocol at component.fi

I am investigating how to add an asset proxy of compound III into element v1. The problem is that compound III acts like Aave in that cToken balance keeps increasing with time. So deposit() or underlying() doesn't work the same as v2 of compound.

Currently, I have just written the asset proxy. Will add tests later, but wanted some eyes on if I am going in the right direction.

Basically added yieldSharesIssued which keeps track of tokens issued by the deposit() so that we can later calculate underlying() correctly!
Shoutout to @Padraic-O-Mhuiris for the idea

@Padraic-O-Mhuiris
Copy link
Contributor

This needs some integration-level testing validating the withdrawals and deposits from compound are being made correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants