You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify the ETH/DAI Vault so that it accepts new collateral types with an administration function that takes as parameters the collateral token address and the chainlink aggregator address. To make things easier, use WETH instead of Ether.
For example, the admin could execute this function with the WBTC contract address and WBTC chainlink aggregator address, and from there the users could deposit WBTC to borrow DAI.
The only existing chainlink aggregator for DAI is ETH/DAI. For the purposes of this assignment use the USD aggregators as if they would be DAI aggregators. Be careful with the decimals, Chainlink uses 8 for */USD aggregators.
You will need to track deposits for each accepted denomination, using a nested mapping like mapping(address => mapping(address => uint256)) or similar. You will need to store the accepted denominations in an array or similar to be able to loop through them when calculating collateralization levels.
Install hardhat-gas-reporter to gas golf this one.
The text was updated successfully, but these errors were encountered:
Modify the ETH/DAI Vault so that it accepts new collateral types with an administration function that takes as parameters the collateral token address and the chainlink aggregator address. To make things easier, use WETH instead of Ether.
For example, the admin could execute this function with the WBTC contract address and WBTC chainlink aggregator address, and from there the users could deposit WBTC to borrow DAI.
The only existing chainlink aggregator for DAI is ETH/DAI. For the purposes of this assignment use the USD aggregators as if they would be DAI aggregators. Be careful with the decimals, Chainlink uses 8 for */USD aggregators.
You will need to track deposits for each accepted denomination, using a nested mapping like
mapping(address => mapping(address => uint256))
or similar. You will need to store the accepted denominations in an array or similar to be able to loop through them when calculating collateralization levels.Install hardhat-gas-reporter to gas golf this one.
The text was updated successfully, but these errors were encountered: