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

Add Ironbank #297

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add Ironbank #297

wants to merge 8 commits into from

Conversation

matthewg49
Copy link

@matthewg49 matthewg49 commented May 6, 2022

What does this PR do?

This PR adds Ironbank liquidations to mev-inspect-py. C.R.E.A.M, in partnership with Yearn, created a lending market that introduces protocol-to-protocol lending while continuing to offer the same services that C.R.E.A.M initially offered. More details on the partnership and launch can be found here.. Ironbank's contracts are all forks of Compounds contracts making the implementation relatively straightforward.

Currently, Ironbank is the third largest lending platform on Ethereum by TVL according to Defillama.

Testing

This is where I am having some issues. I created tests for Ironbank that examines a liquidation transaction, but locally I'm having some issues running the tests. For some reason, my adjustments to mev_inspect/classifiers/specs/__init__.py breaks compound, cream and ironbank tests. I have a strong feeling it's my local environment (Windows using WSL2).

The reason being is that after I added all of my code changes and ran ./mev inspect on the block that contained the ironbank liquidation, it successfully added an ironbank liquidation to the postgres db!

Checklist before merging

  • Read the contributing guide
  • Installed and ran pre-commit hooks
  • All tests pass with ./mev test

This is my first contribution to an open source project, so any and all feedback is appreciated. I'm a data scientist by trade so I may have missed a handful of common best practices that are typically followed when contributing.

@matthewg49
Copy link
Author

Testing has ran successfully! PR is ready for review

Copy link
Contributor

@gheise gheise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Awesome to see this PR, great initiative! Would be great to see more tests, covering different cases (multiple liquidation calls in one tx, reverting, etc.) If possible, run ./mev backfill n m where m >> n, and see if the number of liquidations found is similar to what is expected in that block range and there is an absence of errors

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