Why is it necessary to convert $ICP to $WICP (wrapped ICP) prior to swap to other tokens? (saw it on sonic.ooo and icpSwap) I really don’t understand this, not even $ETH need something quite similar. This is a huge drawback for DeFi adoption in the $ICP ecosystem
this is the ICPSWAP response I got. I see this as the weakness of $ICP. when having to use $ICP when joining defi. can create a risk like StETH or a risk of losing the peg.
The raw ICP interface only supports a transfer method, which when used in production results in many issues for services trying to use ICP. The raw token flow works great for User<->User interactions, but not for User<->Service interactions. One big issue is double spending scenarios, as seen with some services (not going to call names here), users could transfer any amount or the correct amount multiple times, and the service has no idea the transfer happened. Wrapped ICP (which implements the dip20 interface - sonic) allows us to use an approve/transferFrom, to allow the service to interact with funds in the most efficient way possible. User approves an amount, and the service can claim funds up to that amount, or less. The swap service may only consume a portion of the amount due to slippage when the swap is filled, so taking the full amount isn’t ideal. Ex; theres a ton of swaps A → B, another user puts a request in for B → A, but the swap rate when the user initiated the swap has dropped due to all the in progress swaps, but still in acceptable range, so user ends up spending less of B and getting the same amount of A, and the service only accepts the minimum and the user keeps the difference, without additional transfers to “refund”.
We have the possibility of not needing these wrapped versions, if the raw ICP interface provided some service level flow like dip20 or is20 do
Furthermore, Ethereum does have the same thing going on, eg go to opensea and attempt to purchase an NFT, you will need WETH to do so. Eth does not have an option to fix this like we do on the IC though, as the ICP ledger is just another canister, and could be expanded to solve such things, but ETH’s payment flow is part of the chain and cannot change
We have the possibility of not needing these wrapped versions, if the raw ICP interface provided some service level flow like dip20 or is20 do
As someone who’s clearly well-versed in the matter: do you think that a change in the raw ICP interface introduces new challenges or would it be a straightforward thing to do in the mid-run?