Skip to content

Commit

Permalink
feat: silo llama apr oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyonline committed Mar 9, 2024
1 parent 7664ff9 commit 36b5629
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/strategies/crvUSD/SiloLlamaAprOracle.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.18;

import {AprOracleBase} from "@periphery/AprOracle/AprOracleBase.sol";

contract StrategyAprOracle is AprOracleBase {
constructor() AprOracleBase("Strategy Apr Oracle Example", msg.sender) {}

/**
* @notice Will return the expected Apr of a strategy post a debt change.
* @dev _delta is a signed integer so that it can also represent a debt
* decrease.
*
* This should return the annual expected return at the current timestamp
* represented as 1e18.
*
* ie. 10% == 1e17
*
* _delta will be == 0 to get the current apr.
*
* This will potentially be called during non-view functions so gas
* efficiency should be taken into account.
*
* @param _strategy The token to get the apr for.
* @param _delta The difference in debt.
* @return . The expected apr for the strategy represented as 1e18.
*/
function aprAfterDebtChange(
address _strategy,
int256 _delta
) external view override returns (uint256) {
// TODO: Implement any necessary logic to return the most accurate
// APR estimation for the strategy.
return 1e17;
}
}

0 comments on commit 36b5629

Please sign in to comment.