
Values · Reads onchain state
Holds a well-known constant as a named value: max uint256, WAD, RAY, basis points, one, or zero. The value is echoed into a slot with the matching decimal tag, so it reads as 1e18 or 10,000 rather than a raw literal. Reach for it to feed a scale into a calculation, such as dividing by WAD after a multiply, or to pass max uint256 as an unlimited amount.
Card: Sell $25 ETH for USDC



1·Get constant
The basis-point denominator of 10,000 is loaded as a named constant for the proportional math further down.
2·Calculate
From a scaled figure, fifty is subtracted, producing that value minus a plain fifty for use downstream.
3·Get constant
A named constant WAD equal to 1e18 is loaded for 18-decimal scaling.
4·Calculate
Twenty-five is multiplied by the value in slot 2.0, scaling twenty-five by that figure.
5·Get price
Reading Chainlink, the latest price of ETH in USD is fetched, normalized to 18 decimals.
6·Multiply then divide
Multiplying the WAD constant by the value in slot 2.0 and dividing by the ETH price, rounding down, computes a scaled expected amount.
7·Calculate
Twenty-five is multiplied by 1000000, producing twenty-five in six-decimal base units to match USDC.
8·Calculate proportional value
Applying the value in slot 1.0 as basis points to the slot 6.0 figure takes a proportion of it, giving a slippage-adjusted target.
9·Get token balance
Before any swap, the socket's own USDC balance is read to establish the pre-swap baseline.
10·Get address
The solver address is held as a named value to serve as the transfer destination.
11·Transfer tokens
The value in slot 5.0 of ETH is transferred to the solver address held just before.
12·Get solution
The solver takes the transferred ETH, routes it, and the outcome is verified.
13·Get token balance
After routing, the socket's USDC balance is read again to capture the post-swap holding.
14·Calculate
Subtracting the pre-swap USDC baseline from the post-swap balance yields the USDC actually received.
15·Predicate
A requirement enforces that the USDC received is greater than or equal to the twenty-five-in-six-decimals target, reverting otherwise.
16·End block
The open block is closed here.
17·Bubble
The USDC received amount is surfaced as the output of this plug.