Integrating R2 Vault

This document outlines the required steps for integrating with the R2 Protocol, enabling applications to support USDC deposits, sR2USD issuance, and redemptions. All yield operations are fully managed by the protocol’s on-chain YieldManager, requiring no additional integration effort.

For integration assistance:

Example repo 👉 r2protocol-integration-example

About referral code, Request partnership referral codes from the official team.

Components

Primary user-facing contract used for:

  • Minting sR2USD (via USDC deposits)

  • Redeeming sR2USD (receiving R2USD)

  • Redeeming R2USD (receiving USDC)

Integration Workflow

Process is fully synchronous from the integrator’s perspective. No additional steps are required from integrators.


Deposit (Mint sR2USD)

To mint sR2USD, applications must perform the following:

  1. USDC Approval User approves the R2Minting contract to spend the specified USDC amount.

  2. Mint Request Application calls depositSharesViaUsdc(sharesTokenAddress,userAddress,amount,referral) on the R2Minting contract.

  3. Token Issuance sR2USD is minted 1:1 to the user’s address.


Redemption sR2USD (Receive R2USD)

  1. Quote MaxRedeem Amount To verify the maximum amount a user can redeem, the application invokes maxRedeem(userAddress) on the sR2USD contract.

  2. Redeem Request Application calls redeem(amount,userAddress,userAddress,referral) on the sR2USD contract.

  3. Token Burn The specified sR2USD amount is burned.

  4. Settlement & Payout The specified R2USD is transferred to the user's address.


Redemption R2USD (Receive USDC)

  1. Redeem Request Application calls redeem(amount) on the R2Minting contract.

  2. Token Burn The specified R2USD amount is burned.

  3. Settlement & Payout The specified USDC is transferred to the user's address.

Yield strategies, allocation logic, and fund migrations are abstracted and require no integration work.

Last updated