Skip to content

Commit

Permalink
updated interfaces for pricer
Browse files Browse the repository at this point in the history
  • Loading branch information
aalavandhan committed Sep 16, 2024
1 parent fd66ecb commit 6792e2e
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 128 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
interface IBondController {
function collateralBalance() external view returns (uint256);
}
14 changes: 14 additions & 0 deletions spot-vaults/contracts/_interfaces/external/IERC20.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 value) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
}
7 changes: 7 additions & 0 deletions spot-vaults/contracts/_interfaces/external/IPerpFeePolicy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
interface IPerpFeePolicy {
function decimals() external returns (uint8);
function deviationRatio() external returns (uint256);
function computePerpRolloverFeePerc(uint256 dr) external returns (int256);
}
13 changes: 13 additions & 0 deletions spot-vaults/contracts/_interfaces/external/IPerpetualTranche.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
interface IPerpetualTranche {
function underlying() external view returns (address);
function getTVL() external returns (uint256);
function totalSupply() external returns (uint256);
function getReserveCount() external returns (uint256);
function getReserveAt(uint256 index) external returns (address);
function deviationRatio() external returns (uint256);
function getReserveTokenValue(address t) external returns (uint256);
function getReserveTokenBalance(address t) external returns (uint256);
function feePolicy() external returns (address);
}
6 changes: 6 additions & 0 deletions spot-vaults/contracts/_interfaces/external/ITranche.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
interface ITranche {
function bond() external view returns (address);
function totalSupply() external view returns (uint256);
}
2 changes: 0 additions & 2 deletions spot-vaults/contracts/_interfaces/external/IWAMPL.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
pragma solidity ^0.7.6;

interface IWAMPL {
function wrapperToUnderlying(uint256 wamples) external view returns (uint256);
}
16 changes: 16 additions & 0 deletions spot-vaults/contracts/_interfaces/types/CommonTypes_7x.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-3.0-or-later
// solhint-disable-next-line compiler-version
pragma solidity ^0.7.6;
pragma abicoder v2;

/// @notice A data structure to define a geometric Line with two points.
struct Line {
// @dev x-coordinate of the first point.
uint256 x1;
// @dev y-coordinate of the first point.
uint256 y1;
// @dev x-coordinate of the second point.
uint256 x2;
// @dev y-coordinate of the second point.
uint256 y2;
}
126 changes: 0 additions & 126 deletions spot-vaults/contracts/_strategies/SpotCDRPricer.sol

This file was deleted.

0 comments on commit 6792e2e

Please sign in to comment.