-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
bweick
commented
Oct 21, 2021
Commenting the diff for TradeModule and GeneralIndexModule
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.
Why not use:
uint256 totalFees = getModuleFee(TRADE_MODULE_PROTOCOL_FEE_INDEX, _exchangedQuantity);
managerRebate = controller.getModuleFee(address(this), TRADE_MODULE_V2_MANAGER_REBATE_SPLIT_INDEX).preciseMul(totalFees);
protocolFee = totalFees.sub(managerRebate);
I think that way you can be more confident about not having some extra wei sent out due to rounding and you aren't recalculating totalFeePercentage.preciseMul(_exchangedQuantity)
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.
Maybe make this clearer and call it updateRebateRecipient
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.
Would call this updateRebateRecipient as well
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.
Would change this math similarly to TradeModuleV2 comment
Uh oh!
There was an error while loading. Please reload this page.
Code Review Processes
New Feature Review
Before submitting a pull request for new review, make sure the following is done:
README Checks
Code Checks
Broader Considerations