Skip to content

Commit

Permalink
chore: optimised VeCakeSwapDiscountHook.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefMist committed Sep 5, 2024
1 parent a9415af commit fd8f50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pool-cl/VeCakeSwapDiscountHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract VeCakeSwapDiscountHook is CLBaseHook {

/// If veCake holder, lpFee is half
if (veCake.balanceOf(tx.origin) >= 1 ether) {
lpFee = poolIdToLpFee[key.toId()] / 2;
lpFee = lpFee / 2;
}

return (this.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, lpFee | LPFeeLibrary.OVERRIDE_FEE_FLAG);
Expand Down

0 comments on commit fd8f50c

Please sign in to comment.