Contracts

The DAM Finance core contracts implement an over-collateralised stablecoin protocol which draws inspitation from MakerDAO. The DAM codebase is based upon the MakerDAO codebase and we have made changes were necessary to facilitate our requirements. Keys changes we have made are:

  1. Omni-chain credit token d2o is issued as an omni-chain stablecoin, meaning that it can be transferred to blockchains other than the one it originated on.

  2. Linked Multi-collateral vault Allows users to pool all their collateral in a single vault instead of having a vault for each type of collateral. The impact of this is that users can take advantage of collateral which may not be suitable for minting an over-collateralised stablecoin in isolation. This also means that each vault has a unique weighted average liquidation LTV based upon the LTV for each of the constituent tokens making up the vault collateral.

  3. Leverage Users can re-deposit d2o (or d2os) back into their vaults to mint more d2o. The protocol understands that this is a leveraged token and as such affects the way the weighted average LTV is calculated for the vault. Using a leveraged token as collateral allows the minting of more d2o but changes in value of the underlying collateral (i.e. not the d2os) have a greater impact on the portfolio value of the vault, due to its leveraged nature. There is a protocol-wide leverage cap set by the lockedAmountLimit for d2os in LMCV.sol. This value will occasionally need updating so that protocol-wide leverage is capped at 2x.

  4. Minting fee We have added the capability to charge a minting fee when d2o is minted.

  5. Peg stability module Users can deposit certain stablecoins in the peg stability module which allows them to mint d2o 1:1 or at a near 1:1 ratio. Clearly, if a user needs to re-collateralise their vault then depositing stablecoins is the most effective way to do that.

  6. Staking contract To incentivise secondary market liquidity for d2o we intend to create a staking contract for holders of d2os, i.e. those who have deposited their d2o into a stableswap pool. Rewards will accrue to those participating in the DAM staking contract.

LMCV

The LMCV, or linked multi-collateral vault, is the main accounting system for the protocol. The LMCV has the following functionality:

  • Keeps track of how much collateral each user has deposited with the platform.

  • Keeps track of how much collateral each user has committed to a vault. Collateral committed to a vault can be borrowed against.

  • Keeps track of the debt balance / d2o issued to each user.

  • Stores an accumulated stability rate to keep track of how much interest is payable on issued d2o.

  • Handles the main operating variables for the protocol such as debt ceiling, fees and leverage ratios on a per collateral basis.

  • Provides an API for checking whether a user is within their credit limit.

  • Provides an API for liquidations, as well as minting unbacked d2o or burning issued d2o.

  • Provides an API for moving unlocked collateral or d2o between accounts.

  • Provides an admin interface for editing collateral types or and collateral information.

Peg Stability Module

Based upon the Peg Sability Module from Maker DAO. The Peg Stability Module in the DAM protocol allows users to swap stablecoin collateral type directly for d2o at a fixed rate, rather than borrowing it. This is the mechanism we use for minting d2o.

The deployed code for the LMCV and PSM can be found here.

Deployed Contracts

Ethereum

d2o

0x2FdA8c6783Aa36BeD645baD28a4cDC8769dCD252

https://etherscan.io/address/0x2FdA8c6783Aa36BeD645baD28a4cDC8769dCD252#code

d2oJoin

0x687007C510Cd174f815cdaDA4De51d66BA73544d

https://etherscan.io/address/0x687007C510Cd174f815cdaDA4De51d66BA73544d#code

USDCJoin

0xB1fbcD7415F9177F5EBD3d9700eD5F15B476a5Fe

https://etherscan.io/address/0xB1fbcD7415F9177F5EBD3d9700eD5F15B476a5Fe#code

LayerZeroPipe

0x78D7480aFcB1c2310917fDa95e96cA4E1C06CcfF

https://etherscan.io/address/0x78D7480aFcB1c2310917fDa95e96cA4E1C06CcfF#code

LMCV

0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF

https://etherscan.io/address/0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF#code

LMCVProxy

0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53

https://etherscan.io/address/0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53#code

PSM

0x68a8a1c3e103d9b8e568b061357ec2eae87bf396

