Skip to content

Commit

Permalink
OptimizerAPR permissionless manualAllocation (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeNervoXS authored Feb 7, 2023
1 parent a339610 commit 8f7baf2
Show file tree
Hide file tree
Showing 50 changed files with 2,180 additions and 676 deletions.
14 changes: 10 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"python.terminal.activateEnvironment": true,
"python.defaultInterpreterPath": "/opt/anaconda3/envs/angle/bin/python",
"python.terminal.activateEnvInCurrentTerminal": false,
"python.terminal.executeInFileDir": false
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[solidity]": {
"editor.defaultFormatter": "JuanBlanco.solidity"
},
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
20 changes: 20 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate Header",
"type": "shell",
"command": "headers ${input:header}",
"presentation": {
"reveal": "never"
}
}
],
"inputs": [
{
"id": "header",
"description": "Header",
"type": "promptString"
}
]
}
230 changes: 0 additions & 230 deletions contracts/deprecated/GenericCompoundUpgradeableOld.sol

This file was deleted.

1 change: 1 addition & 0 deletions contracts/external/FullMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pragma solidity >=0.4.0;
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
/// @dev This contract was forked from Uniswap V3's contract `FullMath.sol` available here
/// https://github.com/Uniswap/uniswap-v3-core/blob/main/contracts/libraries/FullMath.sol
//solhint-disable
abstract contract FullMath {
/// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
/// @param a The multiplicand
Expand Down
5 changes: 4 additions & 1 deletion contracts/interfaces/IGenericLender.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ interface IGenericLender is IAccessControlAngle {
/// of `amount`
/// @param amount Amount to add to the lending platform, and that we want to take into account
/// in the apr computation
function aprAfterDeposit(uint256 amount) external view returns (uint256);
function aprAfterDeposit(int256 amount) external view returns (uint256);

/// @notice
/// Removes tokens from this Strategy that are not the type of tokens
Expand All @@ -71,4 +71,7 @@ interface IGenericLender is IAccessControlAngle {
/// Implement `_protectedTokens()` to specify any additional tokens that
/// should be protected from sweeping in addition to `want`.
function sweep(address _token, address to) external;

/// @notice Returns the current balance invested on the lender and related staking contracts
function underlyingBalanceStored() external view returns (uint256 balance);
}
7 changes: 7 additions & 0 deletions contracts/interfaces/IStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ pragma solidity ^0.8.17;

import "./IAccessControlAngle.sol";

struct LendStatus {
string name;
uint256 assets;
uint256 rate;
address add;
}

/// @title IStrategy
/// @author Inspired by Yearn with slight changes from Angle Core Team
/// @notice Interface for yield farming strategies
Expand Down
2 changes: 2 additions & 0 deletions contracts/interfaces/external/compound/CErc20I.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ interface CErc20I is CTokenI {
function borrow(uint256 borrowAmount) external returns (uint256);

function decimals() external returns (uint8);

function accrueInterest() external returns (uint256);
}
Loading

0 comments on commit 8f7baf2

Please sign in to comment.