Plug

Take, bubble and use on Plug

Ethereum
Ethereum
Base
Base
Defi

Ready to run on Base

Plug is the execution layer itself: the machinery that takes a plan built from steps and conditions and turns it into a single transaction that runs when its moment arrives, exactly as written, or not at all.

Everything a plug does ultimately routes through here. Swaps compile against live solver liquidity with the outcome verified onchain before the transaction is allowed to settle. Plans declare parameters so one plug can be written once and run with different values every time, and surface outputs so one plug can feed another, whole strategies composing out of smaller strategies the way functions compose out of functions. Execution results, fees, schedules, and portfolio history are recorded as they happen, so a plan can read its own past.

The atomicity is the point. Eight steps that would be eight transactions, eight signatures, and eight chances for the market to move in between become one unit that either all happens or none of it does. A condition checked in the same transaction as the action it gates cannot go stale in the mempool, which is a guarantee no person clicking through a wallet can have.

Composition is how the serious plans get built: small plugs that each do one thing, wired into larger ones, running on conditions instead of attention. The primitives live here.

More plugs on Base

Borrow on Base · 7 plugs

Earn yield on Base · 12 plugs

Stake on Base · 9 plugs

Provide liquidity on Base · 6 plugs

Dollar-cost average on Base · 4 plugs

How to take, bubble and use on Plug

  • Take

    Take on Plug

    Ethereum
    Ethereum
    Base
    Base

    Declares a named parameter whose value the caller supplies at execution time.

    Reach for it to make a plug reusable: take an amount, a token, or a recipient rather than hardcoding it, and let each caller bind its own value.

  • Bubble

    Bubble on Plug

    Ethereum
    Ethereum
    Base
    Base

    Surfaces a value as an output of this plug.

    Reach for it to return a computed amount, a position id, or a boolean from a reusable plug, so the plug that uses it can coil the result into its own next step.

  • Use

    Use on Plug

    Ethereum
    Ethereum
    Base
    Base

    Composes another plug inside this one.

    Reach for it to reuse a tested building block, such as a rebalance or a harvest routine, inside a larger strategy without duplicating its steps.

  • Swaps one token for another through the solver over indexed liquidity.

    The floor is the whole of what the solver is held to. The route is the solver's to build and the executor rides the unsigned channel, so nothing obliges a fill to deliver more than the floor even when the liquidity is there. Whatever does arrive lands in the socket and amount_out is that realized delta, but the floor is the only part of it the signature holds anyone to, which makes it the amount being agreed to rather than a safety margin under a larger expectation. A floor set loose is not caution; it is how much of the fill has been signed away.

  • Hands tokens already transferred to the solver over for routing, then verifies the outcome.

    Reach for it when the swap action's fixed shape does not fit, such as multi-token inputs or custom acceptance logic, and you want the solver's execution bounded by your own reads.

  • Leave a typed hole the solver fills at execution time: an address, a 32-byte key, or a number that may not exist yet when you sign. What the hole is comes from where you coil it. Feed it a market slot and it is a market, searched the way that slot's picker searches. Actions between this and its End block are how the witness is handled: verify the candidate against its factory or registry, require the result, and only then spend it. A block that never requires a judgment over the witness will not compile. Witness blocks nest: Expect a second witness inside the first to judge it against what the first established, and close the inner block before the outer. Everything read inside a block stays coilable after its End. End closes the innermost open block, so an action that opens a callback body (a flash loan) inside a witness block needs its own End before the witness's.

  • Run limit

    Run limit on Plug

    Ethereum
    Ethereum
    Base
    Base

    Caps how many times this plug can ever run.

    Reach for it when a signed plug must not run again however many times it is sent, such as a one time transfer, a launch buy that fires once, or a claim taken at most three times.

Posts · 24