sugarskins / csgo-steam-eth-trade

secure trading of CS:GO Steam community market weapons without a trusted third-party middleman
GNU General Public License v3.0
7 stars 1 forks source link

Devise method for guaranteeing contract logic #7

Open danoctavian opened 4 years ago

danoctavian commented 4 years ago

Any vendor created contract must be known to use the same implementation as the one publicly available.

One possibility is to make vendor contracts be generated by a contract factory which is trusted to hold the correct bytecode for the contract.

This is similar to the pattern used by uniswap https://docs.uniswap.io/smart-contract-api/factory

This is how to create upgradeable contracts using a factory

https://github.com/OpenZeppelin/openzeppelin-sdk/tree/master/examples/creating-instances-from-solidity