Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/master collateral pool #138

Merged
merged 10 commits into from Sep 28, 2018
Merged

Conversation

0xean
Copy link
Contributor

@0xean 0xean commented Sep 26, 2018

Description

Quick and dirty POC of a master collateral pool

In this implementation - each Factory has its own Collateral Pool, that all contracts feed into that are created from that factory.

Pros of this approach

  • significant gas savings for deployment of new contracts, however we can further reduce this I believe relatively easily but want to avoid premature optimizations.
  • single transaction to deploy a new MarketContract! simplifies our lives in the UI of the dApp
  • Collateral deposited in a single collateral pool, can be used with ANY MarketContract that is created by the factory. This is a far superior UX to having collateral spread across many contracts. For example, if I deposit WETH, I can trade ALL contracts now denominated in WETH!

Cons of this approach

  • Collateral for all contracts is in a single place, bigger target.
  • Cannot implement per contract functionality for some owner to be able to provide some specific functionality with contracts they have deployed.

@coveralls
Copy link

coveralls commented Sep 26, 2018

Pull Request Test Coverage Report for Build 533

  • 38 of 39 (97.44%) changed or added relevant lines in 5 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 55.608%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/oraclize/MarketContractFactoryOraclize.sol 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
contracts/Linkable.sol 4 0.0%
Totals Coverage Status
Change from base Build 518: -0.2%
Covered Lines: 359
Relevant Lines: 603

💛 - Coveralls

@0xean 0xean changed the title [WIP] Feature/master collateral pool Feature/master collateral pool Sep 27, 2018
@0xean 0xean added this to the Week 39 Iteration milestone Sep 28, 2018
@0xean 0xean merged commit 28694f7 into develop Sep 28, 2018
@0xean 0xean deleted the feature/master-collateral-pool branch December 18, 2018 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants