4

The Solana documentation describes how to wrap SOL into a custom token. Is that the same procedure used by wSOL? What would be other use cases for doing this?

Token Program | Solana Program Library Docs

Edit, To clarify my question:

I am aware about what wrapped SOL/ETH/whatever is for and why we have them.

SOL docs say:

When you want to wrap SOL, you can send SOL to an associated token account on the native mint and call syncNative. syncNative updates the amount field on the token account to match the amount of wrapped SOL available. That SOL is only retrievable by closing the token account and choosing the desired address to send the token account's lamports.

Questions are:

  • Is wrapped SOL implemented by using this method?
  • Are there other tokens having SOL wrapped?
  • Why would I do that / What are other use cases (except having wSOL for the obvious reasons)?

2 Answers 2

5

It helps to remove the annoyances that would come with dealing with a "special" asset by making SOL the same as any other spl token.

Imagine you are writing a defi app that has a process like:

  1. Derive/get the user ATA for X token

  2. Transfer X to some account

  3. Close the ATA for X

It becomes annoying when X is SOL, since SOL becomes a special case where you don't do steps 1 and 3, as it would have no ATA and you can't close the user's wallet.

Wsol allows you to do the same steps for SOL as you would do for any other spl token. On the front end, it is slightly annoying, as you must create a "temporary" ATA and transfer some of the user's SOL to it, but it is better to have these annoyances on the front end than in the protocol.

3
  • Doesn't really answer my question. I am aware of what wrapped Sol is. I asked about why i would wrap sol in any other Token.
    – Lukas
    Mar 28, 2023 at 6:12
  • I think that language there is just a funny way to say wrapped sol.
    – Whiteseal
    Mar 28, 2023 at 6:22
  • What Whiteseal says. I'm pretty sure just the wording is bad, something like "wrap sol AS any other token" would actually make sense.
    – pepeIKO
    Mar 28, 2023 at 15:42
2

Wrapped SOL (wSOL) is essentially the SPL token equivalent of native SOL, and can be freely converted between the two. A common case use for wSOL is in Defi platforms, where it enables convenient swaps/transfers with other SPL tokens.

How can I wrap Native Sol in JS?

3
  • Doesn't really answer my question. I am aware of what wrapped Sol is. I asked about why i would wrap sol in any other Token.
    – Lukas
    Mar 28, 2023 at 6:12
  • Can you explain more about what you mean when you say "wrap sol in any other Token"? I'm not sure I understand your question
    – john
    Mar 28, 2023 at 7:45
  • Edit: Updated my question to be more clear
    – Lukas
    Mar 29, 2023 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.