AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
341 stars 44 forks source link

consider increasing fixed relayer fee or making it dynamic w.r.t gas price #430

Open noot opened 1 year ago

noot commented 1 year ago

the gas for a relayer to relay a claim is 85040. given the current relayer fee of 0.009 ETH, a relayer will break even at a network gas price of 106 gwei. if the gas price goes any higher than that, it's not profitable for relayers any more. this would be very bad. although we haven't seen prices this high usually, if there's another bull market or some other pump, it'll definitely go that high.

in this case, we need to increase the fixed relayer fee. however it'll be less maintainence/release-pain to have a dynamic fee that varies based on the current gas price (and that varies the same for all relayers). for example, we could say relayers should always get a profit of 0.005 ETH per tx, and then given a gas price oracle, we can calculate the fee from that.