OK, so here's what it looks like happens when the value of the bid is higher than the amount submitted.
-
When you submit a new bid, a deed contract is created. The full amount of ether you submitted (let's say 3 ETH) is sent to that Deed.
-
When you then unseal your bid, revealing the value of your actual bid (let's say 3 ETH) one of two things can happen:
-
The current highest bid for
foobarbaz.eth
is 4 ETH. You do not win. The registrar thus closes the deed, refunding 99.9% of the amount submitted. -
The current highest bid for
foobarbaz.eth
is 2 ETH. You are the highest bidder so far! In this case, the registrar will try to update the balance held by the deed, and refund the difference between your balance (3 ETH) and your bid (6 ETH). But it expects your balance to be greater than your bid value, when it turns out that's not true, it throws.
-
So, yeah, from what I can see it looks like that's a lopsided outcome. If you bid more than you submit and you are the highest bidder, then your funds are locked in the deed. (Using Deed.setBalance) If you bid more than you submit and you are the highest bidder, then your funds will be refunded. (using Deed.closeDeed)
The key difference is that Deed.setBalance
actually compares your balance
to your bid value
. Deed.closeDeed
doesn't.