Liquidity Problem

Hi Admin, Good evening :city_sunset:
I’m here to request a refund on my lost STNEAR.
Around 1.5 Stnear is Missing from my account today after I add a liquidity on ref.finance.

The image below :point_down: show my balance when I add the Liquidity.

As I can’t post 2 media on this post, check comment below for the second proof.

Please Everyone here , I need help on how to get my Stnear back.

My wallet address is below :point_down:

codedforum.near

Please :pray: I really need my funds back

Then after I added the Liquidity I go to my account to check my liquidity and I see that around 1.5 stnear is missing from my balance.
Image proof below :point_down:

Please Everyone here , I need help on how to get my Stnear back.

My wallet address is below :point_down:

codedforum.near

Please :pray: I really need my funds back

The following is a copy/paste from ref’s discord about this issue from the point where I joined the discussion.

Link to smartcoded’s first discord message about this issue: Discord

Link to my first message: Discord

Times are in UTC

  1. Ben Today at 5:35 PM

This isn’t a result of IL due to natural changes in the value of tokens. The problem was that you created a new pool and deposited amounts that resulted in a swap rate for META → stNEAR to be over 5x the market rate. You deposited 4.3 stNEAR and 163 META, which resulted in a swap rate of 0.026 stNEAR for 1 META. The market rate is 0.0047 stNEAR for 1 META. Chances are an arbitrage bot detected this, swapped 1 stNEAR for 220 META at the market rate, and then used the pool you created to swap the 220 META for 2.5 stNEAR. (edited)

smartcoded Today at 5:37 PM

Then why am I at lost ??

  1. [ 5:38 PM ]

Can I get a refund

  1. [ 5:38 PM ]

codedforum.near

  1. smartcoded

codedforum.near

smartcoded Today at 5:38 PM

That’s my wallet

  1. @smartcoded

Then why am I at lost ??

Ben Today at 5:38 PM

the swap deposited 220 META and removed 2.49 stNEAR 163 + 220 = 383 4.3 - 2.49 = 1.81

  1. @Ben

the swap deposited 220 META and removed 2.49 stNEAR 163 + 220 = 383 4.3 - 2.49 = 1.81

smartcoded Today at 5:39 PM

What I mean is that where’s the remaining balance ?

  1. [ 5:39 PM ]

Why am I at Lost

  1. [ 5:40 PM ]

Please I need help

  1. @smartcoded

Why am I at Lost

Ben Today at 5:40 PM

because there isn’t anywhere you can swap your 220 META for 2.5 stNEAR. You gained META and lost stNEAR

  1. [ 5:40 PM ]

why did you create a pool?

  1. @Ben

why did you create a pool?

smartcoded Today at 5:41 PM

I’m planning to farm Stnear/Meta ??

  1. smartcoded

codedforum.near

smartcoded Today at 5:41 PM

You can check my wallet for everything.

  1. @smartcoded

I’m planning to farm Stnear/Meta ??

Ben Today at 5:41 PM

there is a specific pool for that farm. why did you create a new one?

  1. [ 5:43 PM ]

you will not get a refund. 1: it is literally impossible to reverse transactions. 2. the loss was not a result of a bug

  1. @Ben

you will not get a refund. 1: it is literally impossible to reverse transactions. 2. the loss was not a result of a bug

smartcoded Today at 5:44 PM

But I’m still not getting what really happened , please I need to know how my funds was lost please

  1. [ 5:44 PM ]

I’m hurt

  1. smartcoded

But I’m still not getting what really happened , please I need to know how my funds was lost please

smartcoded Today at 5:48 PM

@Ben

  1. Message could not be loaded.

Ben Today at 5:48 PM

I am writing right now trying to explain it to you. please wait

  1. Message could not be loaded.

smartcoded Today at 5:49 PM

My funds is gone

  1. @smartcoded

But I’m still not getting what really happened , please I need to know how my funds was lost please

Ben Today at 5:55 PM

