TECHNOLOGY

Meet Finn: your friendly Tezos unstake finalization bot

Tezos stakers, meet Finn! Finn is an unstake finalization bot developed and operated by Trilitech.

TRILITECH

850 words, 5 minute read

Meet Finn 2 Compressed 1

The Seoul protocol upgrade will activate on Tezos mainnet on September 19th, at the end of cycle 997. Its activation will enable exciting new features: native multisig accounts, aggregated attestations, and open unstake finalization. The latter is a significant improvement in staking UX on Tezos, enabling 1-click unstaking operations.

In this post, we explain the underlying changes in Seoul and introduce Finn, a finalization bot developed and maintained by Trilitech. Finn will ensure that unstake requests are finalized automatically, and for all Tezos users.

Open staking at work #

Unstaking tez currently requires two manual steps:

This two-step process with a waiting period is required to ensure the security of the proof-of-stake mechanism, but it means that users must remember to finalize their unstake requests.

In practice, this second step is often forgotten. As of cycle 995, on-chain data shows:

We have also seen evidence of finalization operations being submitted too early, resulting in 0 tez being finalized. All in all, these situations have prompted requests to automate the finalization step.

In order to improve the staking UX, Seoul implements a small change to the protocol’s business logic: allowing unstake operations to be finalized by any user – and not only the concerned stakers themselves. Regardless of who triggers the finalize operation, the unstaked funds always remain in the staker’s account (as is the case before Seoul).

This small change enables developing an off-chain solution that automatically and periodically finalizes all finalizable unstake requests, and for all users.

Tezos stakers, meet Finn.

Introducing Finn #

Finn is a finalizer bot developed, maintained, and operated by Trilitech.

Its business logic is quite simple. Every blockchain cycle, Finn:

  1. Fetches stakers with finalizable unstake operations.
  2. Creates a batch of manager operations, where each operation in the batch is a finalize unstake operation for each staker. Batch size is bounded to 200 operations.
  3. Submits the batch, paying the respective gas fees.
  4. Repeats these steps as long as there are finalizable unstakes.

Finn has been deployed and tested in all Seoul-compatible test networks. It’s operational on Seoulnet and Ghostnet, and will soon be operational on Shadownet. Here is an example of how the open finalization batches look on a block explorer:

📣 Most importantly, we are happy to announce that Finn has been deployed on Tezos mainnet — and it is eagerly awaiting the activation of Seoul to start working. Indeed, Finn will be enabled on cycle 999: that is, at the beginning of the second cycle after the activation of Seoul.

In turn, it will also simplify user workflows in Tezos wallets and in applications like stake.tezos.com, as it will no longer be necessary for these tools to provide support for the finalize unstake operation.

Indeed, a new version of stake.tezos.com will be deployed on mainnet to reflect these changes. It can be tested already on Ghostnet.

Finn’s online status, and any incident, will be reported on status.tezos.com.

🧹 Clearing the finalization backlog. As we mentioned above, there are about one thousand unstake operations pending finalization in the backlog. Notably, 283 of these unfinalized unstake operations are pending since the activation of the staking mechanism on cycle 748: these are a leftover from the auto-staking mechanism used during the lifetime of the Oxford 2 protocol, which have yet to be manually finalized by Tezos bakers.

This will be cleared on the first run of Finn on mainnet. By having Finn automate finalization requests, there won’t be a backlog anymore.

Key Clarifications #

Some important clarifications, which follow up from earlier discussions and community questions:

Takeaways #

Open unstake finalization may be a relatively small change in the Tezos protocol… but one we believe will have a positive impact on staking UX for the whole ecosystem.

Welcome Finn! We have been waiting eagerly for your arrival.