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: Lightbridge exit fee #33

Merged
merged 9 commits into from
Apr 29, 2024
Merged

feat: Lightbridge exit fee #33

merged 9 commits into from
Apr 29, 2024

Conversation

wsdt
Copy link
Contributor

@wsdt wsdt commented Apr 24, 2024

  • Deduct static 1% fee for networks that have disabled airdrop (basically L1s / all networks aside from Boba ETH/BNB)
  • Added tests

Copy link
Contributor

@souradeep-das souradeep-das left a comment

Choose a reason for hiding this comment

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

🚀

Copy link

@souhaillM souhaillM left a comment

Choose a reason for hiding this comment

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

Everything is good, the only scenario that i have in mind is having a smaller amount to bypass the 1% fees.

src/utils/misc.utils.ts Show resolved Hide resolved
enableExitFee &&
!BobaChains[serviceChainId]?.airdropConfig?.airdropEnabled
) {
return amount.mul(99).div(100)
Copy link
Contributor

Choose a reason for hiding this comment

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

also i think we need rounding up/down here because this is in wei?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean with rounding up/down? @souradeep-das

Copy link
Contributor

Choose a reason for hiding this comment

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

avoiding decimal places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I don't understand. These are BigNumbers, as such they do not support floating point numbers and always return an integer (rounded).

Merging so that we can get a new release out, but please comment if I misunderstand something and I'll fix it in a separate PR!

@wsdt
Copy link
Contributor Author

wsdt commented Apr 29, 2024

Everything is good, the only scenario that i have in mind is having a smaller amount to bypass the 1% fees.

Since we have a minDepositAmount on the contracts this is a scenario that should never happen. :-)

@wsdt wsdt merged commit 2775822 into main Apr 29, 2024
1 check passed
@wsdt wsdt deleted the wsdt/lb-fee-exit branch April 29, 2024 17:01
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.

4 participants