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
| Network | Chain ID | Address |
|---|---|---|
| Robinhood Chain mainnet | 4663 | deploy via Deploy.s.sol — set EXECUTOR_ADDRESS |
| Robinhood Chain testnet | 46630 | deploy via SeedDemo.s.sol — set EXECUTOR_ADDRESS |
⬇ Download LongbowExecutor ABI (JSON)
Uniswap (mainnet 4663 — official deployments)
| Contract | Address |
|---|---|
| V2 Factory | 0x8bceaa40b9acdfaedf85adf4ff01f5ad6517937f |
| V2 Router02 | 0x89e5db8b5aa49aa85ac63f691524311aeb649eba |
| V3 Factory | 0x1f7d7550b1b028f7571e69a784071f0205fd2efa |
| QuoterV2 | 0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7 |
| SwapRouter02 | 0xcaf681a66d020601342297493863e78c959e5cb2 |
| Universal Router | 0x8876789976decbfcbbbe364623c63652db8c0904 |
| Permit2 | 0x000000000022D473030F116dDEE9F6B43aC78BA3 |
Tokens (mainnet 4663)
| Token | Decimals | Address |
|---|---|---|
| WETH | 18 | 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73 |
| USDG | 6 ⚠ | 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 |
| TSLA | 18 | 0x322F0929c4625eD5bAd873c95208D54E1c003b2d |
| NVDA | 18 | 0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC |
| AAPL | 18 | 0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9 |
| GOOGL | 18 | 0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3 |
| META | 18 | 0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35 |
| MSFT | 18 | 0xe93237C50D904957Cf27E7B1133b510C669c2e74 |
| AMZN | 18 | 0x12f190a9F9d7D37a250758b26824B97CE941bF54 |
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.
factory.getPair(tokenA, tokenB). If you need CREATE2 derivation off-chain, verify the hash first by comparinggetPair output against your computed address.The Interface
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)
| Guard | Behavior |
|---|---|
| Chainlink Staleness | rejects execution if the oracle's updatedAt timestamp is older than maxPriceAge (1h default). |
| ERC-8056 Oracle Pause | rejects execution while either token's oraclePaused() = true (e.g. stock split or trading halt on Traditional Exchanges). |
| L2 Sequencer Check | checks Sequencer Uptime Feed. Rejects execution if L2 sequencer is reported down or if the 1-hour grace cooldown period after recovery is active. |
| Slippage Limits | enforces Uniswap V2 router swap output checks using the order's minAmountOut. The transaction reverts on shortfall. |
| Reentrancy Guard | locks executeOrder using OpenZeppelin's ReentrancyGuard to prevent execution loop re-entry. |
| Path validation | verifies 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.