mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
eth pool basic logic setup
This commit is contained in:
parent
bc531a7aa7
commit
4cfe052bd4
|
@ -4,9 +4,26 @@ pragma solidity ^0.6.8;
|
||||||
contract EthRateLogic {
|
contract EthRateLogic {
|
||||||
address poolToken;
|
address poolToken;
|
||||||
|
|
||||||
|
function getCompoundNetAssetsInEth(address _dsa) private returns (uint _netBal) {
|
||||||
|
// Logics
|
||||||
|
// Take price from Compound's Oracle?
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCurveNetAssetsInEth(address _dsa) private returns (uint _netBal) {
|
||||||
|
// Logics
|
||||||
|
// Take price from ChainLink's Oracle?
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNetDsaAssets(address _dsa) private returns (uint _netBal) {
|
||||||
|
_netBal = _dsa.balance;
|
||||||
|
_netBal += getCompoundNetAssetsInEth(_dsa);
|
||||||
|
_netBal += getCurveNetAssetsInEth(_dsa);
|
||||||
|
}
|
||||||
|
|
||||||
function getTotalToken() public returns (uint) {
|
function getTotalToken() public returns (uint) {
|
||||||
uint bal = (address(this).balance);
|
address _dsa = 0x0000000000000000000000000000000000000000;
|
||||||
bal += (address(poolToken).balance);
|
uint bal = poolToken.balance;
|
||||||
|
bal += getNetDsaAssets(_dsa);
|
||||||
return bal;
|
return bal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user