You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/bundler-api/actions/apiswap.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ The bundle endpoint enables bundling of many actions into one transaction, and f
39
39
40
40
Convert from [WETH](https://etherscan.io/address/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) to [USDC](https://etherscan.io/address/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) assuming the user has WETH in their wallet. More more efficiency it is advised to use the [route endpoint](./route.md) for these types of actions
Routing is the action for taking funds from the callers wallet, and converting it into a token, whether that is a [DeFi Position Token](../../concepts/tokens/defiTokens.mdx), or a [Base Token](../../concepts/tokens/baseTokens.mdx).
6
4
7
5
This endpoint is a pathfinder for determine best price and gas execution across Enso dataset, DEX aggregators, and direct depositing into DeFi protocols.
8
6
9
7
## Entering into a DeFi position
10
8
11
-
With Enso you can simply use Route to obtain the DeFi position token resulting in quick, and easy integration with all the logic for each particular protocol interaction logic abstracted away.
9
+
With Enso you can use Route to obtain the DeFi position token resulting in quick, and easy integration with all the logic for each particular protocol interaction logic abstracted away.
12
10
13
11
You can use the route action:
14
12
15
13
1. As an [individual call](../../router-api/introduction.mdx)
16
14
2. Or in a [bundle of calls](../../bundler-api/introduction.mdx)
17
15
18
-
### Individual call
19
-
20
-
There are 2 options for using this individual call 1. EOA: Approving the contract for the route 2. Smart Wallets:
@@ -14,7 +16,11 @@ The Bundle API takes care of optimizing the execution sequence and estimating th
14
16
15
17
## Gas Savings
16
18
17
-
// TODO: Add gas savings table/image
19
+
More transactions bundled together means more gas savings. The Bundle API is designed to optimize the execution sequence of the bundled actions, which can result in significant gas savings:
20
+
21
+
<br></br>
22
+
23
+
<Imagesrc={gas}alt="Gas Chart"width={700} />
18
24
19
25
---
20
26
@@ -25,45 +31,37 @@ The Bundle API takes care of optimizing the execution sequence and estimating th
25
31
👉 Run this curl request to see a live route response for entering a Curve Pool with ETH
26
32
27
33
```bash copy
28
-
curl -X POST 'https://api.enso.finance/api/v1/shortcuts/bundle?chainId=<your_chainId>&fromAddress=<your_fromAddress>' \
👉 Or try it out in the [Swagger UI](https://api.enso.finance/api#/shortcuts/BundleController_bundleShortcutTransaction)
53
-
)
54
62
55
63
Details:
56
64
Let's say you want to go from Ether to a the steCrv Curve pool. Also, you want to deposit the Curve LP into the Curve Gauge.
57
65
In the route endpoint you would simply pass a tokenIn (Ether), the amount and the tokenOut (the Curve Gauge).
58
66
59
67
Enso will take care to swap your token in to the required token (if needed), deposit the LP into the Curve Gauge and stake the LP tokens into the Curve Gauge.
We are using the [Route action](../../bundler-api/actions/route) inside of the [Bundle endpoint](../../bundler-api/api-reference/overview) as this action compares the best execution route for token amount out, and gas execution price. For example, it might be better to purchase yvWETH on a secondary exchange than directly depositing it depending upon the exchange rate of that token on the secondary market.
64
+
We are using the [Route endpoint](../../router-api/api-reference/overview) as this it compares the best execution route for token amount out, and gas execution price. For example, it might be better to purchase yvWETH on a secondary exchange than directly depositing it depending upon the exchange rate of that token on the secondary market.
Copy file name to clipboardExpand all lines: pages/examples/smart-wallet/route-1-position.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ It returns the following:
39
39
40
40
### Execute: Fetch the actions
41
41
42
-
We are using the [Route action](../../bundler-api/actions/route) inside of the [Bundle endpoint](../../bundler-api/api-reference/overview) as this action compares the best execution route for token amount out, and gas execution price. For example, it might be better to purchase yvWETH on a secondary exchange than directly depositing it depending upon the exchange rate of that token on the secondary market.
42
+
We are using the [Route endpoint](../../router-api/api-reference/overview) as it compares the best execution route for token amount out, and gas execution price. For example, it might be better to purchase yvWETH on a secondary exchange than directly depositing it depending upon the exchange rate of that token on the secondary market.
43
43
Note that the we set `toEoA` to _false_, as we are using a smart wallet.
0 commit comments