Swap WETH for USDC on Elfomo Fi

Base
Base
0x62180042606624f02D8A130dA8A3171e9b33894d

What this does

This plug swaps 0.001 WETH for USDC on ElfomoFi with a minimum output derived from the current quote. It asks the caller to supply 0.001 WETH for the exchange. It fires whenever run, first reading ElfomoFi's live quote and then computing a floor at 995 divided by 1000, rounded down, of that amount. Performing this manually or against a stale quote risks setting a minimum that is too loose or executing at a worse rate than the chain confirms.

Actions · 3

  • Get amount out
    Get amount received for to
    Reads the amount ElfomoFi would pay right now for an exact input.
  • Multiply then divide
    Calculate times divided by rounded
    Multiplies two values and divides by a third in one step, rounding up or down.
  • Swap
    Swap for at least
    Swaps an exact amount of one token for another at ElfomoFi's market-maker quote.

Related plugs · 4