https://etherscan.io/address/0x68a8a1c3e103d9b8e568b061357ec2eae87bf396#code

Guardian

0x2d61a890c47124597173fa9f6f949c5b4cdd0756

https://etherscan.io/address/0x2d61a890c47124597173fa9f6f949c5b4cdd0756

HyperlanePipe

0x20Df9e3cE5390C13747119cA353a932131CD1363

https://etherscan.io/address/0x20Df9e3cE5390C13747119cA353a932131CD1363

MultisigIsm

0x7CD5f5ab54f30F9a69Aed10c123683FDeD5d179e

https://etherscan.io/address/0x7CD5f5ab54f30F9a69Aed10c123683FDeD5d179e

InterchainGasPaymaster

0x5c808421b8D6c048888a95C01724F996a436fD4D

https://etherscan.io/address/0x5c808421b8D6c048888a95C01724F996a436fD4D

StorageGasOracle

0xB25040907bD1Ca26b9492A90b314C48741887Ddb

https://etherscan.io/address/0xB25040907bD1Ca26b9492A90b314C48741887Ddb

Moonbeam

d2O

0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF

https://moonscan.io/address/0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF#code

LayerZeroPipe

0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53

https://moonscan.io/address/0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53#code

Guardian

0x2d61a890C47124597173fa9f6f949C5b4Cdd0756

https://moonscan.io/address/0x2d61a890C47124597173fa9f6f949C5b4Cdd0756

Astar

d2o

0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF

https://blockscout.com/astar/address/0xc806B0600cbAfA0B197562a9F7e3B9856866E9bF/contracts

d2oGuardian

0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53

https://blockscout.com/astar/address/0xDd92aF2acb2Dd66Abe5C2023c7D446989DF0af53/contracts

DefaultProxyAdmin

0x2FdA8c6783Aa36BeD645baD28a4cDC8769dCD252

https://blockscout.com/astar/address/0x2FdA8c6783Aa36BeD645baD28a4cDC8769dCD252/contracts

InterchainGasPaymaster_Implementation

0xb70b00a68e032ebFf1775Db1491550967F7E092C

https://blockscout.com/astar/address/0xb70b00a68e032ebFf1775Db1491550967F7E092C/contracts

InterchainGasPaymaster_Proxy

0x687007C510Cd174f815cdaDA4De51d66BA73544d

https://astar.subscan.io/account/0x687007C510Cd174f815cdaDA4De51d66BA73544d

MultisigIsm

0xB1fbcD7415F9177F5EBD3d9700eD5F15B476a5Fe

https://blockscout.com/astar/address/0xB1fbcD7415F9177F5EBD3d9700eD5F15B476a5Fe/contracts

Mailbox_Implementation

0xceE15Ca9fF2dA87080b34ca922AB8C195aD6D6EB

https://blockscout.com/astar/address/0xceE15Ca9fF2dA87080b34ca922AB8C195aD6D6EB/contracts

Mailbox_Proxy

0x6C120D87F87E931c762339fa8aD94f48c8174824

https://astar.subscan.io/account/0x6C120D87F87E931c762339fa8aD94f48c8174824

HyperlanePipe

0x8Dd69AF27489EE88CB1be4dF760FA36d6fA45AB4

https://blockscout.com/astar/address/0x8Dd69AF27489EE88CB1be4dF760FA36d6fA45AB4/contracts

ValidatorAnnounce

0x05533EA9B9F37daA890512d8a2DD5b853620819e

https://blockscout.com/astar/address/0x05533EA9B9F37daA890512d8a2DD5b853620819e/contracts

StorageGasOracle

0xcA1d6a964dfe209e8fB33614b0EFFdA9723232D7

https://blockscout.com/astar/address/0xcA1d6a964dfe209e8fB33614b0EFFdA9723232D7/contracts

DAM Finance V1.

Whilst the core contracts allow for functionality such as multiple collateral types and leverage, for the first version of DAM, we are simply using the core contracts as an accounting system to mint d2o. The advantage of this approach is that we can easily add lending funcationality by changing a few configuration options within the main contracts.

Last updated