[Feature]: Explicit duplicate deposit txid
check is missing
#518
Labels
emily
API that communicates with Signers to trigger sBTC operations.
flagged by AR
Issue / bug / suggestion filed by Asymmetric Research
immunefi-scope
P3
Low Priority
(Low) Explicit duplicate deposit
txid
check is missing1. Description
When creating a deposit via Emily API you can specify a
txid
andvout
to point to the UTXO that’s supposed to be used for depositing.sbtc/emily/handler/src/api/handlers/deposit.rs
Lines 194 to 244 in 033e2cb
Potential duplicates or reuse of an existing
txid
shouldn't be a problem due to the database's design which has a primary (and hence unique) key over(txid, output_index)
. However, there should be explicit checks inside the code to verify that a TX has not been seen before in addition to that to avoid potential long-term regressions.The text was updated successfully, but these errors were encountered: