Skip to content

Commit

Permalink
39 audit controllersol needs to implement tvl cant be zero (#64)
Browse files Browse the repository at this point in the history
* audit: remove approving of WETH when Depositing Eth

* audit: Vault.sol mapping to epochs is over

* natspec example

* synthax errors on compile

* useless onlyAdmin

* audit: Controller.sol needs to implement TVL cant be zero

* total supply and modifier

* allow rest only after epoch begins
  • Loading branch information
MiguelBits committed Sep 29, 2022
1 parent 2ea1428 commit 8268fd4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Controller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ contract Controller {
view
returns (int256 nowPrice)
{
uint observationFrequency = 1 hours;
(
,
/*uint80 roundId*/
Expand Down Expand Up @@ -311,7 +310,7 @@ contract Controller {
uint80 roundID,
int256 price,
,
uint256 timeStamp,
,
uint80 answeredInRound
) = priceFeed.latestRoundData();

Expand All @@ -330,9 +329,6 @@ contract Controller {
if(answeredInRound < roundID)
revert RoundIDOutdated();

if(timeStamp < block.timestamp - uint256(observationFrequency))
revert TimestampOutdated();

return price;
}

Expand Down

0 comments on commit 8268fd4

Please sign in to comment.