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

feat: flashloans #304

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

feat: flashloans #304

wants to merge 11 commits into from

Conversation

zavgorodnii
Copy link
Collaborator

@zavgorodnii zavgorodnii commented Jun 7, 2024

This PR adds tests for the neutron-flashloans contract (neutron-org/neutron-dao#105).

The following test cases were implemented:

  • Request a flashloan (and return it)
  • Request a flashloan (and not return it)
  • Request a flashloan (request more that is available)
  • Request a flashloan (and return more than required)
  • Request a flashloan (and request another one recursively)
  • Request a flashloan (and fail internally)
  • Change fee to 0.0 and request a flashloan

Feel free to suggest more test cases.

@zavgorodnii zavgorodnii changed the base branch from main to feat/sdk-50 June 7, 2024 05:25
@zavgorodnii zavgorodnii marked this pull request as ready for review June 7, 2024 14:07
Copy link
Contributor

@NeverHappened NeverHappened left a comment

Choose a reason for hiding this comment

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

How about finding some way to test if those funds can actually be used in the moment of the loan? I feel that checking only for the end balance of DAO is not really checking that flashloans work

src/testcases/run_in_band/flashloans.test.ts Outdated Show resolved Hide resolved
src/testcases/run_in_band/flashloans.test.ts Outdated Show resolved Hide resolved
src/testcases/run_in_band/flashloans.test.ts Outdated Show resolved Hide resolved
@zavgorodnii zavgorodnii changed the base branch from feat/sdk-50 to main November 11, 2024 15:37
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.

3 participants