You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app needs to know about liquidated contracts, in order to show them on the UI as liquidated.
Different approaches:
The app could detect which contracts are below the minimum ratio level and mark them as Liquidated. But if the contract was liquidated in the past, but now has a ratio above that limit, the app will show it as Critical or even Safe, and will have the Redeem and Topup buttons enabled, which is wrong.
When the app gets each contract from local storage, cross reference its txid with available coins, and if the contract was not redeemed, it will mark it as liquidated if no coin is found. Theoretically I think this solution works, what do you think?
When the app gets each contract from local storage, cross reference its txid with available coins, and if the contract was not redeemed, it will mark it as liquidated if no coin is found.
for contract already in storage, App should check the txid:vout onchain and go look if is spent and WHAT scriptHex is passed in witness (last two elements of witness are control block and script hex)
Watcher will also will also have the duty to notify frontends about this happening, but this logic of checking spent outpoint can be duplicated in frontend as extra check
The problem:
The app needs to know about liquidated contracts, in order to show them on the UI as liquidated.
Different approaches:
The app could detect which contracts are below the minimum ratio level and mark them as Liquidated. But if the contract was liquidated in the past, but now has a ratio above that limit, the app will show it as Critical or even Safe, and will have the Redeem and Topup buttons enabled, which is wrong.
When the app gets each contract from local storage, cross reference its txid with available coins, and if the contract was not redeemed, it will mark it as liquidated if no coin is found. Theoretically I think this solution works, what do you think?
cc @miyo-fuji @FlyingMonkey0
The text was updated successfully, but these errors were encountered: