Skip to content

Instantly share code, notes, and snippets.

@maurelian
Last active December 3, 2016 03:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurelian/bbc32f73210be6460149e7f1623cce7a to your computer and use it in GitHub Desktop.
Save maurelian/bbc32f73210be6460149e7f1623cce7a to your computer and use it in GitHub Desktop.
In the .eth registrar: What happens when your bid value is less than your payment?

OK, so here's what it looks like happens when the value of the bid is higher than the amount submitted.

  1. 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.

  2. When you then unseal your bid, revealing the value of your actual bid (let's say 3 ETH) one of two things can happen:

    1. 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.

    2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment