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

cToken bidder changes #647

Merged
merged 6 commits into from
Jun 9, 2020
Merged

cToken bidder changes #647

merged 6 commits into from
Jun 9, 2020

Conversation

richardliang
Copy link
Contributor

No description provided.

@@ -36,6 +38,11 @@ import { Rebalance } from "../core/lib/Rebalance.sol";
*
* A helper contract that mints a cToken from its underlying or redeems a cToken into
* its underlying used for bidding in the RebalanceAuctionModule.
*
* CHANGELOG:
* - Remove reentrant modifier on bidAndWithdraw. This modifier is already used in RebalanceAuctionModule
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to add month/date/year of change

* Bid on rebalancing a given quantity of sets held by a rebalancing token wrapping or unwrapping
* a target cToken involved. The tokens are returned to the user. This function is only compatible with
* Rebalancing Set Tokens that use TWAP liquidators
*
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to add some language like here to note the exact problem this function is trying to solve.

“During a TWAP chunk auction, there is an adverse scenario where a bidder submits a chunk auction bid with a low gas price and iterateChunkAuction is called before that transaction is mined. When the bidder’s transaction gets mined, it may execute at an unintended price. To combat this, the BidAndWithdrawTWAP function checks that a new chunk auction has not been initiated from the point of bidding. The intended use case is that the bidder would retrieve the Rebalancing SetToken’s lastChunkAuctionEnd variable off-chain and submit it as part of the bid.”

felix2feng and others added 2 commits June 8, 2020 20:19
@coveralls
Copy link

coveralls commented Jun 9, 2020

Pull Request Test Coverage Report for Build 8274

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

Totals Coverage Status
Change from base Build 8243: 0.0%
Covered Lines: 1748
Relevant Lines: 1748

💛 - Coveralls

@richardliang richardliang changed the title [WIP] cToken bidder changes cToken bidder changes Jun 9, 2020
@bweick
Copy link
Contributor

bweick commented Jun 9, 2020

LGTM

@richardliang richardliang merged commit 3595c58 into master Jun 9, 2020
@richardliang richardliang deleted the richard/twap-ctoken-bidder branch June 9, 2020 17:43
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