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

modern rebalance timelock and threshold #221

Merged
merged 19 commits into from
Jul 27, 2022

Conversation

georgercarder
Copy link
Contributor

@georgercarder georgercarder commented Jul 21, 2022

Closes #143

modern version of #168

@georgercarder georgercarder changed the title modern timelock and threshold modern rebalance timelock and threshold Jul 21, 2022
@georgercarder georgercarder marked this pull request as draft July 21, 2022 19:01
@georgercarder georgercarder marked this pull request as ready for review July 22, 2022 22:14
@georgercarder georgercarder force-pushed the george/code4rena/issue/143_modern branch from 8d8f988 to f0e96e1 Compare July 25, 2022 20:01
Copy link
Member

@PeterMPhillips PeterMPhillips left a comment

Choose a reason for hiding this comment

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

The core changes look good but I think there were some unnecessary changes to the ControllerLibrary and LibraryWrapper that I would prefer to see removed from this PR

Comment on lines 353 to 364
function getExpectedTokenValue(
uint256 total,
address strategy,
address token
) public view returns (int256) {
return StrategyLibrary.getExpectedTokenValue(total, strategy, token);
}

function getRange(int256 expectedValue, uint256 threshold) public pure returns (int256) {
return StrategyLibrary.getRange(expectedValue, threshold);
}

Copy link
Member

Choose a reason for hiding this comment

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

Why are you providing this interface in the library?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed here 817baf3

contracts/test/LibraryWrapper.sol Outdated Show resolved Hide resolved
@georgercarder georgercarder force-pushed the george/code4rena/issue/143_modern branch from cd2b464 to 817baf3 Compare July 26, 2022 17:00
@georgercarder georgercarder force-pushed the george/code4rena/issue/143_modern branch from 8790877 to 75a8135 Compare July 26, 2022 17:19
@PeterMPhillips PeterMPhillips merged commit 06e2230 into develop Jul 27, 2022
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.

Implement threshold/timelock on rebalance
2 participants