Insufficient funds when creating transaction using Relay

  response: {
    status: 400,
    statusText: 'Bad Request',
    data: {
      message: 'Insufficient funds: 0.048 ETH required but -0.23780863393604 ETH are available.'
  message: 'Request failed with status code 400',
  request: { path: '/txs', method: 'POST' }

Above mentioned error is received when trying to make a transaction through the Relay on Goerli test network. (usually works but error is thrown often at unpredictable intervals).

Official docs say " Relayers on the Goerli and Rinkeby networks will be automatically funded with test ETH upon creation, and will be topped up when they run low on funds."

Ideally the relay should not run out of gas.

:computer: Environment

Openzepplin Relay (Goerli test network)


:1234: Code to reproduce

import {
} from "defender-relay-client/lib/ethers";

const relayCredentials = {
    apiKey: getenv.string("RELAY_API_KEY"),
    apiSecret: getenv.string("RELAY_API_SECRET"),

const relayProvider = new DefenderRelayProvider(relayCredentials);
const relaySigner = new DefenderRelaySigner(relayCredentials, relayProvider, {
  speed: "fastest",

const contract = new ethers.ContractFactory(
const tx = await contract.function(params);
1 Like

Hi @akshatcx

Welcome to the community!

Auto funding on Rinkeby is currently not working as the funds on our relayer have depleted. However, Goerli should be working fine. Could you share the URL of the relayer so I can further look into what happened please?

Hey @akshatcx,

As @nami said, we're having problems with the Rinkeby funding, but I'm investigating the underlying issue and seems to be a simple semantics problem.

We're throwing this error for situations in which the transaction cost exceeds the relayer funding and it's expressed like:

Insufficient funds: ${balance} ETH required but ${balance - cost} are available

So my first thought is that the negative is expected, but maybe not correct. We can update but first I'd like to ask you for your relayerId so I can track this more in detail and validate nothing is broken.

Thanks in advance!

Hello, thank you for the prompt reply.

Here is the relay ID: f1a68d1a-f6fd-4be1-9807-2ca8dbbfbd98 (

Should I provide the relay address as well?

Hey @akshatcx

Indeed it's just a semantics problem. Your relayer seems fine.

What I'm just curious about is that you didn't receive the ether, but your relayer address seems to be funded more than once

Am I looking at the correct address? I'd just like to dive more into what happened if you didn't receive the funds.