dsa-polygon-migration/contracts/senders/aave-v2-migrator/variables.sol

108 lines
2.8 KiB
Solidity
Raw Normal View History

2021-04-07 23:45:00 +00:00
pragma solidity ^0.7.0;
import {
AaveLendingPoolProviderInterface,
AaveDataProviderInterface,
2021-04-11 14:11:11 +00:00
AaveOracleInterface,
2021-04-07 23:45:00 +00:00
StateSenderInterface,
2021-04-09 01:43:31 +00:00
IndexInterface,
2021-04-13 22:43:51 +00:00
FlashloanInterface,
RootChainManagerInterface
2021-04-07 23:45:00 +00:00
} from "./interfaces.sol";
contract Variables {
2021-04-16 16:24:14 +00:00
// Structs
2021-04-07 23:45:00 +00:00
struct AaveDataRaw {
address targetDsa;
uint[] supplyAmts;
uint[] variableBorrowAmts;
uint[] stableBorrowAmts;
address[] supplyTokens;
address[] borrowTokens;
}
struct AaveData {
address targetDsa;
uint[] supplyAmts;
uint[] borrowAmts;
address[] supplyTokens;
address[] borrowTokens;
}
2021-04-16 16:24:14 +00:00
// Constant Addresses //
2021-04-10 21:17:34 +00:00
2021-04-07 23:45:00 +00:00
/**
2021-04-16 16:24:14 +00:00
* @dev Aave referal code
*/
2021-04-07 23:45:00 +00:00
uint16 constant internal referralCode = 3228;
2021-04-16 16:24:14 +00:00
/**
* @dev Polygon Receiver contract
*/
2021-04-16 21:20:03 +00:00
address constant internal polygonReceiver = 0x4A090897f47993C2504144419751D6A91D79AbF4;
2021-04-16 16:24:14 +00:00
/**
* @dev Flashloan contract
*/
2021-04-16 21:20:03 +00:00
FlashloanInterface constant internal flashloanContract = FlashloanInterface(0xd7e8E6f5deCc5642B77a5dD0e445965B128a585D);
2021-04-16 16:24:14 +00:00
/**
* @dev ERC20 Predicate address
*/
2021-04-11 16:53:42 +00:00
address constant internal erc20Predicate = 0x40ec5B33f54e0E8A33A975908C5BA1c14e5BbbDf;
2021-04-07 23:45:00 +00:00
/**
* @dev Aave Provider
*/
AaveLendingPoolProviderInterface constant internal aaveProvider = AaveLendingPoolProviderInterface(0xB53C1a33016B2DC2fF3653530bfF1848a515c8c5);
/**
* @dev Aave Data Provider
*/
AaveDataProviderInterface constant internal aaveData = AaveDataProviderInterface(0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d);
2021-04-11 14:11:11 +00:00
/**
* @dev Aave Price Oracle
*/
AaveOracleInterface constant internal aaveOracle = AaveOracleInterface(0xA50ba011c48153De246E5192C8f9258A2ba79Ca9);
2021-04-07 23:45:00 +00:00
/**
* @dev Polygon State Sync Contract
*/
StateSenderInterface constant internal stateSender = StateSenderInterface(0x28e4F3a7f651294B9564800b2D01f35189A5bFbE);
2021-04-16 16:24:14 +00:00
/**
* @dev InstaIndex Address.
*/
2021-04-07 23:45:00 +00:00
IndexInterface public constant instaIndex = IndexInterface(0x2971AdFa57b20E5a416aE5a708A8655A9c74f723);
2021-04-11 16:53:42 +00:00
/**
2021-04-16 16:24:14 +00:00
* @dev Polygon deposit bridge
2021-04-11 16:53:42 +00:00
*/
RootChainManagerInterface public constant rootChainManager = RootChainManagerInterface(0xA0c68C638235ee32657e8f720a23ceC1bFc77C77);
2021-04-16 16:24:14 +00:00
// Storage variables //
/**
* @dev This will be used to have debt/collateral ratio always 20% less than liquidation
*/
2021-04-16 16:58:12 +00:00
uint public safeRatioGap = 800000000000000000; // 80%
2021-04-16 16:24:14 +00:00
/**
* @dev fee on collateral
*/
2021-04-16 16:57:18 +00:00
uint public fee = 998000000000000000; // 0.2% (99.8%) on collateral
2021-04-16 16:24:14 +00:00
/**
* @dev Mapping of supported token
*/
mapping(address => bool) public isSupportedToken;
/**
* @dev Array of supported token
*/
address[] public supportedTokens; // don't add ethAddr. Only add wethAddr
2021-04-13 22:43:51 +00:00
2021-04-07 23:45:00 +00:00
}