Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

ERC20 Rebalancing Set Exchange Issuance #486

Merged
merged 10 commits into from Jun 15, 2019

Conversation

felix2feng
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Jun 12, 2019

Pull Request Test Coverage Report for Build 5896

  • 50 of 50 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 5859: 0.0%
Covered Lines: 852
Relevant Lines: 852

💛 - Coveralls

* @title ERC20RebalancingSetExchangeIssuanceModule
* @author Set Protocol
*
* The ERC20RebalancingSetExchangeIssuanceModule supplementary smart contract allows a user to send Eth and atomically
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

send any ERC20 to be used in decentralized exchange

* @author Set Protocol
*
* The ERC20RebalancingSetExchangeIssuanceModule supplementary smart contract allows a user to send Eth and atomically
* issue a rebalancing Set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use the contract name here. The token they're issuing is the RebalancingSet

/* ============ Public Functions ============ */

/**
* Issue a Rebalancing Set using Wrapped Ether to acquire the base components of the Base Set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update me

_exchangeIssuanceParams.receiveTokens[0],
address(this)
);
if ( paymentTokenInVault > 0 ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird spacing

/* ============ Private Functions ============ */

/**
* Any unused Wrapped Ether or base Set issued is returned to the caller.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update me

}

/**
* Redeems a Rebalancing Set into Wrapped Ether. The Rebalancing Set is redeemed into the Base Set, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update me

);

// Create 0x order for the component, using weth(4) paymentToken as default
zeroExOrder = await setUtils.generateZeroExSignedFillOrder(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before, this test is not very indicative of what we're going to launch with.

  1. the set has a single component
  2. it's a single 0x order
  3. it's 0x
    at the very minimum lets get these switched over to using kyber for the one component

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a second to breath now, we should circle back and address this the right way this time.

@asoong
Copy link
Contributor

asoong commented Jun 13, 2019

Let's make sure to keep comments updated. Very misleading for auditors


// Address and instance of Transfer Proxy contract
address public transferProxy;
ITransferProxy public transferProxyInstance;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears from the ABDK review that these interfaces can also function as an address. So when we store the address and the instance we're just duping the data so maybe it makes sense to remove transferProxy and exchangeIssuanceModule.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 that is correct

* @param _rebalancingSetAddress Address of the rebalancing Set
* @param _rebalancingSetQuantity Quantity of rebalancing Set to redeem
* @param _exchangeIssuanceParams Struct containing data around the base Set issuance
* @param _orderData Bytecode formatted data with exchange data for acquiring base set components
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

selling base set components

*
* @param _rebalancingSetAddress Address of the rebalancing Set
* @param _rebalancingSetQuantity Quantity of rebalancing Set to redeem
* @param _exchangeIssuanceParams Struct containing data around the base Set issuance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redemption

@felix2feng felix2feng merged commit 950bfa0 into master Jun 15, 2019
@felix2feng felix2feng deleted the felix/erc20-rb-exchange-issuance branch June 15, 2019 04:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants