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

fix(test): add migration test with swap failing #162

Merged
merged 5 commits into from
May 17, 2022
Merged

Conversation

zgorizzo69
Copy link
Collaborator

actually with uniswap migration there is no way to have funds stuck in the migration contract as even if the swap is failing migration stays "un migrated" and we can cancel resubscribe

@pegahcarter pegahcarter self-requested a review May 15, 2022 15:59
@pegahcarter
Copy link
Member

Where is the liquidity check to ensure slippage is less than 5%?

@zgorizzo69
Copy link
Collaborator Author

Where is the liquidity check to ensure slippage is less than 5%?
in the swap function of uniswap migration

   // Calculate rough expected return based on 5% input
        uint256 expectedPartialAmount = _quoter.quoteExactInputSingle(
            hubInfo.asset,
            targetHubInfo.asset,
            usts.fee,
            (amountIn * 5) / 100,
            0
        );

test/contracts/facets/FoundryFacet.ts Outdated Show resolved Hide resolved
@pegahcarter pegahcarter merged commit f5bc506 into main May 17, 2022
@parv3213 parv3213 deleted the fix/refactor branch June 6, 2022 14:36
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