Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makerdao/dss-conduits
https://github.com/makerdao/dss-conduits
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/makerdao/dss-conduits
- Owner: makerdao
- License: agpl-3.0
- Created: 2023-06-09T07:04:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-16T16:21:36.000Z (about 1 year ago)
- Last Synced: 2023-12-16T20:08:59.183Z (about 1 year ago)
- Language: Solidity
- Size: 958 KB
- Stars: 31
- Watchers: 5
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audits/cantinasec-dss-conduits.pdf
Awesome Lists containing this project
README
# `dss-conduits`
![Foundry CI](https://github.com/makerdao/dss-conduits/actions/workflows/ci.yml/badge.svg)
[![Foundry][foundry-badge]][foundry]
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://github.com/makerdao/dss-conduits/blob/master/LICENSE)[foundry]: https://getfoundry.sh/
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg## Overview
The Conduit is a smart contract that facilitates the deployment of funds to yield bearing strategies as part of the DSS Allocator System. The Conduit has a standard interface, defined in the `dss-allocator` repo [here](https://github.com/makerdao/dss-allocator/blob/dev/src/interfaces/IAllocatorConduit.sol). There are intended to be many Conduit implementations, each with a different use case. All Conduits can be found in the `src` directory.
For technical documentation and further information on specific Conduits, please see the [wiki](https://github.com/makerdao/dss-conduits/wiki).
## Upgradeability
Since Conduits will likely require maintenance as their desired usage evolves, they will be upgradeable contracts, using [`upgradeable-proxy`](https://github.com/marsfoundation/upgradeable-proxy) for upgradeable logic. This is a non-transparent proxy contract that gives upgrade rights to the PauseProxy.
## Testing
To run the tests, do the following:
```
forge test
```## Functionality
### `deposit`
The `deposit` function is used to move funds from a given `ilk`s `buffer` into the Conduit. From the Conduit, the funds can be deployed to a yield bearing strategy. This can happen atomically in the case of DeFi protocols, or can happen in a separate function call made by a permissioned actor in the case of Real World Asset strategies.
### `withdraw`
The `withdraw` function is used to move funds from the Conduit into a given `ilk`s `buffer`. This can pull funds atomically from a yield bearing strategy in the case of DeFi protocols, or can pull the funds directly from the Conduit in the case of a Real World Asset strategy where the permissioned actor has returned the funds manually. Both situations require that there is available liquidity, which is why `maxWithdraw` exists. This view function should report the maximum amount of `asset` that can be withdrawn for a given `ilk`.
## Disclaimer
This code belongs to the MakerDAO community and the Copyright for the code belongs to the Dai Foundation.
---