|
1 | 1 | // SPDX-License-Identifier: BUSL-1.1 |
2 | 2 | pragma solidity 0.8.26; |
3 | 3 |
|
4 | | -/// @title IRightsRedundancyManager |
5 | | -/// @notice Interface for managing redundancy limits for custodians. |
| 4 | +/// @title IRightsAssetCustodianManager |
| 5 | +/// @notice Interface for managing custodian assignment priorities, redundancy limits, and weight calculations. |
6 | 6 | interface IRightsAssetCustodianManager { |
7 | 7 | /// @notice Sets a custom priority value for a specific custodian assigned to the caller. |
8 | 8 | /// @dev Influences the weighting in the balancing algorithm used to select custodians. |
9 | 9 | /// @param custodian The custodian whose priority is being set. |
10 | 10 | /// @param priority The priority value to assign. Must be >= 1. |
11 | 11 | function setPriority(address custodian, uint256 priority) external; |
12 | 12 |
|
| 13 | + /// @notice Sets the maximum allowed number of custodians per holder. |
| 14 | + /// @param value The new maximum redundancy value. |
| 15 | + function setMaxAllowedRedundancy(uint256 value) external; |
| 16 | + |
13 | 17 | /// @notice Returns the maximum allowed number of custodians per holder. |
14 | 18 | /// @return The maximum redundancy value. |
15 | 19 | function getMaxAllowedRedundancy() external view returns (uint256); |
16 | 20 |
|
17 | | - /// @notice Sets the maximum allowed number of custodians per holder. |
18 | | - /// @param value The new maximum redundancy value. |
19 | | - function setMaxAllowedRedundancy(uint256 value) external; |
| 21 | + /// @notice Retrieves the priority level associated with a specific custodian and holder. |
| 22 | + /// @param custodian The address of the custodian whose priority is being queried. |
| 23 | + /// @param holder The address of the holder associated with the custodian. |
| 24 | + /// @return The priority level as a uint256 value. |
| 25 | + function getPriority(address custodian, address holder) external view returns (uint256); |
| 26 | + |
| 27 | + /// @notice Returns a custodian selected by a probabilistic balancing algorithm. |
| 28 | + /// @dev The selection is based on priority, demand and economic weight (balance). |
| 29 | + /// @param holder The address of the asset holder requesting a custodian. |
| 30 | + /// @param currency The currency used to evaluate the custodian's balance. |
| 31 | + /// @return The selected custodian address. |
| 32 | + function getCustodian(address holder, address currency) external view returns (address); |
| 33 | + |
| 34 | + /// @notice Calculates the weighted score of a custodian for a specific holder and currency. |
| 35 | + /// @dev Used to externally query the score that influences custodian selection. |
| 36 | + /// @param custodian The address of the custodian. |
| 37 | + /// @param holder The address of the rights holder. |
| 38 | + /// @param currency The token used to evaluate economic backing. |
| 39 | + /// @return The computed weight used in the balancing algorithm. |
| 40 | + function getWeight(address custodian, address holder, address currency) external view returns (uint256); |
| 41 | + |
| 42 | + /// @notice Retrieves the total number of holders assigned to a custodian. |
| 43 | + /// @dev Represents the current load (demand) of a custodian in terms of assignments. |
| 44 | + /// @param custodian The custodian address to query. |
| 45 | + /// @return The number of holders currently assigned to the custodian. |
| 46 | + function getDemand(address custodian) external view returns (uint256); |
20 | 47 | } |
0 commit comments