From 4e1631431f767c61cd51fe204719fa02f7645d4b Mon Sep 17 00:00:00 2001 From: Kirill Fedoseev Date: Thu, 21 Sep 2023 19:46:14 -0500 Subject: [PATCH] chore: repack and optimize yield params struct --- src/zkbob/ZkBobCompoundingMixin.sol | 8 ++++---- test/interfaces/IZkBobPoolAdmin.sol | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/zkbob/ZkBobCompoundingMixin.sol b/src/zkbob/ZkBobCompoundingMixin.sol index 7cd5db2..919cbc8 100644 --- a/src/zkbob/ZkBobCompoundingMixin.sol +++ b/src/zkbob/ZkBobCompoundingMixin.sol @@ -16,16 +16,16 @@ abstract contract ZkBobCompoundingMixin is ZkBobPool { struct YieldParams { // ERC4626 vault address (or address(0) if not set) address yield; - // maximum amount of underlying tokens that can be invested into vault - uint256 maxInvestedAmount; // expected amount of underlying tokens to be left at the pool after successful rebalance uint96 buffer; + // operator address (or address(0) if permissionless) + address yieldOperator; // slippage/rounding protection buffer, small part of accumulated interest that is non-claimable uint96 dust; // address to receive accumulated interest during the rebalance address interestReceiver; - // operator address (or address(0) if permissionless) - address yieldOperator; + // maximum amount of underlying tokens that can be invested into vault + uint256 maxInvestedAmount; } YieldParams public yieldParams; diff --git a/test/interfaces/IZkBobPoolAdmin.sol b/test/interfaces/IZkBobPoolAdmin.sol index 272bd0e..544a31f 100644 --- a/test/interfaces/IZkBobPoolAdmin.sol +++ b/test/interfaces/IZkBobPoolAdmin.sol @@ -10,16 +10,16 @@ interface IZkBobPoolAdmin { struct YieldParams { // ERC4626 vault address (or address(0) if not set) address yield; - // maximum amount of underlying tokens that can be invested into vault - uint256 maxInvestedAmount; // expected amount of underlying tokens to be left at the pool after successful rebalance uint96 buffer; + // operator address (or address(0) if permissionless) + address yieldOperator; // slippage/rounding protection buffer, small part of accumulated interest that is non-claimable uint96 dust; // address to receive accumulated interest during the rebalance address interestReceiver; - // operator address (or address(0) if permissionless) - address yieldOperator; + // maximum amount of underlying tokens that can be invested into vault + uint256 maxInvestedAmount; } function denominator() external pure returns (uint256);