Overview
Velora Delta is a new set of smart contracts developed by Velora. It's built on top of the Portikus Intents network and is currently available on the Ethereum and Base networks. 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 Velora Delta, you can protect your users’ swaps from events like sandwich attacks.
Price Competition: Velora Delta is increasingly competitive as different agents compete to deliver the best possible prices to users.
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 Velora'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.
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.
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.
A more detailed example of Delta usage, including fallback to Market (traditional swapping flow), can be found in examples.
Last updated