hop icon indicating copy to clipboard operation
hop copied to clipboard

hop-node: BondWithdrawalWatcher: Check bond amount doesn't exceed available amount on source chain. #409

Open miguelmota opened this issue 2 years ago • 4 comments

  • [x] checks amount to bond doesn't exceed amount available on L1SourceChainBalance+PendingAmount
  • [x] send notification

miguelmota avatar Mar 18 '22 00:03 miguelmota

@shanefontaine going to merge this if you think it looks good

miguelmota avatar Mar 23 '22 17:03 miguelmota

@miguelmota I think this would not work in the case where a malicious person can mint unlimited hTokens (i.e. if the chain has a bug in it).

Because of this, we would need to check the chainBalance from L1 along with the pending amount, and possibly other items as well.

shanefontaine avatar Mar 23 '22 17:03 shanefontaine

👍 checking L1 balance makes sense now

I was confused about what chainBalance meant; I see that it's a public getter on the contract

miguelmota avatar Mar 23 '22 18:03 miguelmota

Ready for review

miguelmota avatar Apr 13 '22 16:04 miguelmota

Closing as stale

miguelmota avatar Jan 19 '24 17:01 miguelmota