Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multicollateral Vault #6

Open
alcueca opened this issue Aug 10, 2021 · 0 comments
Open

Multicollateral Vault #6

alcueca opened this issue Aug 10, 2021 · 0 comments

Comments

@alcueca
Copy link
Owner

alcueca commented Aug 10, 2021

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.

@alcueca alcueca closed this as completed Aug 12, 2021
@alcueca alcueca reopened this Sep 8, 2021
@alcueca alcueca changed the title Collateralized Debt Engine Multicollateral Vault Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant