> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/tr/kullanim-senaryolari/defi-protocols.md).

# DeFi Protokolleri

Rome üzerinde EVM DeFi için entegrasyon kalıpları — Solana oracle'larıyla lending, Jupiter ve Kamino'yu Solidity'den birleştirme ve ortak likidite havuzları.

Rome, EVM DeFi protokollerinin Solana'nın yerel DeFi ekosistemiyle atomik olarak birlikte çalışmasına olanak tanır. Bu sayfa yaygın entegrasyon kalıplarını kapsar. Bunların birkaçı zaten Rome'da yayında — Aave v3, Compound v3 (Aerarium), Uniswap V2/V3/V4 ve Rome DEX — bkz. [Rome üzerindeki uygulamalar](/tr/rome-uzerindeki-uygulamalar/apps.md).

Aşağıdaki kod örnek niteliğindedir; üçüncü taraf Solana programları için arayüz adları örnektir, paketle gelen SDK arayüzleri değildir.

## Neden DeFi Rome'da?

* **Solana likiditesine erişim** — Jupiter, Kamino, Drift, Meteora, Raydium, Orca
* **Atomik birleştirilebilirlik** — tek bir işlemde çok adımlı DeFi işlemleri
* **Solidity araçları** — tanıdık geliştirme ve denetim ekosistemi
* **Paylaşılan durum** — EVM ve Solana kullanıcıları aynı havuzları paylaşır

## Kalıp 1: Solana oracle'larıyla borç verme protokolü

Aşağıdaki import şuradan gelir [`rome-solidity`](https://github.com/rome-protocol/rome-solidity), GitHub'dan yüklenir, npm'den değil: `npm install github:rome-protocol/rome-solidity`, veya `forge install rome-protocol/rome-solidity` şu yeniden eşlemeyle `@rome-protocol/rome-solidity/=lib/rome-solidity/` (ayrıntılar için [Solidity Sözleşmelerini Dağıtma](/tr/gelistirici-kilavuzlari/deploy-solidity.md#using-the-rome-solidity-sdk)). Feed adresini şuradan iletin [registry](/tr/urunler/oracle-gateway.md#consume-a-feed-in-three-steps) onu sabit kodlamak yerine.

```solidity
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();
        // Oracle Gateway üzerinden Pyth/Switchboard fiyatı
        // Ethereum'daki Chainlink ile aynı arayüz
        return (amount * uint256(price)) / 1e8;
    }
}
```

## Kalıp 2: CPI aracılığıyla DEX toplayıcı

```solidity
contract RomeSwap {
    function swap(
        bytes32 fromMint,
        bytes32 toMint,
        uint256 amount,
        uint256 minOut
    ) external {
        // Jupiter/Raydium/Meteora'ya CPI
        // Tüm Solana DEX likiditesi Solidity'den erişilebilir
        CpiProgram.invoke(JUPITER_PROGRAM, accounts, swapData);
    }
}
```

## Kalıp 3: Getiri kasası

```solidity
contract YieldVault {
    function deposit(uint256 amount) external {
        // USDC mevduatı kabul et
        // CPI → Jupiter: en uygun tokenlara takas et
        // CPI → Kamino: teminat olarak yatır
        // CPI → Drift: delta-nötr hedge aç
        // Hepsi atomik — tek işlem, ya hep ya hiç
    }
}
```

## Kalıp 4: Protokoller arası arbitraj

Kullanarak `RemusTx` (atomik rollup'lar arası işlemler):

1. 1\. rollup'ta DEX A'dan satın al
2. 2\. rollup'ta DEX B'de sat
3. İkisi de atomik — sıfır yürütme riski

## Referans uygulamalar

Sıfırdan başlamak yerine çalışan bir Rome uygulamasını çatallayın:

* [**rome-dex**](https://github.com/rome-protocol/rome-dex) — çift şeritli AMM; yeni bir fikir getirin ve bunu tek bir havuz üzerinden hem Solana hem de EVM kullanıcıları için dağıtın.
* [**aerarium**](https://github.com/rome-protocol/aerarium) — çift şeritli Compound v3 borç verme arayüzü.
* [**cardo**](https://github.com/rome-protocol/cardo) — CPI uygulama dağıtım portalı (swap / lend / perps / compose).
* [**rome-aave-v3-demo**](https://github.com/rome-protocol/rome-aave-v3-demo) — Aave v3 borç verme arayüzü.
* [**compound-on-rome-comet**](https://github.com/rome-protocol/compound-on-rome-comet) — Comet para piyasası sözleşmeleri.
* [**rome-oracle-gateway**](https://github.com/rome-protocol/rome-oracle-gateway) — sıfırdan bir çapraz VM uygulaması: Solana fiyat hesaplarını (Pyth, Switchboard) okur, bunları EVM üzerinde yayınlar ve standart Chainlink aracılığıyla Solidity'ye sunar `AggregatorV3Interface`.

## İlgili

* [Oracle Gateway](/tr/urunler/oracle-gateway.md) — Chainlink uyumlu fiyat beslemeleri
* [Rome SDK](/tr/urunler/rome-sdk.md) — DeFi protokolleri için tipli arayüzler


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/tr/kullanim-senaryolari/defi-protocols.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
