Collateral Module
Adapters and Auction contracts for each specific collateral type
- Module Name: Collateral Module
- Type/Category: DSS —> Join.sol & Flip.sol
The collateral module is deployed for every new
ilk
(collateral type) added to Vat
. It contains all the adapters and auction contracts for one specific collateral type.The Collateral Module has 2 core components consisting of the
Join
and Flip
contracts.Join
- adapters that are used to deposit/withdraw unlocked collateral into theVat
. Join contains three smart contracts:- 1.
GemJoin
- 2.
ETHJoin
- 3.
dotBTCJoin
.
Each of thejoin
contracts are specifically used for the given token type to bejoin
'ed to thevat
. Due to this fact, eachjoin
contract has slightly different logic to account for the different types of tokens within the system.Flipper
- collateral Auctions are used to sell collateral from Vaults that have become undercollateralized in order to preserve the collateralization of the system. TheCat
sends bitten collateral to the Flip module to be auctioned off to Keepers. The collateral auction has two phases:tend
anddent
. See the Gotchas section of the Flipper's documentation for more on thetend
anddent
auction phases.
Join
- the purpose of join adapters is to retain the security of the system, allowing only trusted smart contracts to add/remove value to/from theVat
. The location of collateral deposited/locked in Vaults is in the respective Join adapter.Flipper
- the purpose of collateral auctions is to decrease the market risk of collateral that is backing dotBTC. The main priorities of the Flipper are:- To cover the amount of total debt (minted dotBTC+ accrued fees) of the Vault.
- To return as much collateral back to the Vault owner as possible.
- When a user desires to enter the system and interact with the
dss
contracts, they must use one of thejoin
contracts. - If there was a contract bug in a
join
contract and a user was to calljoin
by accident, they can still retrieve their tokens back through the correspondingexit
call on the givenjoin
contract.
There could potentially be a
vat
upgrade that would require new join
contracts to be createdIf a
gem
contract were to go through a token upgrade or have the tokens frozen while a user's collateral was in the system, there could potentially be a scenario in which the users were unable to redeem their collateral after the freeze or upgrade was finished. This seems to be a small risk though because it would seem likely that the token going through this upgrade would want to work alongside the ABM community to be sure this was not an issue.Potential Phishing Attacks
As the MCD system evolves, we will see many more
join
contracts, user interfaces, etc. This surfaces the potential for a user to have their funds stolen by a malicious join
contract which would send tokens to an external contract or wallet, instead of the vat
.Last modified 2yr ago