Overview
ParaSwap Delta is a new set of smart contracts developed by ParaSwap. It's built on top of the Portikus Intents network and is currently available on the Ethereum network and Base. This development unlocks several benefits for swapping tokens, including:
Gas-less trading: users can submit a trade without using a gas token, as Delta will execute the trades on their behalf.
MEV Protection: By submitting your trade through ParaSwap Delta, you can protect your users’ swaps from events like sandwich attacks.
Price Competition: ParaSwap Delta is increasingly competitive as different agents compete to deliver the best possible prices to users.
The easiest way to make use of the Delta is to use the Paraswap SDK. Refer here SDK Delta documentation.
Simple Delta flow using API with axios
looks like this:
1. Request prices for a token pair
This function is used to fetch a price quote for swapping
In this case, we’re swapping 100 DAI for PSP tokens on Ethereum (chainId: 1) using ParaSwap’s Delta API.
2. Build a Delta order
On this section, partners can pick between two models:
Fee Model: It allows partners to take up to 2% of the trade in partner fees (200 bps)
Surplus Model: Which only works if a surplus is generated from the trade. On this case, the partner will collect 50% of the order surplus instead of a flat percent fee to the specified partner address.
If you want to earn fees on your users orders, they have to be set on this step. For more details, check the Partner Fees Section in Order Building.
3. Sign the received Order
This part of the code uses EIP-712 for Signing, which is a standard for signing structured data on Ethereum, allowing off-chain signatures that can be verified on-chain without gas costs. This ensures a secure, gas-efficient, and human-readable signing process.
4. Submit the signed Order
At this stage, the signed order is sent and an auction is performed between all the available Agents.
For more details, check the Submit a Delta order section.
5. Check the Order Auction Status
This function is used to check the status of an order and retrieve a result.
If the order status is executed, it means a taker has filled the order, and the swap has been completed.
If the status is still 'PENDING' or 'OPEN', the order is waiting for execution.
For more information on Order Auction Status, check the Track Delta Order Auction Status section.
A more detailed example of Delta usage, including fallback to Market (traditional swapping flow), can be found in examples.
Last updated