---
# System prepended metadata

title: Marlin's bundle relay for polygon PoS network

---

# Marlin's bundle relay for polygon PoS network

We at Marlin are pleased to announce a public relay service for searchers to use for MEV extraction akin to Flashbots, but on polygon PoS network.

## Important points
- Searchers can use marlin's public endpoint `http://gw.mev-stack-mevbor-v1.pns.marlin.org:8000` for sending bundles for mining.
- The relay architecture is flashbots compliant, and as such can use similar libraries for sending bundles. e.g. https://github.com/flashbots/ethers-provider-flashbots-bundle
- Marlin's relay architecture limits bundle delivery only to the concerned validators in line to be the next block proposers on polygon PoS chain. This limits bundle visibility to fewer and only necessary parties.
- Bundle delivery and mining is best effort, and searchers still have to make sure that bundles
    - Do not spam the endpoints.
    - Are economically enticing for validators to mine, moreso than transactions from other bundles and public mempool.

## Example usage
```jsx=
import { providers, Wallet } from "ethers";
import { FlashbotsBundleProvider } from "@flashbots/ethers-provider-bundle";

async function main)() {
    // Standard json rpc provider directly from ethers.js (NOT Flashbots)
    // create the base provider
    let base = new ethers.providers.JsonRpcProvider({url: "http://<polygonbor-ip>:8545"}, 137)
    await base.ready
    const user = new ethers.Wallet('a2..<privkey>..40', base)
    // wrap it with the marlin relay provider
    let provider = new FlashbotsBundleProvider(base, user, {url: 'http://gw.mev-stack-mevbor-v1.pns.marlin.org:8000'}, 137)

    
    const CONTRACT_ADDRESS = "0x0a..<contract-address>"
    const ABI = ["function coinbasetransfer() payable"]
    const contract = new ethers.Contract(CONTRACT_ADDRESS, ABI, user)

    const txs = [
        {
            signer: user,
            transaction: await contract.populateTransaction.coinbasetransfer({
              value: ethers.utils.parseEther("0.1"),
              gasPrice: "31000000000",
            })
        },
        {
            signer: user,
            transaction: await contract.populateTransaction.coinbasetransfer({
              value: ethers.utils.parseEther("0.2"),
              gasPrice: "31000000000",
            })
        },
      ];
    
    const blk = await base.getBlockNumber()
    
    // send bundle to marlin relay
    const result = await provider.sendBundle(txs, blk + 1);
    console.log(result)
}
main().catch(console.error)
```

## Further queries
Feel free to contact the dev team on discord if you have further queries.
https://discord.gg/pdQZyyy