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.
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:
USDC Approval User approves the R2Minting contract to spend the specified USDC amount.
Mint Request Application calls
depositSharesViaUsdc(sharesTokenAddress,userAddress,amount,referral)on the R2Minting contract.Token Issuance sR2USD is minted 1:1 to the user’s address.
Redemption sR2USD (Receive R2USD)
Quote MaxRedeem Amount To verify the maximum amount a user can redeem, the application invokes
maxRedeem(userAddress)on the sR2USD contract.Redeem Request Application calls
redeem(amount,userAddress,userAddress,referral)on the sR2USD contract.Token Burn The specified sR2USD amount is burned.
Settlement & Payout The specified R2USD is transferred to the user's address.
Redemption R2USD (Receive USDC)
Redeem Request Application calls
redeem(amount)on the R2Minting contract.Token Burn The specified R2USD amount is burned.
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