At this moment 1 EUR = 1.09 USD let’s say you open an exchange and set your exchange rate to 1 EUR = 6 USD You start with 150 EUR and 900 USD
I realize your error, go to another exchange, and buy 100 EUR for 109 USD at the market rate I then go to you, and exchange my 100 EUR for 600 USD This leaves you with 250 EUR and 300 USD

  1. [ 5:56 PM ]

get it now?

smartcoded Today at 5:57 PM

  1. Message could not be loaded.

smartcoded Today at 5:59 PM

What I’m not getting is that , is it ref.finance that get funds or why did my funds lost. Boat should just have correct my errors

  1. [ 5:59 PM ]

@Ben check dm please

  1. Message could not be loaded.

Ben Today at 6:01 PM

you need to research how swap pools work. there is an algorithm that determines the swap rates. Ref finance uses the same algorithm as uniswap, sushiswap, and the vast majority of other AMM’s

  1. Message could not be loaded.

Ben Today at 6:01 PM

I’m sorry but I would like to keep this conversation public, so that everyone can see how it is resolved

smartcoded Today at 6:02 PM

What I know with other pool is this. When I want to add 1 stnear with 100meta . If 1stnear will be more value than 100meta they will highlights it instantly.

  1. [ 6:03 PM ]

And this is my first time of loosing funds to Liquidity pool.

  1. *[6:03 PM ]

I’m used to other dex on BSC .

  1. [ 6:03 PM ]

This is my first time adding pool on Near Protocol

Ben Today at 6:05 PM

you are the one who chose the amounts to add. why did you choose those amounts? (edited)

  1. Message could not be loaded.

Ben Today at 6:07 PM

also, why did you choose to create a new pool, instead of depositing your tokens in the existing pool?

  1. Message could not be loaded.

smartcoded Today at 6:07 PM

Like I said, today’s my first time on near.

  1. Message could not be loaded.

smartcoded Today at 6:08 PM

I just click on Max

  1. Message could not be loaded.

smartcoded Today at 6:17 PM

@Ben

  1. Message could not be loaded.

Ben Today at 6:21 PM

so people who never created a pool can understand what clicking max looks like: when you clicked max next to stnear, you saw that the number it put on the form was the total amount of stnear in your wallet. when you clicked max next to “meta”, you saw the number it put was the total amount of meta in your wallet.

  1. [ 6:22 PM ]

is this correct?

  1. Message could not be loaded.

smartcoded Today at 6:23 PM

Yes.

  1. [ 6:23 PM ]

Then after I confirm ,it changed that’s how I just see that my funds is no more completed.

  1. [ 6:25 PM ]

When I click max, it shows Normal

  1. [ 6:25 PM ]

Them when I add it it’s still normally, you can check screenshot.

  1. [ 6:25 PM ]

After adding, I check my liquidity then I see that over 1.5 stnear is missing.

  1. [ 6:26 PM ]

That what’s confusing me, I will be happy if you can try to understand me please.

  1. [ 6:26 PM ]

How will funds just disappear like that.

  1. [ 6:26 PM ]

I’m hurt to be sincere.

  1. [ 6:27 PM ]

If it changed to minus when I clicked on MAX, you know I wnt submit at all.

  1. [ 6:28 PM ]

You can check the screenshot.

  1. [ 6:28 PM ]

I know I’m in lost only when I check my liquidity

  1. Message could not be loaded.

Ben Today at 6:34 PM

The only way funds can be released from the ref finance treasury is by the dao voting to approve a proposal containing the code to transfers them. It is literally impossible for funds to be released from the treasure in any other way If you still feel you should be compensated, you need to create a post on the ref governance forum explaining what happened, why you should be compensated, and for how much. The post will be public, and anyone will be able to read and reply to it. If someone with the ability to create a proposal on the Ref DAO believes that it is even remotely possible that a proposal to transfer funds to you will get enough votes to pass (50% + 1 of the community dao), then they will create one. https://gov.ref.finance/ (edited)


The conversation after this point was just about posting the request on the gov forum

2 Likes

I need my stnear back :back: :palms_up_together::palms_up_together:

Hey there @Smartcoded, i see that this is your first time on Near, really sorry that you’ve encountered this and lost money. I think Ben’s explanation above is quite clear already, but here i’ll try to do it again so you can have a better picture.

