gitwtfhub

wtf is drifting_bird?

vybenetwork/drifting_bird — explained in plain English

Analysis updated 2026-08-09 · repo last pushed 2024-02-21

Audience · developerComplexity · 4/5DormantSetup · hard

TL;DR

A Solana arbitrage bot that profits from price gaps between Drift perpetuals and Phoenix spot exchanges by placing offsetting trades when funding rates make the strategy profitable after fees.

Mindmap

mindmap
  root((repo))
    What it does
      Solana arbitrage bot
      Exploits price gaps
      Captures funding payments
    How it works
      Sells perps on Drift
      Buys spot on Phoenix
      Checks fee profitability
    Requirements
      Best fee tier on Drift
      Build your own client
      Accept small initial losses
    Use cases
      Yield for stablecoin projects
      Trading infrastructure
      Educational testing
    Tech stack
      Rust
      Solana
      Drift Protocol
      Phoenix Exchange

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run an automated arbitrage strategy between Drift and Phoenix on Solana to capture funding payments.

REASON 2

Use as a yield-generating component for an Ethena-like stablecoin project on Solana.

REASON 3

Learn how cross-exchange arbitrage and funding rate strategies work on Solana DeFi platforms.

What's in the stack?

RustSolanaDrift ProtocolPhoenix Exchange

How it stacks up

vybenetwork/drifting_bird000madz000/rfid-attendance00kaku/gallery-slider-block
LanguageTypeScriptJavaScript
Last pushed2024-02-212024-07-222021-05-19
MaintenanceDormantDormantDormant
Setup difficultyhardeasyeasy
Complexity4/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1day+

Requires building your own client interface, qualifying for Drift's best fee tier via insurance fund deposit, and likely updating the contract for current Drift and Phoenix versions.

No license information is provided in the repository documentation.

Wtf does this do

Drifting Bird is a trading bot that tries to make money by exploiting price gaps between two Solana-based trading platforms. It spots moments when the same asset (SOL) is priced differently on Drift (a perpetual futures exchange) and Phoenix (a spot exchange), and places offsetting trades to capture that difference as profit. The bot watches for two scenarios. In the first, it sells perpetual contracts on Drift and buys spot SOL on Phoenix when pricing makes that profitable after fees. This only triggers during periods when holding a short position on Drift earns you funding payments, which is basically other traders paying you to stay in your position. The second scenario flips things around: it buys perpetuals on Drift and sells spot on Phoenix when the perpetual price is lower, and this only activates when holding a long position earns funding. In both cases, the bot checks that the trade would still be profitable after all fees are accounted for. This would appeal to someone already running trading infrastructure on Solana who understands perpetual futures, funding rates, and arbitrage strategies. The README notes that operators need to qualify for the best fee tier on Drift (which requires depositing into their insurance fund) and should be willing to accept small initial losses to enter positions that generate funding income over time. A few things stand out. The project is written as a Rust smart contract with no client interface included, so the operator needs to build that themselves. It was built against Q3 2023 versions of Drift and Phoenix, so it likely needs updates to work with current platform versions. The README is upfront that using this software could result in financial loss and is provided for testing and educational purposes only. The author also mentions interest from teams building Ethena-like stablecoin projects on Solana, suggesting the strategy could serve as a yield-generating component for such systems.

Yoink these prompts

Prompt 1
I want to deploy the Drifting Bird arbitrage bot on Solana. Walk me through what I need: Drift fee tier qualification, Phoenix setup, and how to build a client interface to trigger the Rust smart contract.
Prompt 2
Help me understand the two trading scenarios in Drifting Bird, when it shorts perps on Drift and buys spot on Phoenix vs. when it does the opposite, and how funding rates determine which one activates.
Prompt 3
I'm building an Ethena-like stablecoin on Solana and want to use Drifting Bird's funding-rate arbitrage as a yield component. How would I integrate this strategy and what are the risks of small initial losses turning into the funding income it expects?
Prompt 4
The Drifting Bird contract was built against Q3 2023 versions of Drift and Phoenix. Help me identify what SDK and contract changes I need to update the code for current versions of both platforms.

Frequently asked questions

wtf is drifting_bird?

A Solana arbitrage bot that profits from price gaps between Drift perpetuals and Phoenix spot exchanges by placing offsetting trades when funding rates make the strategy profitable after fees.

Is drifting_bird actively maintained?

Dormant — no commits in 2+ years (last push 2024-02-21).

What license does drifting_bird use?

No license information is provided in the repository documentation.

How hard is drifting_bird to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is drifting_bird for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.