Native Meta Transactions #748
Replies: 8 comments 24 replies
-
I don’t think its the right way. because the first blocker is that we couldn’t deploy price oracle some chains especially on moonbeam. Also, we couldn’t set aggregator or dex record even though we deployed price oracle. This was the main difficult point when we calculated the gas fees. so we just used mainnetEquivalent for all the networks. |
Beta Was this translation helpful? Give feedback.
-
This step is not necessary. Instead of subtracting final gas from starting gas, just subtract |
Beta Was this translation helpful? Give feedback.
-
How much does it save on gas to use Also, the user signs the received amount, so they are signing the relayer fees in this case... meaning there's no way for the router to collude with relayer and fudge a stupid exchange rate for the relayer fee on receiver fulfill. Right? |
Beta Was this translation helpful? Give feedback.
-
Personally, I 100% disagree with paying relayers a percentage. I think it doesn't make any sense - relayers should take any transaction that is profitable so long as they make enough profit over time to maintain their offchain servers/hosting/infrastructure. Let's just pay them a flat fee per tx. We can negotiate what that should be with the relayer aggregators, e.g. Gelato. |
Beta Was this translation helpful? Give feedback.
-
I think the main blocker would be calculating gas fee after getting last ... So we have to decide gas fee for the last extra operations, and it seems that is the only way to calculate gas amount from solidity opcode and hardcode. But it could be different on all chains and changeable over time. So there is no way to resolve this problem perfectly. |
Beta Was this translation helpful? Give feedback.
-
From a discussion with @LayneHaber: How much extra are routers spending on relayer fees based on this overestimation? It's a good question - we don't know exactly, but we can determine this by looking at the receipts in the logs (for like the past couple weeks) and see what the average amount we are overestimating by is (in terms of gas units). The receipts have a If the average amount of gas units by which we overestimate when determining relayer fees is >= the cost of adding this overhead to the transfer, then this addition would save money (or just be about how much we were spending anyway). If the avg overestimate is by < the cost of adding this overhead, then we may want to reconsider (based on how much additional overhead we're adding vs convenience) |
Beta Was this translation helpful? Give feedback.
-
Updated the above spec to reflect that relayer fees should be passed in. |
Beta Was this translation helpful? Give feedback.
-
Still relevant with the updated direction |
Beta Was this translation helpful? Give feedback.
-
Summary
The proposed upgrade makes meta-transactions a first class citizen within the
TransactionManager.sol
. The current contracts rely onmsg.sender
checks, specifically for the routers, preventing the use of relayer networks like ITX or Gelato.Motivation
Should allow all functions to accept meta transactions at any point. This will allow routers and users to access any relayer network, providing a different option to relieve a long-standing problem of transaction sending problems. Currently, this problem is addressed by creating a separate
Router
contract which adds gas overhead to every transaction when using relayers.Proposed Solution
All
TransactionManager
functions should accept an additionalRelayerFeeDetails
parameter:In each function, if the
msg.sender
is not the appropriateparticipant
, then the signature should be validated and relayer fees distributed.Test Cases
The following tests should be implemented for both user and router relayer fees:
Outstanding Questions
RelayerFeeDetails
passed in to the functions be an array i.e.RelayerFees[5]
?relayerFee
liquidity in a separate mapping from transfer liquidity?Tasks
TransactionManager
functionsBeta Was this translation helpful? Give feedback.
All reactions