DataRail Checking sign-in…

DataRail Trader · Polygon PoS

Keeps your crypto at the mix you chose.

A rebalancing bot for a small portfolio of ETH, POL and USDC. You set the mix. When prices move it out of line, the bot swaps it back on Uniswap. It runs on your computer or server, from a wallet that only it uses, and the keys never leave your machine.

Software for subscribers. Not investment advice, no promised returns, and you can lose money.

How it works

Every 15 minutes the bot runs one tick. Any check that fails stops trading and keeps your positions as they are, until you look at it and resume.

  1. PricesChainlink feeds on Polygon
  2. ChecksStale prices, drawdown limit
  3. PlanSwaps back to your targets, if the mix drifted past the band
  4. LimitsSize per swap and per day
  5. SwapUniswap v3, minimum output enforced on-chain
  6. RecordSnapshot to the dashboard

What it holds

ETH
as WETH on Polygon
POL
as WPOL, formerly MATIC
USDC
native Circle USDC, not bridged USDC.e

Every swap is a single hop between an asset and USDC, through the 0.05% Uniswap v3 pools.

What you set

Targets
your share for each asset
Band
how far a share may drift before a rebalance
Limits
swap size, daily total, slippage, drawdown

The bot ships with the targets and the drawdown limit blank. It won't run until you fill them in.

Why Polygon

Swaps on Polygon cost cents. On Ethereum mainnet each one can cost dollars, which a portfolio of a few hundred dollars can't absorb.

Three stages, in order

1

Backtest

Replays your settings over a year of daily prices and puts them next to simply holding the same mix, with every swap's fees counted.

2

Paper

Runs on live Chainlink prices with simulated swaps and a pretend balance, so you can watch it for weeks before any real money is involved.

3

Live

Real swaps from the bot wallet. Locked until you turn on two separate switches and every on-chain check passes.

Safety

The kill switch

Trading pauses, positions stay as they are, and nothing trades again until you run trader resume, when:

  • a price is stale, missing or zero
  • the portfolio falls past your drawdown limit
  • Uniswap's quote is too far from Chainlink's price
  • a swap fails
  • the wallet runs low on gas

The wallet can't send money out

The bot can do three things: approve the Uniswap router for the exact amount of one swap, swap with the output paid back to itself, and wrap POL. Any other transaction is refused in code, and there is no transfer function at all. To take money out, you import the bot wallet into MetaMask and send it yourself.

Live is locked by default

  • mode: live and live_enabled: true, both
  • a drawdown limit set
  • key and RPC present
  • trader doctor passing: every token, price feed, router and pool checked on Polygon

Limits on every swap

  • a maximum per swap; bigger rebalances finish over several ticks
  • a maximum per day, across all assets
  • a minimum output on every swap, based on Chainlink
  • a gas ceiling: ticks are skipped when Polygon is congested

What you need

A machine
Windows, macOS or Linux with Python 3.11 or newer. A small Linux server runs it unattended (systemd timer included).
An RPC key
Polygon access from Alchemy or Infura. The free tier is enough.
A new wallet
trader new-wallet makes one for the bot alone. Never use your main wallet.
Gas
A few POL in the bot wallet, kept back from trading.
MetaMask
Optional, to watch the bot wallet and to move funds in and out.

What you get

  • The full source: strategy, safety checks, backtester, paper and live modes
  • The trader command line and a read-only dashboard on your own machine
  • Server deploy files: a systemd timer and a locked-down service user
  • Updates for as long as you subscribe

What it isn't

Subscribe

–

Loading the offer…

Subscriber access

Checking whether you're signed in…