diff --git a/contracts/staking/IApplication.sol b/contracts/staking/IApplication.sol index a653c2a4..e55ce206 100644 --- a/contracts/staking/IApplication.sol +++ b/contracts/staking/IApplication.sol @@ -24,7 +24,9 @@ pragma solidity 0.8.9; interface IApplication { /// @notice Used by T staking contract to inform the application that the /// authorized amount for the given staking provider increased. - /// The application may do any necessary housekeeping. + /// The application may do any necessary housekeeping. The + /// application must revert the transaction in case the + /// authorization is below the minimum required. function authorizationIncreased( address stakingProvider, uint96 fromAmount, @@ -54,4 +56,8 @@ interface IApplication { uint96 fromAmount, uint96 toAmount ) external; + + /// @notice The minimum authorization amount required for the staking + /// provider so that they can participate in the application. + function minimumAuthorization() external view returns (uint96); } diff --git a/contracts/test/TokenStakingTestSet.sol b/contracts/test/TokenStakingTestSet.sol index a28b0098..954e3c8f 100644 --- a/contracts/test/TokenStakingTestSet.sol +++ b/contracts/test/TokenStakingTestSet.sol @@ -271,6 +271,10 @@ contract ApplicationMock is IApplication { } stakingProviderStruct.authorized = toAmount; } + + function minimumAuthorization() external view returns (uint96) { + return 0; + } } contract BrokenApplicationMock is ApplicationMock {