-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
wsdt
commented
Apr 24, 2024
•
edited
Loading
edited
- Deduct static 1% fee for networks that have disabled airdrop (basically L1s / all networks aside from Boba ETH/BNB)
- Added tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this 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.
enableExitFee && | ||
!BobaChains[serviceChainId]?.airdropConfig?.airdropEnabled | ||
) { | ||
return amount.mul(99).div(100) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoiding decimal places
There was a problem hiding this comment.
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!
Since we have a minDepositAmount on the contracts this is a scenario that should never happen. :-) |