Skip to content

[WIP] Create Fractional MarketWrapper#51

Open
apoorvlathey wants to merge 2 commits into
PartyDAO:mainfrom
apoorvlathey:feature/fractional
Open

[WIP] Create Fractional MarketWrapper#51
apoorvlathey wants to merge 2 commits into
PartyDAO:mainfrom
apoorvlathey:feature/fractional

Conversation

@apoorvlathey

Copy link
Copy Markdown

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

anna-carroll commented Sep 3, 2021

Copy link
Copy Markdown
Contributor

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

apoorvlathey commented Sep 3, 2021

Copy link
Copy Markdown
Author

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