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 tests for superform USDC on base and mainnet #24

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

Conversation

MattPereira
Copy link
Member

@MattPereira MattPereira commented Jan 31, 2025

Related to balancer/code-review#257

Summary

My guess is that SuperVaults delegating ERC4626 functionality to the Yearn v3 TokenizedStrategy contract, which requires profits to be gradually unlocked over time, causes the test to fail

12 tests passed, 1 failed, 0 skipped (13 total tests)

The testWithdraw fails because of revert: too much loss;

Ran 1 test for test/mainnet/ERC4626MainnetSuperFormUSDC.t.sol:ERC4626MainnetSuperformUsdcTest
[FAIL: revert: too much loss; counterexample: calldata=0x20c1d8510000000000000000000000000000000000009be307e764714a2fb8581d484ac5 args=[3161760727588006476801643857332933 [3.161e33]]] testWithdraw__Fork__Fuzz(uint256) (runs: 0, μ: 0, ~: 0)
Logs:
  Bound Result 433650401339

Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 284.02ms (20.53ms CPU time)

Ran 1 test suite in 287.79ms (284.02ms CPU time): 0 tests passed, 1 failed, 0 skipped (1 total tests)

Failing tests:
Encountered 1 failing test in test/mainnet/ERC4626MainnetSuperFormUSDC.t.sol:ERC4626MainnetSuperformUsdcTest
[FAIL: revert: too much loss; counterexample: calldata=0x20c1d8510000000000000000000000000000000000009be307e764714a2fb8581d484ac5 args=[3161760727588006476801643857332933 [3.161e33]]] testWithdraw__Fork__Fuzz(uint256) (runs: 0, μ: 0, ~: 0)

Copy link
Contributor

@mkflow27 mkflow27 left a comment

Choose a reason for hiding this comment

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

Thanks for adding the tests Matthew. Based on me looking into this it seems like:

It could be helpful if we maybe write down a small paragraph of what the withdraw fork-test does on a high leven and get the partner's opinion from one of their engineers. Ultimately we want to get as many compatible boosted pools with buffers.

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