Skip to content

Commit 43bc72b

Browse files
committed
fix: added comment to explain minimum delegation (TRST-M03)
1 parent 161f8a2 commit 43bc72b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/horizon/contracts/staking/HorizonStaking.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,8 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
867867
* have been done before calling this function.
868868
*/
869869
function _delegate(address _serviceProvider, address _verifier, uint256 _tokens, uint256 _minSharesOut) private {
870+
// Enforces a minimum delegation amount to prevent share manipulation attacks.
871+
// This stops attackers from inflating share value and blocking other delegators.
870872
require(_tokens >= MIN_DELEGATION, HorizonStakingInsufficientTokens(_tokens, MIN_DELEGATION));
871873
require(
872874
_provisions[_serviceProvider][_verifier].createdAt != 0,

0 commit comments

Comments
 (0)