11// SPDX-License-Identifier: MIT
22pragma solidity ^ 0.8.28 ;
33
4- import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet .sol " ;
4+ import {EnumerableMap, EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableMap .sol " ;
55
66interface IRevenueRouter {
77 /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
@@ -19,6 +19,8 @@ interface IRevenueRouter {
1919 /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
2020
2121 error WaitForNewPeriod ();
22+ error IncorrectSetup ();
23+ error CantProcessAction ();
2224
2325 /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
2426 /* DATA TYPES */
@@ -36,6 +38,9 @@ interface IRevenueRouter {
3638 Unit[] units;
3739 address [] aavePools;
3840 EnumerableSet.AddressSet vaultsAccumulated;
41+ EnumerableSet.AddressSet assetsAccumulated;
42+ EnumerableMap.AddressToUintMap minSwapAmount;
43+ EnumerableMap.AddressToUintMap maxSwapAmount;
3944 }
4045
4146 enum UnitType {
@@ -64,6 +69,15 @@ interface IRevenueRouter {
6469 /// @notice Setup Aave pool list
6570 function setAavePools (address [] calldata pools ) external ;
6671
72+ /// @notice Set min swap amounts for assets
73+ function setMinSwapAmounts (address [] calldata assets , uint [] calldata minAmounts ) external ;
74+
75+ /// @notice Set max swap amounts for assets
76+ function setMaxSwapAmounts (address [] calldata assets , uint [] calldata maxAmounts ) external ;
77+
78+ /// @notice Change revenue share for Vaults Unit
79+ function setXShare (uint newShare ) external ;
80+
6781 /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
6882 /* USER ACTIONS */
6983 /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
@@ -84,9 +98,15 @@ interface IRevenueRouter {
8498 /// @notice Claim units fees and swap to STBL
8599 function processUnitsRevenue () external ;
86100
87- /// @notice Withdraw assets from accumulated vaults and swap to STBL
101+ /// @notice Withdraw assets from accumulated vaults
88102 function processAccumulatedVaults (uint maxVaultsForWithdraw ) external ;
89103
104+ /// @notice Withdraw assets from accumulated vaults
105+ function processAccumulatedVaults (uint maxVaultsForWithdraw , uint maxWithdrawAmount ) external ;
106+
107+ /// @notice Distribute extracted accumulated assets amounts
108+ function processAccumulatedAssets (uint maxAssetsForProcess ) external ;
109+
90110 /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
91111 /* VIEW FUNCTIONS */
92112 /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
@@ -112,4 +132,7 @@ interface IRevenueRouter {
112132
113133 /// @notice Get vault addresses that contract hold on balance, but not withdrew yet
114134 function vaultsAccumulated () external view returns (address [] memory );
135+
136+ /// @notice Get assets that contract hold on balance
137+ function assetsAccumulated () external view returns (address [] memory );
115138}
0 commit comments