Skip to main content

Tokenized route vs nontokenized route

Use the standard Route API when the destination is a tokenized position. Use GET /shortcuts/route/nontokenized, usually with delegate, when the position is not represented by a token.

J
Written by Javier Diaz

Use the standard Route API when the destination is a tokenized position. Use GET /api/v1/shortcuts/route/nontokenized, usually with the delegate strategy, when the position is not represented by a token.

Definition

The two endpoints solve the same kind of problem — get the user from an input asset into a destination position — but they target different position types.

How to choose

  • Choose standard Route (POST /api/v1/shortcuts/route) when tokenOut is a token you can hold, such as a vault share or other receipt token.

  • Choose the nontokenized endpoint when the position is stored directly in a protocol contract, typically in a smart wallet.

  • Discover nontokenized destinations with GET /api/v1/nontokenized, and prefer positionId as positionOut.

  • If you need a fixed list of actions such as borrow or harvest, use Bundle, not either route shortcut alone.

How Enso does this

The FAQ contrasts POST /shortcuts/route for tokenized positions with GET /shortcuts/route/nontokenized for positions stored in a contract. See also the nontokenized routing guide. The FAQ calls for a smart wallet and delegate when you use the nontokenized endpoint.

FAQ

Can I pass a token address to the nontokenized endpoint as tokenOut?

The nontokenized request uses positionOut, preferably a positionId. An address can map to several positions and then the request errors.

Is this the same as Route vs Bundle?

No. Both of these endpoints ask Enso to find a path. Bundle is for when you specify the action list yourself.

Related articles

  • What is a tokenized position vs a non-tokenized position?

  • How do I route into a non-tokenized position?

  • Route API vs Bundle API: which should I use?

  • How do I use Enso with a smart wallet?

  • What is a routing strategy?

Sources

Did this answer your question?