DeFi Protocols
Integration patterns for EVM DeFi on Rome — lending with Solana oracles, composing Jupiter and Kamino from Solidity, and shared-liquidity pools.
Why DeFi on Rome?
Pattern 1: Lending Protocol with Solana Oracles
import {IAggregatorV3Interface} from "@rome-protocol/rome-solidity/contracts/oracle/IAggregatorV3Interface.sol";
contract RomeLending {
IAggregatorV3Interface public priceFeed;
constructor(address _priceFeed) {
priceFeed = IAggregatorV3Interface(_priceFeed);
}
function getCollateralValue(uint256 amount) public view returns (uint256) {
(, int256 price,,,) = priceFeed.latestRoundData();
// Pyth/Switchboard price via Oracle Gateway
// Same interface as Chainlink on Ethereum
return (amount * uint256(price)) / 1e8;
}
}Pattern 2: DEX Aggregator via CPI
Pattern 3: Yield Vault
Pattern 4: Cross-Protocol Arbitrage
Reference implementations
Related
Last updated
Was this helpful?