System consists of two contracts:
- Insured - does all the heavy-lifting (talks to MakerDAO contracts, exchange, etc). Main target for bots.
- Authority - allows DSProxy to work with Insured. Users can continue to use CDP Portal.
When set up anyone can call save
and saveN
methods of Insured to repay endangered CDPs. Both take DSProxy
and CDP's id as arguments.
save(address target, bytes32 cup)
- withdraws ether, sells it, and repays debt. Will revert gracefully if has nothing to do (current collaterizatoin ratio aboveACTIVE
level);save(address target, bytes32 cup)
- similar tosave
, but continues to repay debt until transaction runs out of gas (transaction finishes successfully) or the CDP becomes safe. Consider setting gas limit manually (might consume several million gas).
- Deploy Insured
- Deploy Authority, use Insured address in constructor
- Assuming user has his DSProxy contract (created via CDP Portal). Initialize
DSProxy.setAuthority
with Authority's address.
Enjoy help from bots!
- Insured:
0xf3bc363b33f4f6efe9fff29257e2dbcdf500f77d
. Uses mock exchange for ETH/DAI pair. Send some Kovan-Dai to it. - Authority:
0x951b0913e4acb4e788cad7c82b171e3a4402e754
.
Bots could watch for LogSetAuthority events, emitted from DSProxy.setAuthority
cals.