Skip to content

Commit

Permalink
Moved credit minting and burning into PrizePool
Browse files Browse the repository at this point in the history
  • Loading branch information
asselstine committed Aug 17, 2020
1 parent 4d206f7 commit b2f6034
Show file tree
Hide file tree
Showing 11 changed files with 374 additions and 569 deletions.
6 changes: 3 additions & 3 deletions contracts/builders/CompoundPrizePoolBuilder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import "../external/compound/CTokenInterface.sol";

contract CompoundPrizePoolBuilder is Initializable {
using SafeMath for uint256;
using SafeCast for uint256;

struct Config {
CTokenInterface cToken;
Expand Down Expand Up @@ -74,6 +75,8 @@ contract CompoundPrizePoolBuilder is Initializable {
config.maxTimelockDuration
);

prizePool.setCreditRateOf(tokens[0], config.creditRateMantissa.toUint128(), config.exitFeeMantissa.toUint128());

prizePool.transferOwnership(msg.sender);

prizeStrategy.initialize(
Expand All @@ -87,9 +90,6 @@ contract CompoundPrizePoolBuilder is Initializable {
config.externalERC20Awards
);

prizeStrategy.setExitFeeMantissa(config.exitFeeMantissa);
prizeStrategy.setCreditRateMantissa(config.creditRateMantissa);

prizeStrategy.transferOwnership(msg.sender);

emit CompoundPrizePoolCreated(
Expand Down
284 changes: 262 additions & 22 deletions contracts/prize-pool/PrizePool.sol

Large diffs are not rendered by default.

Loading

0 comments on commit b2f6034

Please sign in to comment.