Changelog
From v2 to v4
BuildersV2 -> BuildersV4
Storage
Some of the storage variables have been deprecated to unusedStorage... to maintain upgradeability alignment:
editPoolDeadlinerenamed tounusedStorage1_V4Updateand deprecated. The functionality of time-limited Subnet editing has been removed.
Some variables were renamed to improve the clarity of the contract logic:
totalPoolDatarenamed toallSubnetsData.builderPoolsrenamed tosubnets.buildersPoolDatarenamed tosubnetsData.struct
BuilderPoolrenamed toSubnet.struct
BuilderPoolDatarenamed toSubnetData.struct
TotalPoolDatarenamed toAllSubnetsData.
Introduced new storage fields such as:
rewardPool.subnetCreationFeeAmount.networkShare.networkShareOwner.subnetsMetadata.allSubnetsDataV4.FEE_SUBNET_CREATE.
Some existing structures stopped using certain functionality (see here), so some fields were renamed to unusedStorage.. accordingly to reflect their updated purpose.
Functions
Some functions have been removed because their functionality is no longer needed or does not meet requirements.
Deprecated functions
setEditPoolDeadline(...)getNotDistributedRewards(...)getCurrentUserMultiplier(...)getLockPeriodMultiplier(...)
Signature changed functions
createBuilderPool(BuilderPool calldata builderPool_)->createSubnet(Subnet calldata subnet_, SubnetMetadata calldata metadata_)editBuilderPool(BuilderPool calldata builderPool_)->editSubnet(bytes32 subnetId_, Subnet calldata newSubnet_)getPoolId(string memory builderPoolName_)->getSubnetId(string memory subnetName_)orgetSubnetIdOld(string memory subnetName_)getCurrentBuilderReward(bytes32 builderPoolId_)->getCurrentSubnetRewards(bytes32 subnetId_)
BuilderPool -> Subnet changes
In the new version of the protocol, the logic of Subnets has been simplified. The claim lock and subnet start time are no longer used — once a Subnet is created, users can immediately start depositing tokens without any time restrictions.
Additionally, support has been added for an extra address (claimAdmin) that can claim rewards on behalf of the main subnet admin. See Subnet.claimAdmin.
Subnets now support metadata, allowing descriptive or auxiliary information to be attached. See SubnetMetadata struct.
Editing is split into two parts: a user can update the main subnet configuration (editSubnet()) and its metadata (editSubnetMetadata()) independently. However, as before, the Subnet name cannot be changed after creation.
The Subnet ID format has also been updated: it is now calculated based on the blockchain’s chain ID and the Subnet name. This ensures uniqueness of names within each network. Existing subnets continue to use the legacy ID format to maintain backward compatibility.
/**
* @dev Get the Subnet ID by the `subnetName_` and the current `block.chainid`.
* All Subnets in V4 will have new IDs.
*/
function getSubnetId(string memory subnetName_) public view returns (bytes32) {
return keccak256(abi.encodePacked(block.chainid, subnetName_));
}
/**
* @dev Get the Subnet ID by the `subnetName_`. Wee keep this function for backward
* compatibility.
*/
function getSubnetIdOld(string memory subnetName_) public pure returns (bytes32) {
return keccak256(abi.encodePacked(subnetName_));
}Reward Distribution Mechanism Update
The reward distribution logic has been redesigned. Rewards are now continuously distributed to subnets based on an emission curve stored in the RewardPool contract under a specific index - 3. The _getCurrentRate() method has been refactored to accommodate this behavior.
Since the protocol operates in a multichain environment — where a single emission curve serves multiple networks — a networkShare multiplier has been introduced. This multiplier is applied to all rewards distributed on a particular network.
The multiplier can be set either by the protocol administrator or a designated trusted address, stored in variable networkShareOwner and assigned through function setNetworkShareOwner(). Its value must always be less than or equal to 1, and is expected to reflect the total stake volume within the respective network.
Power Factor
Totally deprecated with related functionality.
BuildersTreasury -> BuildersTreasuryV2
The contract has remained mostly unchanged. To improve security, the SafeERC20 library was introduced. The getAllRewards() function was removed, as it is no longer required under the current architecture.
A new function withdraw() was added to allow the multisig (contract owner) to withdraw MOR tokens from the contract as needed. This provides greater flexibility for rewards management and simplifies contract maintenance.
RewardPool
The new protocol architecture introduces the RewardPool contracts to support new business logic.
Links
Last updated
Was this helpful?