Assessment reports>Anzen and protocol-v2>Threat Model>Function: increaseLockPositionAndBroadcast(uint128 additionalAmountToLock, uint128 newExpiry, uint256[] calldata chainIds)

Function: increaseLockPositionAndBroadcast(uint128 additionalAmountToLock, uint128 newExpiry, uint256[] calldata chainIds)

The function combines the operations of increasing the lock position of the user and broadcasting the updated position across specified chains.

Inputs

  • additionalAmountToLock

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: The parameter specifies how much additional Anzen is to be locked.

  • newExpiry

    • Control: Arbitrary.

    • Constraints: Must be a valid week start and within the allowed lock duration.

    • Impact: The parameter sets a new expiry date for the lock.

  • chainIds

    • Control: Arbitrary.

    • Constraints: Must be nonempty and supported chain IDs.

    • Impact: The parameter specifies the chains to broadcast the update.

Branches and code coverage

Intended branches

  • Call increaseLockPosition to update the user's locked position by transferring additional funds and adjusting the expiry.

  • Call within increaseLockPosition for internal state updates and calculations related to the VE-token balance.

  • Broadcast updates user position to specified chains.

Negative behavior

  • Revert if chainIds is empty.

  • Revert if elements of chainIds are not in destinationContracts.

  • Revert if newExpiry results in an invalid lock duration or is otherwise inappropriate relative to the current time or lock policy.

Zellic © 2025Back to top ↑