

Reads onchain state
Reads what a BaiBai market maker's posted curve would pay the socket for a swap right now. quoteFor walks the curve exactly as the swap would, net of any fee configured for the socket, and answers zero when the curve has expired, its depth is exhausted, or the amount is past it. Reach for it to set a swap floor from the maker's live price with a slippage haircut, to compare the maker against other venues before routing, or to gate a trade on a minimum rate with a predicate.
Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.
More on BaiBai · 1