@rev-net/core-v6 0.0.56 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rev-net/core-v6",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,14 +26,14 @@
26
26
  "artifacts": "source ./.env && npx sphinx artifacts --org-id 'ea165b21-7cdc-4d7b-be59-ecdd4c26bee4' --project-name 'revnet-core-v6'"
27
27
  },
28
28
  "dependencies": {
29
- "@bananapus/721-hook-v6": "^0.0.50",
30
- "@bananapus/buyback-hook-v6": "^0.0.46",
31
- "@bananapus/core-v6": "^0.0.53",
32
- "@bananapus/ownable-v6": "^0.0.24",
29
+ "@bananapus/721-hook-v6": "^0.0.51",
30
+ "@bananapus/buyback-hook-v6": "^0.0.47",
31
+ "@bananapus/core-v6": "^0.0.54",
32
+ "@bananapus/ownable-v6": "^0.0.25",
33
33
  "@bananapus/permission-ids-v6": "^0.0.25",
34
- "@bananapus/router-terminal-v6": "^0.0.43",
35
- "@bananapus/suckers-v6": "^0.0.46",
36
- "@croptop/core-v6": "^0.0.42",
34
+ "@bananapus/router-terminal-v6": "^0.0.44",
35
+ "@bananapus/suckers-v6": "^0.0.47",
36
+ "@croptop/core-v6": "^0.0.48",
37
37
  "@openzeppelin/contracts": "5.6.1",
38
38
  "@uniswap/permit2": "github:Uniswap/permit2#cc56ad0f3439c502c246fc5cfcc3db92bb8b7219"
39
39
  },
@@ -79,12 +79,6 @@ contract REVDeployer is ERC2771Context, IREVDeployer, IERC721Receiver {
79
79
  /// @dev 30 days, in seconds.
80
80
  uint256 public constant override CASH_OUT_DELAY = 2_592_000;
81
81
 
82
- /// @notice The cash out fee (as a fraction out of `JBConstants.MAX_FEE`).
83
- /// Cashout fees are paid to the revnet with the `FEE_REVNET_ID`.
84
- /// @dev Fees are charged on cashouts if the cash out tax rate is greater than 0%.
85
- /// @dev When suckers withdraw funds, they do not pay cash out fees.
86
- uint256 public constant override FEE = 25; // 2.5%
87
-
88
82
  /// @notice The default Uniswap pool fee tier used when auto-configuring buyback pools.
89
83
  /// @dev 10_000 = 1%. This is the standard fee tier for most project token pairs.
90
84
  uint24 public constant DEFAULT_BUYBACK_POOL_FEE = 10_000;
package/src/REVOwner.sol CHANGED
@@ -9,6 +9,7 @@ import {IJBRulesetDataHook} from "@bananapus/core-v6/src/interfaces/IJBRulesetDa
9
9
  import {IJBTerminal} from "@bananapus/core-v6/src/interfaces/IJBTerminal.sol";
10
10
  import {JBCashOuts} from "@bananapus/core-v6/src/libraries/JBCashOuts.sol";
11
11
  import {JBConstants} from "@bananapus/core-v6/src/libraries/JBConstants.sol";
12
+ import {JBFees} from "@bananapus/core-v6/src/libraries/JBFees.sol";
12
13
  import {JBAccountingContext} from "@bananapus/core-v6/src/structs/JBAccountingContext.sol";
13
14
  import {JBAfterCashOutRecordedContext} from "@bananapus/core-v6/src/structs/JBAfterCashOutRecordedContext.sol";
14
15
  import {JBBeforeCashOutRecordedContext} from "@bananapus/core-v6/src/structs/JBBeforeCashOutRecordedContext.sol";
@@ -46,15 +47,6 @@ contract REVOwner is IJBRulesetDataHook, IJBCashOutHook, IJBPeerChainAdjustedAcc
46
47
  error REVOwner_CashOutDelayNotFinished(uint256 cashOutDelay, uint256 blockTimestamp);
47
48
  error REVOwner_Unauthorized(address caller, address expectedCaller);
48
49
 
49
- //*********************************************************************//
50
- // ------------------------- public constants ------------------------ //
51
- //*********************************************************************//
52
-
53
- /// @notice The cash out fee (as a fraction out of `JBConstants.MAX_FEE`).
54
- /// @dev Cashout fees are paid to the revnet with the `FEE_REVNET_ID`.
55
- /// @dev When suckers withdraw funds, they do not pay cash out fees.
56
- uint256 public constant FEE = 25; // 2.5%
57
-
58
50
  //*********************************************************************//
59
51
  // --------------- public immutable stored properties ---------------- //
60
52
  //*********************************************************************//
@@ -219,7 +211,7 @@ contract REVOwner is IJBRulesetDataHook, IJBCashOutHook, IJBPeerChainAdjustedAcc
219
211
  // a better price. This is by design.
220
212
  // Micro cash outs (< 40 wei at 2.5% fee) round feeCashOutCount to zero, bypassing the fee.
221
213
  // Economically insignificant: the gas cost of the transaction far exceeds the bypassed fee. No fix needed.
222
- uint256 feeCashOutCount = mulDiv({x: context.cashOutCount, y: FEE, denominator: JBConstants.MAX_FEE});
214
+ uint256 feeCashOutCount = JBFees.standardFeeAmountFrom(context.cashOutCount);
223
215
  uint256 nonFeeCashOutCount = context.cashOutCount - feeCashOutCount;
224
216
 
225
217
  // Compute the gross (effective-surplus) reclaim and fee amounts. The bonding curve uses cross-chain effective
@@ -119,10 +119,6 @@ interface IREVDeployer {
119
119
  /// @return The directory contract.
120
120
  function DIRECTORY() external view returns (IJBDirectory);
121
121
 
122
- /// @notice The cash out fee as a fraction out of `JBConstants.MAX_FEE`.
123
- /// @return The fee value.
124
- function FEE() external view returns (uint256);
125
-
126
122
  /// @notice The Juicebox project ID of the revnet that receives cash out fees.
127
123
  /// @return The fee revnet ID.
128
124
  function FEE_REVNET_ID() external view returns (uint256);