Imagine you are selling fish, the market price is $10 per pound, but you are selling for $8 per pound, meaning you are selling below market price. People notice this and buy all your fish, then later sell them at market price, an easy profit of $2 per pound for them and you’ll be at a loss.

Now imagine those buyers are traders/ bots, your fishes are your stNEAR. You’re basically selling stNEAR at a discounted price, a price below market price. So here bots/traders are the beneficiaries.

Hope now you can understand better that this is not an error from Ref side. Ref finance liquidity pools system is different from other DEXs, so it’s better for new users to check out the user guide first before making any interaction.

But, what I’m saying is that there’s no lost until I Added the Liquidity, I’m not selling anything. It’s after I added the Liquidity that I see that my funds has been deducted :pleading_face:

Please help me look into the first screenshot

I’m not buying or selling anything here. Please try to understand me. I add liquidity and after adding liquidity ref.finance deduct 1.5 stnear from my balance. Check the screenshot I sent.

i think you don’t understand the basics of DeFi yet, please check out this article to learn the basic concept of liquidity pools.

Liquidity pools are a mechanism by which users can pool their assets in a DEX’s to provide asset liquidity for traders to swap between currencies.

It doesn’t make sense if Ref finance deducts 1.5 stNEAR from your balance but gives you 220 META more, right?

1 Like

That’s what I’m trying to say, Ref deduct more than they should deduct from my balance.

Nothing wrong/bad happens. Only the way any Automated Market Makers is supposed to work.

I suggest that you read our documentation to have a better understanding of what happened in your case.

In a nutshell, when you create a pool and add liquidity to it, the plaform is in charge of creating the pool based on the user’s specifications (token A, token B, Pool fee, Amount token A, etc.).

The user, and ONLY the user, decides what ratio (Amount token A to Amount token B) their want to provide initially.

If the user wants to provide liquidity at the market ratio, they also have the option to add liquidity to an existing pool for the associated pair, as long as they are aligned with other specifications (i.e. Pool fee).

Getting back to your case:

  1. You created a pool
  2. Added liquidity at a different ratio from the market ratio
  3. Got arbitraged
  4. Removed liquidity

Yes, the amounts you have now are different from the amounts you have provided initially. Now, they are aligned with the ratio of the market.

Everything ran very smoothly, and even demonstrated the ability of arbitrageurs to deal with new pools once created.

2 Likes

:pleading_face::pleading_face: so I can’t get refunds of my lost.
This is scary to me I swear :slightly_smiling_face:

How will Albitrage get into Liquidity pool .
I just don’t get everything at all. I added a pool you’re talking about Albitrage.

Ref.finance Team have go with my Funds :thinking:

From my first message to you on discord:

This is also from our conversation in Discord:

Do you understand now how you created an arbitrage opportunity, and how arbitrage relates to liquidity pools?

2 Likes

You deposited 4.3 stNEAR and 163 META, which resulted in a swap rate of 0.026 stNEAR for 1 META. The market rate is 0.0047 stNEAR for 1 META. Chances are an arbitrage bot detected this, swapped 1 stNEAR for 220 META at the market rate,

Yes I deposited this.

And bot swapped 1 stnear for 220 META
.

Now where’s my stnear balance.
Where did my balance go ??
That’s the refunds I’m actually requesting to get.
What I deposit minus what bot deduct is equal my balance, why did my balance disappear.
Please try to understand me Team.

This is the transaction where you deposited tokens in your pool:
https://explorer.mainnet.near.org/transactions/BoMQycY8Jg85TaqHeVtZptTSCbKsmvaNmCSw7Nm8Mmkx

About 4 seconds later, an arbitrage bot swapped 221.743 META for 2.467 stNEAR on your pool:
https://explorer.mainnet.near.org/transactions/AoEtbFx7d1iZeyRJy9Z5tGHJy4oc1QNmdsa3qyFAJ1Nr

2 Likes

The stNEAR went to the bot’s account, the bot’s META went to the pool’s account. Liquidity pools are where the tokens come from for swapping

Why will bot transact on my account without my approval ??

It’s not your account. it’s a liquidity pool