Contracts
Protocol architecture

Core contracts
BuildersV4
The BuildersV4
contract governs the protocol’s core logic and state. It facilitates the creation and configuration of Subnets, user staking and withdrawal operations, and the dynamic reward distribution process.
A user can create a new Subnet by specifying parameters such as the administrator, claim administrator, minimum deposit... If a creation fee is configured, it is collected and forwarded to the appropriate treasury address via the FeeConfig
contract.
Users may deposit MOR tokens into a Subnet, increasing its total stake and share in the global reward pool. Withdrawals are subject to a lock period defined per Subnet, and users must either maintain the minimum required deposit or fully exit their stake. Upon deposit, withdrawal, or reward claim, the contract recalculates reward allocations using the current emission rate provided by the RewardPool
contract. This emission rate is scaled by the “network share” parameter to determine the portion allocated to Builders in the specific chain.
The administrator or claim administrator of a Subnet can trigger a claim, transferring accrued MOR rewards to a specified recipient address. Any applicable fee is deducted and transferred to the treasury. All Subnet and global statistics are updated with each operation to ensure accurate state tracking.
BuildersTreasuryV2
BuildersTreasuryV2
holds MOR tokens for distribution to Subnets. It receives reward claims initiated by the BuildersV4
contract and securely transfers tokens to recipients. The treasury also tracks the total amount of claimed rewards.
Only the BuildersV4
contract is authorized to execute reward payouts. The owner retains the ability to change the BuildersV4
address and manually withdraw MOR tokens when needed, for purposes such as migration or administrative recovery.
See the documentation for this contract here.
See the documentation for this contract here.
Periphery
OpenZeppelin
Used extensively across contracts to support secure access control and upgradeability:
OwnableUpgradeable
– enables ownership access control.UUPSUpgradeable
– facilitates contract upgradeability via the UUPS (Universal Upgradeable Proxy Standard) pattern.
Links:
Last updated
Was this helpful?