Page cover

🗺️Denom Mapper

Purpose and Functionality

The primary purpose of the Denom Mapper contract is to encapsulate the functionality responsible for converting between native tokens and their corresponding oracle identifiers. This contract acts as an abstraction layer, ensuring that other Yield Harbour contracts can interact with oracles without being exposed to oracle token representations.

Importance of Denom Mapping

In the context of decentralized finance (DeFi) protocols, tokens are often represented in different formats depending on the context. For example, the ukuji token may have a corresponding oracle identifier of "KUJI." By abstracting this mapping, the Denom Mapper contract allows other Yield Harbour contracts to seamlessly interact with oracles without concerning themselves with the specific token representations.

Mapping Mechanism

The Denom Mapper contract maintains a mapping between native tokens and their corresponding oracle identifiers. This mapping is stored on-chain and can be updated as needed.

Token Coverage and Management

Initially, the Denom Mapper contract will support mapping for the following tokens:

  • ukuji (native token) -> "KUJI" (oracle identifier)

Additional tokens can be added or removed from the mapping as required by the protocol's needs.

Data Storage and Retrieval

The token-to-oracle identifier mapping is stored on-chain, ensuring transparency and immutability.

Querying and Accessing Mappings

Other Yield Harbour contracts can query the Denom Mapper contract to retrieve the corresponding oracle identifier for a given native token. This process is abstracted away from the consuming contracts, allowing them to interact with oracles without needing to handle token representation conversions.

Upgrade and Migration Processes

The Denom Mapper contract is owned and managed by Yield Harbour, with upgrade and migration processes governed by the Kujira on-chain governance system.

Governance Summary

The Denom Mapper contract plays a crucial role in the Yield Harbour protocol by abstracting the conversion between native tokens and their corresponding oracle identifiers. This abstraction ensures that other Yield Harbour contracts can seamlessly interact with oracles without being exposed to the oracle token representations.

Initially, the contract will support mapping for the $KUJI token, with plans to include additional tokens as required by the protocol's needs. The token-to-oracle identifier mapping is stored on-chain, ensuring transparency and immutability.

The Denom Mapper contract will be open for usage by other Yield Harbour contracts, enabling them to interact with oracles without concerning themselves with token representation conversions.

The contract is owned and managed by Yield Harbour, with upgrade and migration processes governed by the Kujira on-chain governance system. Deploying this contract is a prerequisite for ensuring seamless interaction between Yield Harbour contracts and oracles, while also promoting code modularity and maintainability.

By implementing the Denom Mapper contract, Yield Harbour aims to establish a standardized and abstracted approach to handling token representations within its protocol, promoting code reusability, maintainability, and separation of concerns.

Last updated