<aside> ⚠️

Disclaimer

This document provides a high-level overview of the updates required to the Tenderize adapter for The Graph in light of the Horizon upgrade.

The analysis is limited to interactions with The Graph Protocol contracts, and recommendations are based solely on those observed contract calls without any prior knowledge of how they are utilized in the context of Tenderize. A comprehensive review by someone familiar with the Tenderize protocol’s architecture and internal mechanics is strongly recommended to determine whether additional modifications are necessary beyond the superficial changes identified here.

</aside>

Recommended read about Horizon

Quick TLDR of conceptual changes with Horizon

Interface changes

All contract interfaces can be found here: https://github.com/graphprotocol/contracts/tree/main/packages/interfaces

Note that when using the new interfaces:

| GRAPH_STAKING.delegationTaxPercentage() | DEPRECATED

In Horizon there is no delegation tax. | | --- | --- | | GRAPH_STAKING.delegationPools() | REPLACED

delegationPools(address indexer) -> getDelegationPool(address serviceProvider , address verifier) | | GRAPH_STAKING.delegationUnbondingPeriod() | DEPRECATED

In Horizon each data service sets their own thawing period. Can be obtained by calling getProvision(address serviceProvider, address verifier).thawingPeriod | | GRAPH_EPOCHS.epochLength() | NO CHANGES | | GRAPH_STAKING.hasStake() | DEPRECATED

Can use getStake(address serviceProvider) > 0 | | GRAPH_STAKING.delegate() | NO CHANGES

We kept the delegate(address serviceProvider, uint256 tokens) for backwards compatibility, it delegates directly to the Subgraph Service.

Note that if the indexer has not created a provision for the Subgraph Service this function will revert. | | GRAPH_STAKING.getDelegation() | REPLACED

getDelegation(address indexer, address delegator) -> getDelegation(address serviceProvider, address verifier, address delegator) | | GRAPH_STAKING.undelegate() | NO CHANGES

Same as delegate() this one was kept for backwards compatibility. | | GRAPH_STAKING.withdrawDelegated() | REPLACED

withdrawDelegated(address indexer, address) -> withdrawDelegated(address serviceProvider, address verifier, uint256 nThawRequests)

Note that the old withdrawDelegated(address indexer, address) is still available in case there is any pending undelegation that is thawing when the Horizon upgrade goes live. | | GRAPH_EPOCHS.currentEpoch() | NO CHANGES |