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. 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.
Since Conduits will likely require maintenance as their desired usage evolves, they will be upgradeable contracts, using upgradeable-proxy
for upgradeable logic. This is a non-transparent proxy contract that gives upgrade rights to the PauseProxy.
To run the tests, do the following:
forge test
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.
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
.
This code belongs to the MakerDAO community and the Copyright for the code belongs to the Dai Foundation.