πŸͺ™
DIMO Token
🚧 Under Construction πŸ—
Deployed DIMO token:
The DIMO token follows the standard EIP-20 with some other extensions in order to improve security and access control to the contract functions:
  • ​Pausable functionality to pause and unpause token transfer.
  • ​AccessControl to manage access to specific functions. In the table below, all roles and the addresses associated with are described.
Role
Ethereum
Polygon
Addresses
DEFAULT_ADMIN_ROLE
​
βœ…
​
​
βœ…
​
​Foundation​
DEPOSITOR_ROLE
​
​
βœ…
​
​ChildChainManager​
MINTER_ROLE
​
βœ…
​
​
βœ…
​
BURNER_ROLE
​
βœ…
​
​
​Foundation​
PAUSER_ROLE
​
βœ…
​
​
βœ…
​
​Foundation​
UPGRADER_ROLE
​
βœ…
​
​
βœ…
​
​Foundation​
The token follows the UUPS upgradable pattern to allow changes and improvements in the future. It is worth to say that DIMO token is meant to be managed by a governance system that will have the ability to remove the upgradability from the contract if so decided. For now, the token is managed by the multi-signature wallet Gnosis Safe that belongs to the DIMO Foundation.

Bridge

The DIMO token was initially created in the Ethereum Mainnet. However, since the DIMO system lives in the Polygon network, we decided to also move the tokens to the same place. That said, a well known and established bridge was chosen: The Polygon Bridge, that employs a combination of smart contracts and a State Sync Mechanism to move tokens from Ethereum to Polygon and vice versa.
The following steps happen when a token holder bridges their tokens from Ethereum to Polygon:
  1. 1.
    Token holder approves MintableERC20PredicateProxy to spend their tokens.
  2. 2.
    Token holder executes a transaction to call the function depositFor.
    1. 1.
      Transfer the tokens to MintableERC20PredicateProxy contract to be locked.
    2. 2.
      The total supply on the Ethereum side does not change.
  3. 3.
    The contract ChildChainManager executes a transaction to call the function deposit in the DIMO token in the Polygon side.
    1. 1.
      This function mints the same amount of tokens for the same token holder address on the Polygon side.
    2. 2.
      The total supply in the Polygon side increases.
Similarly, the following steps happen to bridge the tokens back from Polygon to Ethereum:
  1. 1.
    The tokens are burned in the Polygon side, causing the total supply to decrease.
  2. 2.
    The tokens locked in the MintableERC20PredicateProxy contract are unlocked and transferred back to the token holder address.
  3. 3.
    In case new tokens are minted in the Polygon side, the MintableERC20PredicateProxy contract mints the equivalent amount in the Ethereum side.
Copy link