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

Tasks: Fix Hop bridger validations #107

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

lgalende
Copy link
Contributor

This PR introduces two changes related to Hop bridger validations:

  1. The fee is considered inside the min amount out
  2. The max fee pct is now an absolute value instead of a percentage. And this max fee config is now implemented in theBase Bridge Task

@lgalende lgalende self-assigned this Oct 15, 2023
@lgalende lgalende force-pushed the tasks/fix_hop_bridger_validations branch from e7ca0a4 to 880bcb7 Compare October 15, 2023 04:42
@mimic-fi mimic-fi deleted a comment from github-actions bot Oct 15, 2023
Copy link
Member

@facuspagnuolo facuspagnuolo left a comment

Choose a reason for hiding this comment

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

Looking good!

packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/contracts/bridge/BaseBridgeTask.sol Outdated Show resolved Hide resolved
packages/tasks/test/bridge/BaseBridgeTask.behavior.ts Outdated Show resolved Hide resolved
packages/tasks/test/bridge/BaseBridgeTask.behavior.ts Outdated Show resolved Hide resolved
Comment on lines 310 to 311
const amountAfterFees = amount.sub(fee)
const minAmountOut = amountAfterFees.mul(fp(1).sub(slippage)).div(fp(1))
Copy link
Member

Choose a reason for hiding this comment

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

Where is the max fee being set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nowhere. The config is being ignored
We discussed offline that it should raise an error when the max fee is not set and the fee is not 0

@facuspagnuolo facuspagnuolo merged commit 9cbae5b into master Oct 18, 2023
3 checks passed
@facuspagnuolo facuspagnuolo deleted the tasks/fix_hop_bridger_validations branch October 18, 2023 18:23
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