-
Notifications
You must be signed in to change notification settings - Fork 91
24. Smart Contracts
Below you will find a brief descriptive overview for each of the primary smart contracts in Ubiquity's collateralized dollar protocol, along with hyperlinks to their source code on Github.
Main protocol contract that follows ERC-2535 diamond proxy pattern.
Set of contracts that are part of the Diamond. Facet contracts must always be called via the Diamond proxy contract.
Responsible for managing protocol roles.
Allows editing Diamond contract facets and methods.
Allows to inspect available methods in the Diamond. Really useful for 3rd party services that are able to work with ERC-2535
proxies like https://louper.dev. Notice that https://etherscan.io doesn't support working with Diamond proxies yet.
Sets core protocol parameters.
Sets protocol owner.
Allows users to:
- deposit collateral in exchange for Ubiquity Dollars
- redeem Ubiquity Dollars in exchange for the earlier provided collateral
USD-pegged token for the Ubiquity protocol.
Ubiquity protocol governance token (UBQ
).
Governance token manager contract.
Deprecated contract for bonding deposits, withdrawals and minting. See BondingV2
for the upgraded contract.
Ubiquity Dollar's Bonding contract, which handles staking deposits, withdrawals, and minting. Also allows the BondingManager to take emergency action in raising or lowering the price of uAD by removing uAD or 3CRV LP tokens from the pool, respectively (see functions addLiquidity and removeLiquidity).
The BondingManager has unilateral access to the bonding contract's minting and pool adjustment functions. This permissioned wallet is currently operated by the development team, as per the initial DAO governance operations period. This will be changed following the DAO's continued governance rollout, and manual utilization of these functions using the manager address will only take play via governance votes.
Also contains disabled functions used for the migration from the bonding v1 contract to the v2 contract (see Bonding v2 Upgrade for more).
Constructs the ERC1155Ubiquity contract.
The upgraded contract for handling a user's persistent bonding share NFT, which stores the user's history of interactions with the bonding contract.
Deprecated contract used for UBQ rewards. See MasterChefV2.1 for the upgraded contract.
Contains an error which miscalculates the pending rewards. Its use has been deprecated.
Calculates and distributes UBQ rewards to LP token pool stakers based on a deposit time length-based multiplier. The upgraded contract contains logic which handles the persistent bonding share NFT.
[gnosis]
Without stability we have nothing. © 2023 Ubiquity DAO.