To handle 2 exeptions on user’s instant swap actions:
- On May 18,
thankyouser.near swaps aurora token but failed cause not registered on aurora in advance, swap is successful but out-token is in DAO inner account on ref. details:
Account thankyouser.near is not registered. Depositing to owner.
# suggest to pay aurora 234.428363511817388148 to thankyouser.near from DAO account
- On May 31,
romalou.near swaps usdt toke but failed cause not registered on usdt in advance, swap is successful but out-token is in DAO inner acocunt on ref. details:
Account romalou.near is not registered. Depositing to owner.
# suggest to pay usdt 4515.771999 to romalou.near
Our ref guardians have withdraw those two tokens with corresponding amount to DAO wallet. see txs here: tx1 tx2
So, 2 proposals would be created soon to return those assets to owners.
Are these isolated issued? How common would the scenario be of a user swapping into a token where they have not registered it in advance?
Would be great to get a bit more detail on what the registering in advance process is and potential ways in which we could mitigate this error in the future within the REF UI/UX - perhaps prompt the user to register token prior to swapping?
Registering is making the storage deposit for the smart contract.
Before doing an instant swap, the site queries the “out” token’s smart contract to check that the user’s account has a storage deposit (
storage_balance_of). If it doesn’t, then the site prepends a tx to register the account (
storage_deposit) before the tx for the instant swap. These are the swaps where you have to approve a 0.1N transaction.
thankyouser.near is a trading bot of some kind, so it’s not ref’s fault that the account was not registered before doing the swap.
romalou.near was the result of a bug that caused the site to send the
storage_deposit call to the USDC contract (
a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near) instead of the USDT contract (
Apparently there is a fix which will be rolled out shortly