From 1d4844e219ec237c42075d2e91e2e73cbff654ad Mon Sep 17 00:00:00 2001 From: Samyak Jain <34437877+KaymasJain@users.noreply.github.com> Date: Thu, 10 Sep 2020 17:14:06 +1000 Subject: [PATCH] logics basic structure --- .../logics/{ => exchangeRate}/ethLogic.sol | 4 ++- contracts/logics/settle/eth/logicOne.sol | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) rename contracts/logics/{ => exchangeRate}/ethLogic.sol (92%) create mode 100644 contracts/logics/settle/eth/logicOne.sol diff --git a/contracts/logics/ethLogic.sol b/contracts/logics/exchangeRate/ethLogic.sol similarity index 92% rename from contracts/logics/ethLogic.sol rename to contracts/logics/exchangeRate/ethLogic.sol index c0b4c5b..0b4e273 100644 --- a/contracts/logics/ethLogic.sol +++ b/contracts/logics/exchangeRate/ethLogic.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.6.8; +import { DSMath } from "../../libs/safeMath.sol"; + contract EthRateLogic { address poolToken; @@ -35,5 +37,5 @@ contract EthRateLogic { poolToken = address(ethPool); } - receive() external payable {} + receive() external payable {} } \ No newline at end of file diff --git a/contracts/logics/settle/eth/logicOne.sol b/contracts/logics/settle/eth/logicOne.sol new file mode 100644 index 0000000..4524c2c --- /dev/null +++ b/contracts/logics/settle/eth/logicOne.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.6.8; + +import { DSMath } from "../../../libs/safeMath.sol"; + +contract LogicOne { + + address poolToken; + + function maxComp(uint amt) public { + // open cast function with flashloan and Compound connectors access + // check if status is safe and only have assets in the specific tokens + } + + function unwindCompToSafe(uint amt) public { + // Will only uniwnd till safe limit + // open cast function with flashloan and Compound connectors access + // check if status is safe and only have assets in the specific tokens + } + + function unwindMaxComp(uint amt) public { + // open cast function with flashloan and Compound connectors access + // check if status is safe and only have assets in the specific tokens + } + + constructor (address ethPool) public { + poolToken = address(ethPool); + } + + receive() external payable {} + +}