Skip to content

Commit a28ff34

Browse files
committed
Add note in javadocs
1 parent 7841bd4 commit a28ff34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contracts/extensions/PerpV2LeverageStrategyExtension.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ contract PerpV2LeverageStrategyExtension is BaseExtension {
973973
* Calculate total notional rebalance quantity and chunked rebalance quantity in base asset units for engaging the SetToken. Used in engage().
974974
* Leverage ratio (for the base asset) is zero before engage. We open a new base asset position with size equals to (collateralBalance * targetLeverageRatio / baseAssetPrice)
975975
* to gain (targetLeverageRatio * collateralBalance) worth of exposure to the base asset.
976+
* Note: We can't use `_calculateChunkRebalanceNotional` function because CLR is 0 during engage and it would lead to a divison by zero error.
976977
*
977978
* return int256 Chunked rebalance notional in base asset units
978979
* return int256 Total rebalance notional in base asset units

0 commit comments

Comments
 (0)