Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: compound v3 asset proxy #252

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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