Swap 0.005 ETH for cbETH at the Coinbase Rate

Base
Base
0x62180042606624f02D8A130dA8A3171e9b33894d

What this does

This plug swaps 0.005 ETH for cbETH through the solver at the Coinbase exchange rate. It reads the cbETH rate, sizes the expected cbETH, then sets a floor at 99.5 percent of that amount. The swap executes when the plug is run and reverts if the received cbETH falls below the floor. Doing this by hand or against a stale rate risks sizing the minimum from an outdated price and accepting a worse fill.

Actions · 4

  • Get exchange rate
    Get exchange rate of
    Reads how much ETH one whole cbETH is worth right now.
  • Multiply then divide
    Calculate times divided by rounded
    Multiplies two values and divides by a third in one step, rounding up or down.
  • Multiply then divide
    Calculate times divided by rounded
    Multiplies two values and divides by a third in one step, rounding up or down.
  • Swap tokens
    Swap for at least
    Swaps one token for another through the solver over indexed liquidity.

More like this on Base

Stake on Base · 9 plugs

Related plugs · 8