peppersec / thunder_bridge

2 stars 29 forks source link

Two parallel conversion requests whose sum exceeding daily limit will lock the USDT in the Ethereum smart contact without minting TT-USDT #17

Closed billyinscn closed 5 years ago

billyinscn commented 5 years ago

During our test of the daily limit, we noticed that two parallel conversion requests whose sum exceeding daily limit will lock the USDT in the Ethereum smart contact without minting TT-USDT. Here is the repro steps:

  1. With the daily limit of 300K of the USDT->TT-USDT, we convert 150K and 100K USDT sequentially, and noticed 250K TT-USDT is minted successfully at the thunderCore side
  2. Try to perform another 50K USDT->TT-USDT, in order to reach the daily limit.
  3. Before confirm with metamask in step 2, open a new tab. and perform another 50K USDT->TT-USDT conversion.
  4. Clicked confirm for both 2) and 3 above
  5. Noticed totally 100K USDT is locked in the smart contact of Ethereum (https://kovan.etherscan.io/token/0x4b0b6e093a330c00fe614b804ad59e9b0a4fe8a9?a=0xbb1046b0fe450aa48deaff6fa474adbf972840dd), but there is no TT-USDT was minted for either step 2) or 3). https://scan-testnet.thundercore.com/address/0x130a8c2fcf2b0d44006ba63799cddb672451e417

Our expectation is for step 2) to proceed with minting 50K TT-USDT, and step 3 request got rejected.

rstormsf commented 5 years ago

there is no issue there. have you ever participated in ICO?

jd-swjtu commented 5 years ago

Can we try:(Assume only one validator) 1) Stop validator 2) Transfer 250K and 100K 3) Start validator ...