Token Resurrection - Analysis of Locked OP Tokens (Season 6 Mission Grantee)

This task was conducted for the Optimism Collective as part of the Season 6 Mission Grant.

TL;DR

The Token Resurrection project is driven by the need to address a common yet challenging problem in the blockchain ecosystem: recovering tokens that users mistakenly send to smart contracts without token recovery functions. Throughout this project, we have made significant progress in identifying and categorizing such locked tokens, particularly focusing on the OP Mainnet. This report covers the findings from Milestone 1 and Milestone 2 of the Optimism Season 6 grant, presenting both the detailed research, analysis and technical work undertaken to bring us closer to resolving this issue for the Optimism community.

Acknowledgement

We would like to extend our gratitude to the Optimism Collective and Council Members for supporting the Token Resurrection project through Season 6 Mission Grants.

Introduction

The Token Resurrection project was launched to address a growing issue on the OP Mainnet—users mistakenly sending OP tokens to smart contract addresses without token recovery functions, effectively locking the tokens. The purpose of this project is to help users recover their lost OP tokens and establish a process to ensure that future tokens sent in error can be recovered.

The project was divided into two milestones:

  • Milestone 1 focused on researching and documenting the criteria for identifying smart contracts without recovery functions, creating a guide for manual verification, and analyzing the amount of locked OP tokens on the OP Mainnet.
  • Milestone 2 aimed to develop a user-friendly interface for users to identify their locked tokens, implement a Merkle root mechanism for secure claims, and test the process to ensure integrity and security.

In this report, we summarize the methods, findings, and results from both milestones and propose a solution to recover these lost tokens by minting new tokens and assigning them to our team for distribution.

Methods

Data Collection and Contract Analysis

  • We began by collecting transaction data from the OP token contract on OP Mainnet. Our analysis filtered transactions sent to smart contracts and excluded externally owned accounts(EOAs). This provided a dataset of 6,560 unique contracts holding over 1 OP token each.
  • Each contract was categorized into types: Gnosis Safe Proxy, Vault Contracts, ERC-20 Tokens, and Other Contracts. After removing Gnosis Safe and Vault contracts, we narrowed them down to 1,855 contracts for further review.

Verification Process and Checklist Development

  • For Milestone 1, we developed a checklist to manually verify whether the identified contracts had token recovery functions. We examined contract ABIs for functions like sweep, rescue, or withdrawal mechanisms and excluded contracts that already had built-in recovery functions. After refining our analysis, we focused on 704 contracts with no token outflow, manually verifying if they held locked tokens.

Merkle Root and Claim System Development

  • In Milestone 2, we developed a Merkle root mechanism based on the collected data. Using this, we created a secure process for users to identify their locked tokens and sign a proposal to claim them. The data integrity was tested, and a smart contract using the Merkle root was deployed to allow only eligible addresses to claim the tokens.

Frontend Development for User Interaction

  • A user-friendly interface was created to allow users to easily identify their locked tokens and sign claims. This interface was integrated with the backend system, enabling seamless interaction with the claim process.

Results

  1. Milestone 1 Findings

    • Through comprehensive analysis, we identified 45 contracts that hold a total of 173,515 OP tokens (~ $279,358.38 - As of 3rd October 2024 at the Price of $1.61 per OP) locked due to user errors. These contracts were thoroughly reviewed to ensure that the tokens were indeed irrecoverable without external intervention.
    • The detailed breakdown of the user addresses and locked amounts can be found in our data sheet, which tracks every verified contract holding locked OP tokens.
  2. Milestone 2 Developments

    • We successfully implemented the Merkle root generation system and integrated it into a smart contract. The root was tested to ensure data integrity and security, providing a safe mechanism for users to recover their tokens. The interface was designed with usability in mind, allowing users to easily interact with the platform and initiate claims.
    • The system is now ready to process claims once the required OP tokens are minted.

Conclusion

In conclusion, our analysis confirms that 173,515 OP tokens (~ $279,358.38 - As of 3rd October 2024 at the Price of $1.61 per OP) are currently locked across 45 contracts with detailed analysis provided in Milestones 1 and 2.

We propose that the Optimism Collective consider minting or granting an equivalent amount of OP tokens to recover the lost assets, starting with the tokens that are locked in the OP ERC20 contract.

This approach is inspired by traditional financial practices where central authorities recover soiled notes and issue replacements to maintain the economy’s integrity. The Optimism Collective, with its power to mint tokens, could similarly set a precedent by enabling OP token holders to recover lost tokens, ensuring that the Net Total Supply is maintained as:

Net Total Supply = Total Minted OP - Unrecoverable OP

By taking this action, the Collective can support its users while establishing a model for token recovery that reinforces confidence in the OP ecosystem.

Next Steps

Before formally submitting this proposal to the Optimism Collective, we will first gather consensus from affected token holders. Specifically, we aim to engage with 120 addresses that have lost $50 worth of OP tokens or more by transferring OP to OP ERC20. These users will be invited to sign the proposal on the Token Resurrection platform, which outlines the request for Optimism Collective to mint and distribute new OP tokens or provide these tokens as a grant by marking these as irrecoverable.

The proposed distribution framework is as follows:

  • 70% of the recovered tokens will be reimbursed to the original holders.
  • 20% will be allocated as a DAO fee.
  • 10% will cover platform fees.

Once the required signatures from these token holders are collected, we will formally present the proposal to the Optimism Collective for consideration.
We will consult with the Developer Advisory Board to confirm the irrecoverable nature of these OP tokens too.

Resources -

  1. Platform - Token Resurrection
  2. Detailed Research Report - Detailed Report for Optimism Collective
  3. Detailed findings including the locked OP tokens Database - Locked OP Tokens Database
  4. User Addresses and Locked Amounts - User addresses and Locked amounts
  5. Merkle Root - Merkle Root
  6. User guide - User guide
7 Likes