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

[WIP] Create Fractional MarketWrapper #51

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apoorvlathey
Copy link

Built the MarketWrapper contract for Fractional Auctions along with its unit tests.

Current issue: In case of a losing bid, fractional vault transfers ETH to EOA but WETH for contract addresses.
As PartyBid expects the payout to be in ETH, the following test cases fail:

Claim
    Allows Claim, transfers ETH and tokens to contributors after Finalize
Emergency Force Lost
    ETH balance is equal to total contributed to party
    Allows Claim, transfers ETH and tokens to contributors after Finalize
External Finalize    
    Has correct totalSpent, totalSupply of tokens, balanceOf PartyBid tokens, and ETH balance
Finalize
    Has correct totalSpent, totalSupply of tokens, balanceOf PartyBid tokens, and ETH balance

Thinking about the possible solutions:

  1. Fractional allows ETH transfers to contracts. Or have some whitelist if they don't trust all contracts.
  2. PartyBid adds support for WETH in finalize()
  3. Any other way? Pls suggest.

@anna-carroll
Copy link
Contributor

anna-carroll commented Sep 3, 2021

Fractional allows ETH transfers to contracts. Or have some whitelist if they don't trust all contracts.

this is not necessary / not really helpful because there's new PartyBid addresses for every party. they just would need to use the function instead

function _transferETHOrWETH(address _to, uint256 _value) internal {

the intention of sending WETH is to protect against those who don't have a payable fallback implemented, or otherwise whose fallback uses too much gas

PartyBid adds support for WETH in finalize()
this wouldn't work, it would need to happen each time the party was outbid in order to place subsequent bids

@apoorvlathey
Copy link
Author

apoorvlathey commented Sep 3, 2021

You are right, got it.
So that means with the currently deployed versions of Fractional and PartyBid, it won't be possible to have a functional MarketWrapper. right?
(just checked discord 👍)

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

Successfully merging this pull request may close these issues.

2 participants