Launch App

Smart Contracts

Every address Longbow touches, plus the full LongbowExecutor interface. The contract enforces safety checks on-chain using Chainlink oracles and ERC-8056 interfaces.

LongbowExecutor

NetworkChain IDAddress
Robinhood Chain mainnet4663deploy via Deploy.s.sol — set EXECUTOR_ADDRESS
Robinhood Chain testnet46630deploy via SeedDemo.s.sol — set EXECUTOR_ADDRESS

⬇ Download LongbowExecutor ABI (JSON)

Uniswap (mainnet 4663 — official deployments)

ContractAddress
V2 Factory0x8bceaa40b9acdfaedf85adf4ff01f5ad6517937f
V2 Router020x89e5db8b5aa49aa85ac63f691524311aeb649eba
V3 Factory0x1f7d7550b1b028f7571e69a784071f0205fd2efa
QuoterV20x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7
SwapRouter020xcaf681a66d020601342297493863e78c959e5cb2
Universal Router0x8876789976decbfcbbbe364623c63652db8c0904
Permit20x000000000022D473030F116dDEE9F6B43aC78BA3

Tokens (mainnet 4663)

TokenDecimalsAddress
WETH180x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73
USDG6 ⚠0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168
TSLA180x322F0929c4625eD5bAd873c95208D54E1c003b2d
NVDA180xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC
AAPL180xaF3D76f1834A1d425780943C99Ea8A608f8a93f9
GOOGL180x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3
META180xc0D6457C16Cc70d6790Dd43521C899C87ce02f35
MSFT180xe93237C50D904957Cf27E7B1133b510C669c2e74
AMZN180x12f190a9F9d7D37a250758b26824B97CE941bF54

The full editable token registry lives in packages/shared/src/tokens.ts; the machine-readable version is served at GET /api/tokens. Chainlink feed addresses come from docs.chain.link per token.

Never hardcode the Uniswap V2 pair init code hash. It is not publicly documented for Robinhood Chain. Longbow always resolves pairs viafactory.getPair(tokenA, tokenB). If you need CREATE2 derivation off-chain, verify the hash first by comparinggetPair output against your computed address.

The Interface

ILongbowExecutor.sol
enum OrderType { LIMIT, DCA }        // uint8: 0, 1
enum TriggerDir { BELOW, ABOVE }     // uint8: 0, 1

struct Order {
  address owner;         // order creator, receives proceeds
  address tokenIn;       // token pulled from owner
  address tokenOut;      // token delivered to owner
  address priceFeed;     // Chainlink feed for LIMIT triggers
  uint256 amountIn;      // pulled per execution
  uint256 minAmountOut;  // slippage guard per execution
  int256  triggerPrice;  // 8-dec Chainlink units; 0 = no condition
  uint64  interval;      // DCA seconds between runs
  uint64  nextExecAt;    // DCA earliest next run
  uint64  expiry;        // unix; 0 = never
  uint32  remainingRuns; // LIMIT: 1
  uint8   orderType;     // 0 LIMIT | 1 DCA
  uint8   triggerDir;    // 0 below | 1 above
  bool    active;
}

function placeOrder(
  address tokenIn, address tokenOut, address priceFeed,
  uint256 amountIn, uint256 minAmountOut,
  int256 triggerPrice, uint8 triggerDir, uint8 orderType,
  uint64 interval, uint32 runs, uint64 expiry
) external returns (uint256 id);

function canExecute(uint256 id)
  external view returns (bool ok, string memory reason);

function executeOrder(uint256 id, address[] calldata path)
  external returns (uint256 amountOut);   // permissionless

function cancelOrder(uint256 id) external; // owner only

function setMaxPriceAge(uint32 age) external; // owner only

event OrderPlaced(uint256 indexed id, address indexed owner,
  address tokenIn, address tokenOut, uint8 orderType, uint256 amountIn);
event OrderExecuted(uint256 indexed id, address indexed keeper,
  uint256 amountIn, uint256 amountOut, uint32 remainingRuns);
event OrderCancelled(uint256 indexed id);

Safety rails (enforced in executeOrder)

GuardBehavior
Chainlink Stalenessrejects execution if the oracle's updatedAt timestamp is older than maxPriceAge (1h default).
ERC-8056 Oracle Pauserejects execution while either token's oraclePaused() = true (e.g. stock split or trading halt on Traditional Exchanges).
L2 Sequencer Checkchecks Sequencer Uptime Feed. Rejects execution if L2 sequencer is reported down or if the 1-hour grace cooldown period after recovery is active.
Slippage Limitsenforces Uniswap V2 router swap output checks using the order's minAmountOut. The transaction reverts on shortfall.
Reentrancy Guardlocks executeOrder using OpenZeppelin's ReentrancyGuard to prevent execution loop re-entry.
Path validationverifies that path[0] == tokenIn and path[path.length - 1] == tokenOut to prevent keepers from routing through malicious tokens.

Sequencer Downtime Safeguard

Because L2 networks rely on a sequencer to order transactions, a downtime event can freeze state updates. If the sequencer goes down, Chainlink price feeds stop updating. Once the sequencer recovers, there is a risk that a flurry of backlogged transactions executes at old, stale oracle prices (known as sequencer frontrunning).

To prevent this, the contract checks Chainlink's Sequencer Uptime feed. If the sequencer goes down, execution halts. After the sequencer restarts, a **1-hour grace period** cooldown is enforced where orders remain un-triggerable. This allows arbitrageurs to re-align on-chain pools with the real quotes before keeper bots resume fillings.