How GSN compares to Infura Transactions (ITX)?

Do they offer the same functionalities? If so, what are the pros and cons of each? And what about Rockside? Any other alternative? By now, seems to me that ITX is the best option - but it’s still beta. Comments on that?

  1. ITX is a centralized service: you have a balance with infura, and they use it to submit your transactions. You trust infura to submit your transaction on-chain as needed.
    GSN is a decentralized service: you don’t trust anyone: you use the RelayHub (un-owned contract) to find relayers, you select one and use it to send the transaction. You dont trust this relayer, but you validate that it does its work, and if it doesn’t, you switch to another relayer (the RelayHub is there to verify that the relayer can’t lie)

  2. GSN provide Identity to the target contract: there is a standardized way (using msgSender()) to recognize the real caller.
    ITX doesn’t provide such mechanism - the transactions are sent by the ITX “relayer”, and you need to add such “identity” mechanism yourself (either using GSN’s forwarder model, or “DAI” permit , etc)

Hi @drortirosh, thank you for your comments. I would prefer using GSN (decentralized), but as far as I understood, GSN solves the issue of gasless sender, but doesn’t solve the issue of blocking transactions (nor gas price optimization). Is that correct or I’ve missed something?

not sure what you mean by blocking transactions.
GSN doesn’t do gas optimization by itself (you have to contact some external oracle for that), but it does handle gas boosting:
a relayer advertise its minimum accepted gas price (which might be based on some oracle), and can reject transactions which offer less gas.
If a transaction doesn’t go through with that gas price, the relayer will have to re-submit the transaction with higher gas price. The caller signed the transaction with a specific gas price, so the relay compensation will be based on the original gas price, not the “boosted” one (this means that for this TX, some of the fee will be used to cover this higher gas price).
The relayer can’t “ignore” this transaction: it has to use this nonce, and if it tries to send another transaction with this nonce, its stake can get slashed, so it has no other option, but send out this transaction (either wait with the original gas price, or with a higher gas price)

By blocking transaction I mean either stuck or dropped ones (as shown here Why You Should Use ITX Instead of Building Your Own In-House Relayer | Infura Blog | Tutorials, Case Studies, News, Feature Announcements). And that’s what I understand that GSN doesn’t handle - am I correct? Like, having all my transactions stuck because one in the middle got lost or stuck.
I didn’t know GSN relayers could handle gas boosting. More than that, cutting from their own share. But thinking on that…makes sense.
Despite other considerations, seems that GSN is kinda expensive: charging 0+70% for each transaction relays(dot)opengsn(dot)org ITX is also expensive: charging 20 gwei * gas used ITX | Infura Documentation and since gas price has been around 30 gwei ethereum_average_gas_price@ycharts it’s almost the same charged by GSN. Rockside doesn’t show their price - unless you contact them (I don’t like this kind of approach. Plus I would have to pay them from inside my contract - you get locked forever).
@drortirosh thank you again for contributing to this discussion.
Note: I had to remove two urls =( community rules

In that sense, yes, relayers take care of blocked transactions, and boost them (they have to, otherwise the relayer itself gets stuck)

Regarding the fee: opengsn relayer takes 70% fee which is deliberately high. We do want others people to bring up more relayers to the network, and make profit.
Current client policy is try the relayers from the cheapest to the most expensive.

(More precisely: pick the 3 cheapest relays, ping them all and use the first that answers. Is none of them answer, pick the next 3 relayers, and so on)

1 Like