A computer-implemented method performed by a swap platform, the method comprising:
- receiving, from an application of a user device of a user, an order to swap an input token in exchange for an output token without the user paying a gas fee, wherein the order is received via a user interface of the application, wherein the application comprises a web-based application accessed by the user device via a browser, wherein the order comprises an off chain data structure digitally signed by the user and comprises:
- a set of parameters;
- an indication of a plurality of whitelisted resolvers, the indication cryptographically bound to an order hash;
- a block-indexed grid curve function that defines auction price thresholds over a block window;
- a signature that authorizes a settlement or limit-order contract to transfer a specified amount of the input token;
- and
- an order identifier,
- wherein the user interface is configured to receive the plurality of parameters comprising:
- the input token;
- the specified amount of the input token;
- the output token;
- a maximum swap threshold comprising a starting amount of the output token;
- a minimum swap threshold;
- a time threshold;
- and
- a swap approval;
- providing the order to the plurality of whitelisted resolvers to fulfill via a Dutch auction that reflects the plurality of parameters in the order, wherein the Dutch auction comprises an auction price that begins at the maximum swap threshold and decreases to the minimum swap threshold by the time threshold;
- receiving, by a settlement smart contract and from a resolver of the plurality of resolvers, instructions for the settlement smart contract to fulfill the order at the auction price via a distributed blockchain network, wherein the resolver comprises a resolver worker address,
- wherein the settlement smart contract:
- verifies the resolver by validating a proof against the indication of the plurality of whitelisted resolvers in the order;
- verifies that no prior user-originated on chain transaction exists for the order identifier;
- computes a current-block auction price by combining the block-indexed grid curve function with a rate-bump value retrieved from an on chain quoter mapping keyed by the order identifier and current block number;
- validates the signature and pulls the input token from a wallet of the user via an order protocol call;
- and
- atomically debits a pre-funded balance of the resolver,
- wherein the distributed blockchain network operates on a plurality of nodes forming a peer-to-peer computer network, wherein the settlement smart contract comprises autonomous code integrated into the distributed blockchain network and hosted on the plurality of nodes of the distributed blockchain network,
- wherein fulfillment of the order comprises exchange of at least one cryptocurrency or token and occurs via execution on the distributed blockchain network,
- wherein the swap platform is implemented across the plurality of nodes of the distributed blockchain network, and wherein the resolver pays a gas fee on behalf of the user for fulfilling the order;
- and
- causing the amount of the input token in a wallet of the user to be swapped for an amount of the output token.