UWU Protocol
  • 👋Welcome to UWU Protocol
  • 🎆Stablecoins are Broken
  • UWU Protocol
    • 📖Overview
    • 🏛️Borrowing
    • 🔁Liquidations
  • Protocol Tokens
    • 💲UWU Cash (UWU)
  • Optional Services
    • 💱Stability Module
    • 💾Smart Vaults
    • 🔀UWU Swap
    • 🛡️UWU Guardian
  • Developers
    • 🧰Contracts API
      • uwu-factory-v1-1-0
      • uwu-oracle-proxy-v1-1-0
      • uwu-oracle-v1-1-3
      • xuwu-fee-claim-v1-1-0
      • uwu-token-v1-1-0
    • 📋Deployed Contracts
    • 🤖Microservices
  • Resources
    • ❔FAQ
    • 🎴Scorecard
    • 🔓Risk Disclosure
    • 📘Terminology
Powered by GitBook
On this page
  • Smart Contracts
  • Units
  • Error Codes
  • Upgradability
  • Versioning
  • License

Was this helpful?

  1. Developers

Contracts API

PreviousUWU GuardianNextuwu-factory-v1-1-0

Last updated 11 months ago

Was this helpful?

Smart Contracts

Documentation for the sip-010-trait-ft-standard contract is not provided, as it's a standard implementation of the well-documented

  • The core contract managing Vaults and the minting and burning of UWU

  • The proxy contract for managing STX price data from an authorized oracle

  • The contract responsible for providing STX price data

  • The contract managing fees generated by the protocol

  • The contract for the SIP-010 compliant UWU fungible token

Units

All unit values passed or returned by methods use 6 decimal places. For example, 1 UWU is expressed as u1000000.

Error Codes

Code

Error

Description

1001

ERR_NOT_AUTHORIZED

The specified principal is not authorized

1002

ERR_INVALID_AMOUNT

The amount parameter is invalid

2001

ERR_VAULT_NOT_FOUND

The specified Vault was not found

2002

ERR_VAULT_LIMIT

The specified principal has reached the maximum limit of 20 Vaults per principal at any given time

2003

ERR_VAULT_NOT_LIQUIDATED

The specified Vault is not liquidated

2004

ERR_VAULT_LIQUIDATED

The specified Vault is liquidated

3001

ERR_MINIMUM_DEBT

The specified Vault is below the minimum amount of debt

3002

ERR_MAXIMUM_DEBT

The specified Vault has the maximum amount of debt

3003

ERR_NONZERO_DEBT

The specified Vault has non-zero debt

3004

ERR_ZERO_DEBT

The specified Vault has zero debt

4001

ERR_PROXY_FROZEN

The oracle proxy is frozen

Upgradability

UWU Protocol is designed with a strong emphasis on immutability and non-upgradability for the majority of its components. The CONTRACT_OWNER is a constant, representing the principal authorized to make specific parameter changes within the contracts it is defined in.

The CONTRACT_OWNER is specified in two contracts:

Its purpose is to allow for modifications to the oracle used and token metadata, with the latter not affecting the protocol itself as it pertains to off-chain information related to the protocol's tokens.

Due to the current lack of decentralized oracle providers on Stacks, UWU Protocol is temporarily relying on a trust-minimized oracle. This is the reason behind the upgradability of the oracle proxy. Once upgraded to a decentralized oracle provider, the oracle proxy will be permanently frozen.

The CONTRACT_OWNER cannot modify the core functionalities of other contracts, such as uwu-factory-v1-1-0. All other contracts are immutable and non-upgradable.

Versioning

The versioning for UWU Protocol follows a three-digit structure (X.Y.Z), where:

  • First digit (X): Represents a major change that requires redeployment of non-proxy contracts. Upgrading to a new major version implies a completely new system, operating separately from the previous one. Users can still interact with the previous release, even when a new major version is deployed

  • Second digit (Y): Represents a minor change that also requires redeployment of non-proxy contracts. Similar to a major change, this update results in a new version of the system operating separately from the previous one

  • Third digit (Z): Represents a minor change that does not require redeployment of core contracts. These updates may include changes such as a new oracle contract or the addition of new contracts that are optional and do not necessitate redeployment of core contracts

License

The contracts used in UWU Protocol are licensed under the GNU General Public License v3.0 (GPLv3). For more information on the license terms and conditions, please refer to the .

🧰
SIP-010 Fungible Token Standard
uwu-factory-v1-1-0:
uwu-oracle-proxy-v1-1-0:
uwu-oracle-v1-1-3:
xuwu-fee-claim-v1-1-0:
uwu-token-v1-1-0:
uwu-oracle-proxy-v1-1-0
uwu-token-v1-1-0
GNU General Public License v3.0