1

I'm building a smart contract based auction system on top of ethereum, like this example. Instead of the highest bidding price, the system will use a function f to compute the most optimal bid.

E.g., if each bid is represented with parameters (a, b, c), then the most optimal bid is the one that maximizes f(a, b, c).

The questions I have are:

  1. Is this system feasible on ethereum?
  2. Can function f be updated in the future? How difficult is it?
  3. Is it possible to pin a specific f for a contract, so attackers cannot implement a different function g and disrupt the decision making process?

Thanks

1

Is this system feasible on ethereum?

Probably yes, but it's hard to say, because it is still not clear to me what is your algorithm of function f.

Can function f be updated in the future? How difficult is it?

No. Once smart contract is deployed to Ethereum you cannot change its functions.

Is it possible to pin a specific f for a contract, so attackers cannot implement a different function g and disrupt the decision making process?

The funciton g that you are referring to can only be implemented outside of your deployed contract instance. In this case function g can only affect the state of your contract only if one of your functions can change the state and this functionality is not regulated by some modifiers like onlyOwner() or by limiting visibility (e.g. internal, private).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.