vgrichina / bananaswap

Minimalistic Uniswap-style automated berry market maker running on NEAR
https://bananaswap.berryclub.io
15 stars 7 forks source link

Fail to swap NEAR into Banana before one user registered on Berry Club #1

Open think-in-universe opened 3 years ago

think-in-universe commented 3 years ago

Problem

BananaSwap is reported by some Math Wallet users as phishing, since they fail to swap NEAR into BANANA (their NEAR are transferred but no BANANA are received), before they ever draw and earn Banana via Berry Club.

The issue is after swap, the NEAR are transferred successfully as attached deposit, but no Banana was returned. ("panic_msg": "panicked at 'Receiver account doesn't exist', src/token.rs:244:14"), so from the user's perspective, it's very confusing. here is what I just tried to send a small amount of NEAR but no Banana were received. https://explorer.near.org/transactions/DnEwk1R4c2shUcndD11JZW1T8v93XPXQGtL9LuS44oPT

image

Cause

(from Eugene)

That’s because you are not registered to receive bananas. Because you haven’t paid for the storage Berryclub doesn’t have storage payment requirements, but you have to call it once. All other FT tokens require storage_deposit call to prevent sybil attacks.

IsQiao commented 3 years ago

i had the same problem, transfered 0.7N, then my banana is zero

ilblackdragon commented 3 years ago

I suggest to switch to https://app.ref.finance. It has Banana pool and supports adding more liquidity.

vgrichina commented 3 years ago

@think-in-universe @IsQiao fixed refunds in contract, but UI needs to be updated to allow creating account