> 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 birleşmesine olanak tanır. Bu sayfa yaygın entegrasyon kalıplarını kapsar. Birkaçı zaten Rome'da canlıda — Aave v3, Compound v3 (Aerarium), Uniswap V2/V3/V4 ve Rome DEX — bkz. [Rome'daki uygulamalar](https://docs.rome.builders/tr/rome-uzerindeki-uygulamalar/apps.md).

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

## Neden Rome üzerinde DeFi?

* **Solana likiditesine erişim** — Jupiter, Kamino, Drift, Meteora, Raydium, Orca
* **Atomik birlikte çalışabilirlik** — 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ı ile Borç Verme Protokolü

Aşağıdaki import şuradan gelir [`rome-solidity`](https://github.com/rome-protocol/rome-solidity), GitHub'dan kurulur, npm'den değil: `npm install github:rome-protocol/rome-solidity`, ile kurun ya da `forge install rome-protocol/rome-solidity` yeniden eşleme ile `@rome-protocol/rome-solidity/=lib/rome-solidity/` (ayrıntılar [Solidity Sözleşmeleri Dağıtma](https://docs.rome.builders/tr/gelistirici-kilavuzlari/deploy-solidity.md#using-the-rome-solidity-sdk)). Feed adresini [kaydında](https://docs.rome.builders/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 ile DEX Toplayıcı

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

## Kalıp 3: Getiri Kasası

```solidity
contract YieldVault {
    function deposit(uint256 amount) external {
        // USDC yatırma 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ı Arbitrage

Kullanarak `RemusTx` (farklı Rome zincirlerinde birkaç EVM işlemi, tek bir Solana işleminde atomik olarak):

1. Bir Rome zincirindeki DEX A'da satın al
2. Başka bir Rome zincirindeki DEX B'de sat
3. İkisi de atomik olarak yürütülür; biri başarısız olursa ikisi de geri alınır.

## 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 üzerine yayınlar ve standart Chainlink üzerinden Solidity'ye sunar `AggregatorV3Interface`.

## İlgili

* [Oracle Gateway](https://docs.rome.builders/tr/urunler/oracle-gateway.md) — Chainlink uyumlu fiyat akışları
* [Rome SDK](https://docs.rome.builders/tr/urunler/rome-sdk.md) — DeFi protokolleri için tiplenmiş 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.
