[LOSTFOUND] return swap out token to their owners

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:
https://explorer.near.org/transactions/6XNnrFPBcR1YykjBw99Hs5xd9T3ZNQCAS5us6yEWj4AM
abstraction:
{
  "token_id": "aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near",
  "sender_id": "thankyouser.near",
  "amount": "234428363511817388148"
}
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:
https://explorer.near.org/transactions/C1gheEcK6s8kLVwBbsAdH66sEGVxiNB4y1wZefjiHvdL
{
  "token_id": "dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near",
  "sender_id": "romalou.near",
  "amount": "4515771999"
}
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.

2 Likes

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 (dac17f958d2ee523a2206206994597c13d831ec7.factory.bridge.near)

Apparently there is a fix which will be rolled out shortly

1 Like