R-Pool and Settlement Markets for Recoverable ERC-20R Tokens

Kaili Wang, Qinchen Wang, Calvin Cai, Dan Boneh

Abstract

The permanence of blockchain transactions presents a significant challenge in the event of theft or accidental loss. While the ERC-20R standard introduces a 24-hour "recoverable" window to mitigate these risks, it creates a liquidity gap that prevents such tokens from being used in standard DeFi protocols. This paper proposes R-Pools, a decentralized settlement market mechanism that enables immediate liquidity for unsettled tokens. By utilizing risk-adjusted exchange rates and automated market-making strategies, R-Pools allow users to offload the 24-hour recovery risk to liquidity providers, bridging the gap between reversible assets and the irreversible DeFi ecosystem.

1. Introduction

Blockchain finality is a core tenet of decentralized finance, yet it leaves users vulnerable to irreversible losses. The ERC-20R proposal addressed this by introducing a "recoverable" wrapper, allowing a 24-hour window for victims to freeze and claw back stolen assets via an arbitrator. However, this recovery window introduces a "waiting period" that renders the tokens incompatible with existing DeFi protocols like Uniswap or Aave, which require immediate finality.

To solve this, we introduce R-Pools, a market-based solution where users can pay a risk-adjusted fee to swap unsettled ERC-20R tokens for immediate, settled liquidity. This mechanism effectively commoditizes the risk of clawback, allowing liquidity providers (LPs) to earn fees by absorbing the 24-hour settlement risk.

2. Settlement Market Architectures

The paper outlines two primary models for implementing these settlement markets:

2.1 Automated Market R-Pool (AMM)

The Automated R-Pool functions similarly to a standard Automated Market Maker but incorporates a decentralized risk-rating oracle. This oracle assesses the probability that a specific transaction is fraudulent. The exchange rate is determined by a combination of this risk score and a bonding curve that monitors the pool's current liquidity levels. This ensures that higher-risk transactions incur higher fees, protecting the pool's solvency.

2.2 Order Book R-Pool

For a more granular approach, the Order Book R-Pool allows users to post "bids" to swap unsettled tokens. In this model, LPs manually evaluate the risk of clawback—considering factors like token provenance and user history—before choosing to fill an order. This approach provides more flexibility for complex risk assessments that might be difficult for an automated oracle to quantify.

3. Security and Risk Mitigation

A primary concern in a settlement market is the potential for attackers to "pre-clear" stolen funds. To prevent this, the authors implement a nonce-based security mechanism. Every transaction on an ERC-20R account increments a nonce; a risk-rating signature is only valid for a specific nonce. This ensures the account state cannot change between the risk assessment and the swap.

Furthermore, the authors address the LP-Shorting Attack, where a malicious actor might borrow LP tokens, trigger a clawback to devalue the pool, and then buy back the tokens at a discount. Through mathematical proof, the paper demonstrates that by capping exchange rates (e.g., ensuring the pool never pays more than 0.5 base tokens for 1 unsettled token in high-risk scenarios), such attacks can be rendered unprofitable.

4. Key Insights

  • Temporal Liquidity: R-Pools possess a unique self-replenishing property. Every "unsettled" token received by the pool automatically matures into "settled" liquidity after the 24-hour window expires, naturally restoring the pool's capacity.
  • Risk as a Tradable Asset: The R-Pool transforms a security feature (recoverability) into a financial product. LPs essentially act as decentralized insurers, providing a service that allows the broader ecosystem to remain functional despite the 24-hour recovery buffer.
  • Non-Fungibility of Risk: Unlike standard tokens, two unsettled ERC-20R tokens are not fungible if their risk profiles differ. This necessitates a departure from standard $x \cdot y = k$ AMM formulas in favor of risk-aware pricing.

5. Conclusion and Future Work

R-Pools provide a feasible architectural bridge between recoverable tokens and the irreversible world of DeFi. By defining the IERC-20R interface and establishing security bounds for settlement, this work enables a safer user experience without requiring a complete overhaul of existing protocols.

However, limitations remain. The current model is not applicable to non-fungible tokens (NFTs) due to their unique nature. Additionally, the system relies heavily on the integrity of off-chain risk-rating oracles. Future research will focus on cross-chain recovery mechanisms and the challenges of implementing dispute periods across Layer 2 rollups.

Summary updated

BibTeX
@inproceedings{wang2023r,
  author = {Kaili Wang and Qinchen Wang and Calvin Cai and Dan Boneh},
  title = {{R-Pool and Settlement Markets for Recoverable ERC-20R Tokens}},
  booktitle = {DeFi@CCS},
  year = {2023},
  doi = {10.1145/3605768.3623542},
}
Figure