What Is the RheoFi Lending Primitive on XRPL EVM?
RheoFi is an isolated-pool algorithmic money market native to the XRPL EVM Sidechain, with per-asset collateral factors governance-set between 40% and 90% and 15 prior security audits across 6 firms behind the inherited codebase (RheoFi Whitepaper v1.0, April 2026). Each pool exposes a standard EVM ABI for Solidity clients across 10+ core contracts.
The primitive at a glance
Every isolated pool ships four contracts an integrator touches directly: a Comptroller, one rToken per underlying asset, a Jump Rate Model, and a Resilient Oracle. Supporting contracts (Risk Fund, Shortfall Auction, ACM) sit behind those and rarely require direct calls from an integrator's smart contract. Wrapping the rToken behind an ERC-4626-style vault adapter is optional and follows the tokenized-vault standard verbatim (EIP-4626, Final).
Why XRPL EVM as the substrate
The chain uses XRP as native gas, so users bridging XRP from the XRPL mainnet get lending exposure without swapping for a new gas token. Low-fee transactions plus ~2.08-second slot times mean keeper loops, rebalancers, and agentic strategies can post transactions frequently without the fee tax you see on 12-second L1 chains.
RheoFi vs. Legacy EVM Money Markets: What Changes for a Solidity Dev?
RheoFi runs the UUPS pattern (EIP-1822) with the implementation stored in one EIP-1967 slot at 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, a 32-byte location cold-written at ~20K-gas per SSTORE, versus 5%+ overhead in transparent-proxy admin lookups (EIP-1967, Final). Integrators read the current implementation without a dedicated getter.
Comparison table
| Feature | RheoFi (XRPL EVM) | Legacy shared-pool EVM markets | Prior isolated-pool designs |
|---|---|---|---|
| Pool model | Isolated per asset | Shared collateral | Isolated |
| Slot time | ~2.08s | ~12s | Varies |
| Gas token | XRP | ETH | Chain-native |
| Rate curve | Jump Rate (0/10/250 @ 80% kink) | Varies | Jump Rate |
| Oracle | 3-tier Resilient | Single Chainlink feed | Chainlink |
| Upgrade path | UUPS (EIP-1822/1967) | Transparent proxy common | Mixed |
Storage and upgrade differences
Under UUPS, the upgrade authorization lives inside the implementation, not the proxy admin. If you fork the ABI for a wrapper contract, do not shadow _authorizeUpgrade (OpenZeppelin, 2026). Isolated pools also mean each asset has its own Comptroller instance, so cross-pool composability is explicit rather than implicit.
Why Build on RheoFi and XRPL EVM in 2026?
Building on RheoFi in 2026 means inheriting 15 prior security audits across 6 firms into an isolated-pool ABI already calibrated for the XRPL EVM Sidechain testnet, with a Jump Rate curve at base 0%, slope 10%/year, kink 80% (RheoFi Whitepaper v1.0, April 2026). Integrators skip primitive redesign and pin code to an audit-anchored contract surface.
Cost profile for keeper strategies
At ~2.08-second slots, a keeper that posts one heartbeat transaction per block emits roughly 1,730 transactions per hour, so operational overhead scales linearly with the chain's low-fee unit cost rather than fee volatility. That cadence lets liquidation bots and agentic strategies keep positions actively managed at a predictable per-tx cost.
First-mover surface
RheoFi deployed the first isolated-pool money market to XRPL EVM testnet (RheoFi Whitepaper v1.0, April 2026), giving integrators primary rToken liquidity as XRP bridges from the XRPL mainnet. Bridging XRP native to the sidechain removes the gas-token swap step that fragments EVM-only DeFi.
Toolchain readiness
The chain targets the Paris EVM version and supports Solidity compilers up to 0.8.24 as of July 2026 (XRPL EVM Docs, July 2026). Any Hardhat or Foundry project already pinned to those versions ports without rewrites. Read the XRPL EVM Docs for the current chain ID and RPC endpoints.
How Does the RheoFi Isolated-Pool Contract Stack Work?
Interest pricing runs a Jump Rate curve with base rate 0%, slope 10%/year, jump multiplier 250%/year, and a kink at 80% utilization (RheoFi testnet, April 2026, Whitepaper v1.0). Every rToken call flows through accrueInterest before mutating balances, so read paths must recompute rates locally when block-precise APR is required.
Call graph for a supply
A supplier calls rToken.mint(uint256 amount). Internally, the contract triggers accrueInterest, transfers the underlying via IERC20.transferFrom, computes the current exchangeRateStored, and mints rToken units at that rate. The Comptroller is not required for a pure supply, only for borrow or collateral use.
Call graph for a borrow
A borrower first calls Comptroller.enterMarkets on the collateral markets, then rToken.borrow(uint256 amount). The Comptroller calls back to check getAccountLiquidity, which queries the Resilient Oracle. If the health factor allows, the borrow is issued and interest starts accruing at the current Jump Rate output. See Jump Rate Model on RheoFi for the derivation.
While calibrating Jump Rate parameters for the contract stack: Jump Rate Model Testnet Parameter Calibration Context: RheoFi calibrated Jump Rate parameters for the initial XRPL EVM testnet deployment: base 0%, slope 10%/year, jump multiplier 250%/year, kink at 80% utilization. Finding: The 80% kink held utilization below the jump zone during load tests, keeping steady-state borrow APR near 8% before the curve steepens sharply. Result: Integrators can safely target 60-75% utilization for yield strategies without triggering the 250%/year jump multiplier band.
What Are the Core Components of RheoFi: Comptroller, rTokens, Jump Rate, Oracle, Risk Fund?
The rToken follows ERC-20 semantics (EIP-20, Final) with 18 decimals and a governance-set MAX_COLLATERAL_FACTOR of 95% at the Comptroller level; every rToken issues 1:1 to underlying at pool genesis and diverges upward as exchangeRateStored grows from accrued borrow interest, giving suppliers a share-like receipt without a separate accounting layer.
Numbered component list
- Comptroller - Market entry, account liquidity, collateral factors, and pause guardrails per isolated pool.
- rToken - ERC-20 receipt with
mint,redeem,borrow,repayBorrow,liquidateBorrow, andaccrueInterest. - Jump Rate Model - Pure math contract exposing
getBorrowRate(cash, borrows, reserves)andgetSupplyRate(...). - Resilient Oracle - MAIN, PIVOT, and FALLBACK feed router with a BoundValidator to reject out-of-band prints.
- Risk Fund - Bad-debt reservoir funded by protocol reserves and shortfall auctions.
- Shortfall Auction - Dutch-style auction that swaps risk-fund assets for underperforming debt.
- Access Control Manager (ACM) - Role registry for governance-gated function selectors.
- Timelock - Delayed executor for parameter changes and upgrades.
- UUPS Proxy - EIP-1822 compatible proxy with
_authorizeUpgradegated by ACM. - rWETH Gateway - Wraps native XRP into ERC-20 for pool interactions where required.
Where integrators plug in
Most third-party contracts wrap only the rToken interface plus a Comptroller read call. That surface is stable across pools, so a single adapter can support every RheoFi market on the chain.
Ship your XRPL EVM lending integration this sprint
RheoFi runs an isolated-pool money market natively on XRPL EVM, with rTokens, Jump Rate pricing, and a three-tier oracle behind a stable ABI.
Deploy a testnet supply-and-borrow flow against live contracts on app.rheofi.com and read the ABI reference in the developer docs.
Backed by 15 prior audits across 6 firms carried over from the inherited codebase (RheoFi Whitepaper v1.0, April 2026).
How Do I Integrate RheoFi in a Solidity Contract?
Target Solidity 0.8.20 to 0.8.24 with evmVersion: "paris" and an optimizer at 200 runs, matching the chain's supported feature set and keeping bytecode within the 24KB EIP-170 contract-size limit (XRPL EVM Docs, July 2026). Anything above 0.8.24 risks opcodes the sidechain has not enabled; Foundry and Hardhat both work with a one-line network entry.
Prerequisites
- Node 20+ with Hardhat 2.22+ or Foundry (any recent nightly)
- Funded XRPL EVM testnet address (XRP for gas)
- RheoFi contract addresses from docs.rheofi.com/technical-reference/contracts-overview
- OpenZeppelin Contracts 5.x for
IERC20andIERC20Permit
Minimal Solidity integration
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
interface IRToken {
function mint(uint256 mintAmount) external returns (uint256);
function borrow(uint256 borrowAmount) external returns (uint256);
function repayBorrow(uint256 repayAmount) external returns (uint256);
function redeem(uint256 redeemTokens) external returns (uint256);
function exchangeRateStored() external view returns (uint256);
function accrueInterest() external returns (uint256);
function underlying() external view returns (address);
}
interface IComptroller {
function enterMarkets(address[] calldata rTokens) external returns (uint256[] memory);
function getAccountLiquidity(address account)
external view returns (uint256 err, uint256 liquidity, uint256 shortfall);
}
interface IERC20 {
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
contract RheoFiAdapter {
IComptroller public immutable comptroller;
constructor(address _comptroller) {
comptroller = IComptroller(_comptroller);
}
function supplyAndBorrow(
address rCollateral,
address rBorrow,
uint256 supplyAmount,
uint256 borrowAmount
) external returns (uint256) {
address underlying = IRToken(rCollateral).underlying();
IERC20(underlying).transferFrom(msg.sender, address(this), supplyAmount);
IERC20(underlying).approve(rCollateral, supplyAmount);
require(IRToken(rCollateral).mint(supplyAmount) == 0, "mint-failed");
address[] memory markets = new address[](1);
markets[0] = rCollateral;
comptroller.enterMarkets(markets);
require(IRToken(rBorrow).borrow(borrowAmount) == 0, "borrow-failed");
return borrowAmount;
}
}
Deployment steps
- Install dependencies:
npm i -D hardhat @openzeppelin/contracts. - Add the XRPL EVM network entry to
hardhat.config.tswith the RPC URL and chain ID from the XRPL EVM Docs. - Set
solidity: { version: "0.8.24", settings: { evmVersion: "paris", optimizer: { enabled: true, runs: 200 } } }. - Fund the deployer address with testnet XRP via the XRPL EVM faucet.
- Compile with
npx hardhat compileand confirm noparisviolations. - Deploy the adapter with
npx hardhat run scripts/deploy.ts --network xrplevm. - Call
supplyAndBorrowagainst a testnet rToken pair and confirm the tx within one ~2.08-second slot. - Verify the source on the XRPL EVM explorer for downstream integrator trust.
Gas budget mini-table
The values below are engineering estimates based on standard money-market EVM patterns, not on-chain benchmarks from the current RheoFi testnet build. Measure against your own testnet run before pinning limits in production.
| Operation | Est. gas | Notes |
|---|---|---|
IERC20.approve | ~55,000 | Skip using EIP-2612 permit where supported |
rToken.mint | 180,000-220,000 | Includes accrueInterest |
Comptroller.enterMarkets (1 market) | 90,000-130,000 | One-time per user per market |
rToken.borrow | 240,000-320,000 | Includes oracle read and liquidity check |
rToken.repayBorrow | 150,000-200,000 | Interest accrues on entry |
Advanced: EIP-2612 permit
Where the underlying implements EIP-2612 permit, a signed approval saves the entire approve transaction (roughly 40,000 gas per approval on standard ERC-20 implementations, EIP-2612, Final). Use it inside a single transaction that permits and mints to keep UX one-click.
What Are the Security Risks When Building on RheoFi?
RheoFi's public ABI inherits 15 prior audits across 6 firms plus a 5% protocol seize share on liquidations routed into the Risk Fund and a default 10% shortfall-auction incentive (RheoFi Whitepaper v1.0, April 2026). That does not eliminate integrator-side risks: oracle staleness, upgrade drift, and account-liquidity misreads remain the top three failure modes for wrappers.
Smart contract risks
Wrappers that hardcode implementation addresses instead of the proxy break on upgrade. Always resolve through the proxy and, where needed, verify implementation identity via the EIP-1967 slot before executing sensitive flows. Check proxiable() compatibility if you plan to fork the pattern (EIP-1822, Final) and gate wrapper trust with EIP-165 supportsInterface on any downstream contract you accept as a callback (EIP-165, Final).
Oracle and liquidation risks
Chainlink feeds can go stale under network stress, so integrators reading prices directly should confirm freshness via latestRoundData and reject rounds older than the heartbeat (Chainlink Data Feeds, 2026). RheoFi's Resilient Oracle routes MAIN, PIVOT, and FALLBACK feeds and applies a BoundValidator, but integrator wrappers that bypass it inherit single-feed risk. See the isolated-pool exploit lessons post for a shared-pool failure case.
In the whitepaper's security disclosure: Whitepaper v1.0 Publication Context: RheoFi published its first public whitepaper on April 14, 2026, documenting the full architecture of the algorithmic money-market system for the XRPL EVM Sidechain. Finding: The whitepaper disclosed 15 prior security engagements across 6 firms (PeckShield, Hacken, Certik, Quantstamp, FairyProof, Pessimistic) covering isolated-pool core, rewards distributor, risk fund, shortfall auction, comptroller, forced liquidations, time-based accrual, and native-token gateway. Result: Integrators can pin their integration to a stable, audit-anchored ABI and cite that lineage in institutional due-diligence packets.
Risk mitigation checklist
- Always call the proxy address, never the implementation.
- Call
accrueInterestbefore reading rates in the same block. - Handle non-zero return codes from
mint,borrow, andrepayBorrowas failures. - Bound your oracle reads with staleness checks even when using the Resilient Oracle.
- Read the money-market risk scorecard to grade pools before integrating.
- Pin the audited OpenZeppelin Contracts release you build against and cross-check the on-chain bytecode via the upstream repository (OpenZeppelin Contracts, GitHub).
How Does Regulatory and Compliance Framework Apply to Integrators?
EU integrators must consider MiCA Regulation (EU) 2023/1114 (OJ L 150, 9 June 2023), whose Article 74 governs CASPs with 18 months of transitional relief from the 30 December 2024 start date (EUR-Lex, June 2023). MiCA's current text does not directly regulate non-custodial DeFi, but any integrator packaging a custodial UI may fall in scope.
MiCA analysis
Article 74 sets conduct-of-business rules for CASPs, including safeguarding of client funds and complaint handling. A pure Solidity integration deployed to an end-user's own wallet does not trigger those rules, but a hosted keeper service that custodies user funds usually does. Consult counsel before wrapping RheoFi in a hosted product.
US regulatory posture
US-facing integrators should track pending market-structure legislation and current SEC guidance on staking-like receipt tokens. The rToken is a lending receipt, not a security offer under existing case law, but the surface remains contested. Publish clear risk disclosures and treat retail wrappers with additional caution.
Practical compliance checklist
- Geo-fence hosted UIs from jurisdictions where your legal team has not signed off.
- Publish an integrator disclosure noting rTokens are ERC-20 receipts, not deposits.
- Log the RheoFi implementation address hash for each user session for audit trails.
- Preserve on-chain event logs for at least 5 years to match MiCA record-keeping norms.
Conclusion
RheoFi gives Solidity developers an isolated-pool money-market ABI on XRPL EVM, backed by 15 audits across 6 firms and a Jump Rate curve at base 0%, slope 10%/year, jump 250%/year, kink 80% for testnet (RheoFi Whitepaper v1.0, April 2026). The proxy follows EIP-1967 and EIP-1822; the rToken follows ERC-20.
Key takeaways
Ship against the proxy, respect accrueInterest, budget for the gas ranges in the mini-table, and bound your oracle reads. Read the Jump Rate Model post for the interest math and grab the ABI reference on docs.rheofi.com. When your adapter is ready, deploy it against testnet contracts through app.rheofi.com and share your integration for review.
References
- RheoFi Whitepaper v1.0, April 2026 · RheoFi Whitepaper v1.0
- EIP-4626, Final · EIP-4626
- EIP-1967, Final · EIP-1967
- OpenZeppelin, 2026 · OpenZeppelin
- XRPL EVM Docs, July 2026 · XRPL EVM Docs
- EIP-20, Final · EIP-20
- EIP-1822, Final · EIP-1822
- EIP-165, Final · EIP-165
- Chainlink Data Feeds, 2026 · Chainlink Data Feeds
- OpenZeppelin Contracts, GitHub · OpenZeppelin Contracts
- EUR-Lex, June 2023 · EUR-Lex
FAQs
Add an XRPL EVM entry to hardhat.config.ts under networks with the public RPC URL from docs.xrplevm.org, chain ID from that same page, and a funded deployer private key. Gas is paid in XRP and slot time is roughly 2.08 seconds, so keep confirmations to 1 for testnet. Verify the endpoint by calling eth_chainId before broadcasting any transaction.



