ERC-5883 Social recovery token transfer (Token Transfer by Social Recovery)
Stagnant · Accounts & wallets · created 2022-07-19
A social recovery standard that allows tokens belonging to an account that has lost its private key to be transferred to a new account, based on approvals and reputation scores from surrounding 'neighbour' identities.
Why it is needed
If an account loses its private key, there is no way to recover the tokens it holds, and they are permanently lost. This harms not only the party who lost access, but also reduces the circulating supply of the token, hindering the natural growth and planned development of that token's ecosystem. Handling recovery purely through technical means is vulnerable to theft or hijacking, so an approval process involving human (neighbour) judgment is needed, but without a standardized approach, each project implements it differently.
What to implement
function approveTransfer(address from_, address to_) external;: A function through which another identity, related to but independent from the account, approves the transfer.function requestTransfer(address from_, address to_) external payable;: A function through which a user requests to move their on-chain identity to another wallet, requiring approval from n nearest neighbour identities.function addNeighbour(address neighbour_) external;: Adds a neighbour identity that can cast approval votes.function removeNeighbour(address neighbour_) external;: Removes a registered neighbour identity.
In depth
Premise: Soul and neighbour structure
This proposal builds on the Soul Bound Token idea, calling identities connected to a person 'Souls.' When access to an account is lost, other Souls (neighbours) connected to that account approve the transfer with a Yes/No vote, and the tokens move to the new account. Approval presupposes human involvement rather than purely technical verification.
Interface composition
ISocialRecovery consists of four functions. requestTransfer(from_, to_) is payable and registers a request to move an account to another wallet, requiring approval from n nearest neighbours. approveTransfer(from_, to_) records that a related but independent identity has approved that request. addNeighbour(neighbour_) and removeNeighbour(neighbour_) register or remove a neighbour identity, respectively.
Reputation score formula
The contract is recommended to calculate node n's score as score(n) = tanh( (sum of logs over neighbours / (number of neighbours + 1)) + n's reward count ). The log term discounts each neighbour i's reward count (n_i^r) by a weight (1 / (t - n_i^t + 1)) that is inversely proportional to the time elapsed since that neighbour's last reward was credited (n_i^t) relative to the current time t. In other words, neighbours with more rewards who have acted more recently contribute more to the score.
Conditions for a transfer to succeed
According to the flow diagram, two conditions must be satisfied simultaneously for a transfer to actually occur. First, the number of approving neighbours must meet or exceed a defined threshold. Second, the cumulative score of those approvers must also exceed a separate threshold. Only once both conditions are met does the smart contract transfer the asset, such as an identity token, to the new owner.
Reward mechanism
Once a transfer succeeds, the smart contract credits a reward to the neighbours who participated in the approval. This reward count and timing are then fed back as inputs into the score formula described earlier, so that neighbours who participate actively in approvals and have received rewards recently gain greater influence in future approvals.
Design rationale
The proposers believe this score formula creates a robust and consistent incentive structure that lends credibility to on-chain scores. By incorporating a decay of weight over time, recent activity is reflected more than activity from long ago, which they say improves the fairness of the metric.
Proposal status
This ERC is in Stagnant status, a proposal no longer under active discussion. It should be read with the understanding that it remains at the idea stage rather than being an actually deployed standard.
Things to watch out for
- No mechanism to prevent reward farming: Someone with sufficient funds could invest heavily to accumulate large rewards, and there is currently no way to prevent this. There is also no means of reliably linking an address to a real person, only an unrealized idea of fuzzy hashing real world objects to produce matching values.
- Lack of experience with threshold values: A transfer must exceed a threshold to succeed, but there is not yet enough experience to judge what counts as a 'good' versus a 'bad' threshold, so initial values may need future adjustment.
- Risk of neighbour network inactivity: If activity in the neighbour network declines, the minimum number of required approvals may not be reached, leaving users unable to proceed with a transfer. Since the contract ultimately depends on usage, it becomes useless if it falls out of use.