Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 2.86 KB

File metadata and controls

80 lines (62 loc) · 2.86 KB

Fund Your Node

To send bids to provider nodes, bidder nodes need to prepay an amount to the bidder registry. Funds are locked for each unique bid until the settlement process on the mev-commit chain has completed.

Given a bid with associated bid amount is preconfirmed by a certain provider, three outcomes are possible:

  • If the provider ends up not building the L1 block, amount is refunded to the bidder.
  • If the provider builds the L1 block, but the preconfirmed transaction is not included in the L1 block, amount is refunded to the bidder.
  • If the corresponding transaction ends up in the L1 block built by the provider, amount is rewarded to the provider.

Bidders can check or add to their prepaid allowance by interacting with the settlement chain via the bidder API.

  • To check your prepaid allowance

    > curl localhost:13523/v1/bidder/get_allowance | jq
    {
      "amount": "0"
    }

    To fund your node account with ether on the mev-commit chain.

    • Get the Ethereum account address of your node

      > curl localhost:13523/topology | jq
      {
        "self": {
          "Addresses": [
            "/ip4/127.0.0.1/tcp/13522",
            "/ip4/172.29.0.4/tcp/13522"
          ],
          **"Ethereum Address": "0xB9286CB4782E43A202BfD426AbB72c8cb34f886c"**,
          "Peer Type": "bidder",
          "Underlay": "16Uiu2HAmDWZb4DxZQkS9yseXNukBFe6MhZdimSKuZcHFeJrF3jC9"
        },
        "connected_peers": {
          "providers": [
            "0x48ddc642514370bdafad81c91e23759b0302c915",
            "0x972eb4fc3c457da4c957306be7fa1976bb8f39a6",
            "0xa1e8fdb3bb6a0db7aa5db49a3512b01671686dcb"
          ]
        },
        "blocked_peers": null
      }
    • Fund your account with ether on the mev-commit chain. Currently for the testnet, you can use a faucet account to get some mev-commit chain ether. This can be done using the cast command:

      > cast send --rpc-url https://chainrpc.testnet.mev-commit.xyz \\
      	--private-key 0x7c9bf0f015874594d321c1c01ada3166c3509bbd91f76f9e4d7380c2df269c55 \\
      	$ADDRESS \\
      	--value 100ether

      This command will transfer 100 mev-commit chain ETH to your $ADDRESS which should be enough to get started.

    • Alternatively, use the bridge from Holesky to fund your account. See bridging-and-fees.

  • Check the minimum prepaid allowance to send bids. Providers will only authorize bids if the bidder has funds greater than the minimum allowance. The amount is in wei.

    > curl localhost:13523/v1/bidder/get_min_allowance | jq
    {
      "amount": "1000000000000000000"
    }
  • Add to prepaid allowance

    > curl -X POST localhost/v1/bidder/prepay/10000000000000000000 | jq
    {
      "amount": "10000000000000000000"
    }

Once the allowance is added, the bidder can start sending bids and receiving preconfirmations.