From 0fdddb24f8f27652f16a54e69efb04f38a1121ec Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:07:07 -0700
Subject: [PATCH 01/13] Add band page
---
docs/ecosystem/defi-liquidity/band-oracle.md | 21 ++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 docs/ecosystem/defi-liquidity/band-oracle.md
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
new file mode 100644
index 0000000000..19c26c065d
--- /dev/null
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -0,0 +1,21 @@
+---
+id: band-oracle
+title: Band Oracle on Flow
+description: Band Protocol provides decentralized oracle services on Flow, delivering real-time price feeds and data for DeFi applications.
+keywords:
+ - Band Oracle
+ - Band Protocol
+ - oracle
+ - price feeds
+ - data feeds
+ - DeFi
+ - Flow blockchain
+ - Flow Cadence
+ - smart contracts
+sidebar_position: 6
+sidebar_label: Band Oracle
+---
+
+# Band Oracle on Flow
+
+[Band Protocol](https://bandprotocol.com/) is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. Band Oracle on Flow provides secure, reliable, and decentralized price feeds for DeFi applications.
From f1af65a7247875d66a4e2ebfad23d99f8e75742e Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:16:09 -0700
Subject: [PATCH 02/13] Add table links
---
docs/ecosystem/defi-liquidity/defi-contracts.md | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/defi-contracts.md b/docs/ecosystem/defi-liquidity/defi-contracts.md
index 34b58ced78..9fd4efb924 100644
--- a/docs/ecosystem/defi-liquidity/defi-contracts.md
+++ b/docs/ecosystem/defi-liquidity/defi-contracts.md
@@ -102,17 +102,17 @@ Below is a list of commonly used DeFi contracts on Flow:
#### Flow Cadence Testnet
-| Contract Name | Flow Cadence Testnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) |
-| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
-| [PublicPriceOracle.cdc (IncrementFi)][31] | `0x8232ce4a3aff4e94` | |
-| [BandOracle.cdc (Band)][32] | `0x9fb6606c300b5051` | |
+| Contract Name | Flow Cadence Testnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Docs |
+| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
+| [PublicPriceOracle.cdc (IncrementFi)][31] | `0x8232ce4a3aff4e94` | | - |
+| [BandOracle.cdc (Band)][32] | `0x9fb6606c300b5051` | | [Docs][band-oracle-doc] |
#### Flow Cadence Mainnet
-| Contract Name | Flow Cadence Mainnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) |
-| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
-| [PublicPriceOracle.cdc (IncrementFi)][19] | `0xec67451f8a58216a` | |
-| [BandOracle.cdc (Band) Protocol][33] | `0x6801a6222ebf784a` | |
+| Contract Name | Flow Cadence Mainnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Docs |
+| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
+| [PublicPriceOracle.cdc (IncrementFi)][19] | `0xec67451f8a58216a` | | - |
+| [BandOracle.cdc (Band) Protocol][33] | `0x6801a6222ebf784a` | | [Docs][band-oracle-doc] |
## Ethereum Attestation Service
@@ -169,3 +169,4 @@ Mainnet EAS Explorer: [https://flow.easscan.credora.io] (https://flow.easscan.cr
[35]: https://docs.debridge.finance/dln-the-debridge-liquidity-network-protocol/deployed-contracts
[36]: https://relay.link/bridge
[37]: https://docs.relay.link/resources/contract-addresses
+[band-oracle-doc]: ./band-oracle
From 1ab1f210d8c3fceb41ddd3bfa3bfc9eb5002570d Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:17:37 -0700
Subject: [PATCH 03/13] Add docs
---
docs/ecosystem/defi-liquidity/band-oracle.md | 271 ++++++++++++++++++-
1 file changed, 269 insertions(+), 2 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 19c26c065d..8e29232eb1 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -16,6 +16,273 @@ sidebar_position: 6
sidebar_label: Band Oracle
---
-# Band Oracle on Flow
+# Band Oracle with Cadence
-[Band Protocol](https://bandprotocol.com/) is a cross-chain data oracle platform that aggregates and connects real-world data and APIs to smart contracts. Band Oracle on Flow provides secure, reliable, and decentralized price feeds for DeFi applications.
+The Band Protocol Oracle contract enables Flow blockchain applications to access real-time price data from the [Band Protocol Oracle network](https://faq.bandprotocol.com/). The oracle provides a comprehensive set of cryptocurrency and fiat currency price quotes from the Band Standard Dataset, making them available to any Cadence application, contract, or transaction.
+
+## Contract Addresses
+
+| Network | Address | Contract Browser |
+|---------|---------|------------------|
+| Testnet | `0x2c71de7af78d1adf` | [View Contract](https://contractbrowser.com/A.2c71de7af78d1adf.BandOracle) |
+| Mainnet | `0x9fb6606c300b5051` | [View Contract](https://contractbrowser.com/A.9fb6606c300b5051.BandOracle) |
+
+## Supported Symbols
+
+### Cryptocurrency Pairs (against USD)
+- **Major**: ETH, FLOW, USDC, USDT, WBTC, BNB, XRP, ADA, DOGE, POL (MATIC)
+- **Layer 1**: SOL, DOT, AVAX, ATOM, XLM, TRX, SUI
+- **DeFi**: AAVE, LINK, CRV, OP, UNI, SUSHI, CAKE, DYDX, 1INCH, BAT
+- **Others**: LTC, SHIB, DAI, FTM
+
+### Fiat Currency Pairs (against USD)
+- **Asian**: KRW, INR, HKD, TWD, THB, JPY, MYR, PHP, CNY, SGD
+- **European**: PLN, CZK, EUR, GBP, CHF, RUB, SEK, TRY
+- **Americas**: BRL, CAD
+- **Oceanic**: AUD, NZD
+
+## How It Works
+
+### Architecture
+
+The Band Oracle contract maintains a decentralized price feed system with three key components:
+
+1. **Data Storage**: Price data is stored in a contract-level dictionary `symbolsRefData: {String: RefData}` where each symbol maps to its latest price information.
+
+2. **Data Updates**: Authorized BandChain relayers continuously update price data from the Band Protocol network to keep prices current.
+
+3. **Data Access**: Any user or contract can query the latest price data through public functions, enabling real-time price integrations.
+
+### Data Structure
+
+Price data is stored using the `RefData` struct:
+
+```cadence
+pub struct RefData {
+ // USD-rate, multiplied by 1e9
+ pub var rate: UInt64
+ // UNIX epoch when data was last resolved
+ pub var timestamp: UInt64
+ // BandChain request identifier for this data
+ pub var requestID: UInt64
+}
+```
+
+When querying prices, you receive a `ReferenceData` struct:
+
+```cadence
+pub struct ReferenceData {
+ // Rate as integer multiplied by 1e18
+ pub var integerE18Rate: UInt256
+ // Rate as a fixed-point decimal
+ pub var fixedPointRate: UFix64
+ // Timestamp of base symbol data
+ pub var baseTimestamp: UInt64
+ // Timestamp of quote symbol data
+ pub var quoteTimestamp: UInt64
+}
+```
+
+### Data Normalization
+
+All price data is stored with a USD conversion rate. When you query for price conversions between two non-USD symbols, the contract derives the rate from their respective USD rates. For example, to get ETH/EUR, the contract calculates: `(ETH/USD) / (EUR/USD)`.
+
+## Features
+
+### Price Queries
+- Query any supported symbol pair in real-time
+- Get both integer (e18 precision) and fixed-point decimal rates
+- Access timestamp information to verify data freshness
+- Track BandChain request IDs for transparency
+
+### Fee Structure
+- Configurable fee system for oracle usage (currently set to zero)
+- Fee collected in FLOW tokens
+- Query current fee using `BandOracle.getFee()`
+
+### Event Monitoring
+The contract emits events to notify applications of updates:
+
+```cadence
+// Emitted when symbol prices are updated
+pub event BandOracleSymbolsUpdated(
+ symbols: [String],
+ relayerID: UInt64,
+ requestID: UInt64
+)
+
+// Emitted when a symbol is removed
+pub event BandOracleSymbolRemoved(symbol: String)
+```
+
+## Usage Guide
+
+### Basic Price Query (Transaction)
+
+To query price data from a transaction:
+
+```cadence
+import "BandOracle"
+import "FlowToken"
+import "FungibleToken"
+
+transaction(baseSymbol: String, quoteSymbol: String) {
+
+ let payment: @{FungibleToken.Vault}
+
+ prepare(acct: auth(BorrowValue) &Account) {
+ // Borrow reference to user's FLOW vault
+ let vaultRef = acct.storage.borrow(
+ from: /storage/flowTokenVault
+ ) ?? panic("Cannot borrow reference to signer's FLOW vault")
+
+ // Withdraw payment for oracle fee
+ self.payment <- vaultRef.withdraw(amount: BandOracle.getFee())
+ }
+
+ execute {
+ // Get reference data
+ let priceData = BandOracle.getReferenceData(
+ baseSymbol: baseSymbol,
+ quoteSymbol: quoteSymbol,
+ payment: <- self.payment
+ )
+
+ log("Rate (fixed-point): ".concat(priceData.fixedPointRate.toString()))
+ log("Rate (integer e18): ".concat(priceData.integerE18Rate.toString()))
+ log("Base timestamp: ".concat(priceData.baseTimestamp.toString()))
+ log("Quote timestamp: ".concat(priceData.quoteTimestamp.toString()))
+ }
+}
+```
+
+### Example: ETH/USD Price
+```cadence
+// Get ETH price in USD
+let priceData = BandOracle.getReferenceData(
+ baseSymbol: "ETH",
+ quoteSymbol: "USD",
+ payment: <- flowPayment
+)
+// priceData.fixedPointRate contains ETH price in USD
+```
+
+### Example: Cross-Currency Conversion
+```cadence
+// Get EUR price in JPY
+let priceData = BandOracle.getReferenceData(
+ baseSymbol: "EUR",
+ quoteSymbol: "JPY",
+ payment: <- flowPayment
+)
+// priceData.fixedPointRate contains EUR/JPY exchange rate
+```
+
+### Contract Integration
+
+Here's how to integrate the oracle into your smart contract:
+
+```cadence
+import "BandOracle"
+import "FlowToken"
+import "FungibleToken"
+
+pub contract MyDeFiContract {
+
+ // Store a vault to pay for oracle fees
+ access(self) let oracleFeeVault: @{FungibleToken.Vault}
+
+ pub fun getTokenPriceInUSD(tokenSymbol: String): UFix64 {
+ // Withdraw payment for oracle
+ let payment <- self.oracleFeeVault.withdraw(
+ amount: BandOracle.getFee()
+ )
+
+ // Query the oracle
+ let priceData = BandOracle.getReferenceData(
+ baseSymbol: tokenSymbol,
+ quoteSymbol: "USD",
+ payment: <- payment
+ )
+
+ return priceData.fixedPointRate
+ }
+
+ pub fun swapTokens(amount: UFix64, maxPrice: UFix64) {
+ // Get current price
+ let currentPrice = self.getTokenPriceInUSD(tokenSymbol: "ETH")
+
+ // Verify price is acceptable
+ if currentPrice > maxPrice {
+ panic("Price too high")
+ }
+
+ // Proceed with swap logic...
+ }
+
+ init() {
+ // Initialize vault for oracle fees
+ self.oracleFeeVault <- FlowToken.createEmptyVault(
+ vaultType: Type<@FlowToken.Vault>()
+ )
+ }
+}
+```
+
+## Best Practices
+
+### 1. Listen for Price Updates
+
+Monitor the `BandOracleSymbolsUpdated` event to keep your contract's stored prices up-to-date:
+
+```cadence
+// Listen for this event in your application
+pub event BandOracleSymbolsUpdated(
+ symbols: [String],
+ relayerID: UInt64,
+ requestID: UInt64
+)
+```
+
+When you detect an update for symbols your dapp uses, trigger a transaction to refresh your stored prices.
+
+
+## Advanced Features
+
+### Converting Between Number Formats
+
+The contract provides a utility function to convert between integer and fixed-point representations:
+
+```cadence
+// Convert e18 integer to fixed-point decimal
+let fixedPoint = BandOracle.e18ToFixedPoint(rate: integerE18Rate)
+```
+
+### Fee Management
+
+For contract administrators, the oracle supports dynamic fee configuration:
+
+```cadence
+// Query current fee
+let currentFee = BandOracle.getFee()
+
+// Fee can be updated by the fee collector (admin only)
+// feeCollector.setFee(fee: 0.001) // 0.001 FLOW per query
+```
+
+## Resources
+
+- [Band Protocol FAQ](https://faq.bandprotocol.com/)
+- [Band Standard Dataset](https://data.bandprotocol.com/)
+- [Flow Documentation](https://docs.onflow.org/)
+- [Cadence Language Reference](https://cadence-lang.org/)
+
+## Support
+
+For issues or questions about the Band Oracle on Flow:
+- Check the Band Protocol documentation
+- Engage with the Flow developer community
+
+---
+
+**Note**: The oracle currently charges no fees for usage, but this may change in the future. Always check `BandOracle.getFee()` before querying to ensure your contract has sufficient FLOW tokens allocated.
From 4f60eef733e2546beda09b1fdff63257004879e7 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:18:05 -0700
Subject: [PATCH 04/13] Remove
---
docs/ecosystem/defi-liquidity/band-oracle.md | 6 ------
1 file changed, 6 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 8e29232eb1..8fc395ab09 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -277,12 +277,6 @@ let currentFee = BandOracle.getFee()
- [Flow Documentation](https://docs.onflow.org/)
- [Cadence Language Reference](https://cadence-lang.org/)
-## Support
-
-For issues or questions about the Band Oracle on Flow:
-- Check the Band Protocol documentation
-- Engage with the Flow developer community
-
---
**Note**: The oracle currently charges no fees for usage, but this may change in the future. Always check `BandOracle.getFee()` before querying to ensure your contract has sufficient FLOW tokens allocated.
From fee6e122d95a70fc0c8bacacc344792cc2022a97 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:21:37 -0700
Subject: [PATCH 05/13] Fix links
---
docs/ecosystem/defi-liquidity/defi-contracts.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/defi-contracts.md b/docs/ecosystem/defi-liquidity/defi-contracts.md
index 9fd4efb924..4279b1a4f5 100644
--- a/docs/ecosystem/defi-liquidity/defi-contracts.md
+++ b/docs/ecosystem/defi-liquidity/defi-contracts.md
@@ -118,14 +118,14 @@ Below is a list of commonly used DeFi contracts on Flow:
More information can be found on the Credora docs site for [EAS on Flow](https://credora.gitbook.io/eas-for-flow).
-Testnet EAS Explorer: [https://flow-testnet.easscan.credora.io] (https://flow-testnet.easscan.credora.io)
+Testnet EAS Explorer: [https://flow-testnet.easscan.credora.io](https://flow-testnet.easscan.credora.io)
| Contract Name | Flow EVM Testnet Address |
| ------------------------------------------------------- | -------------------------------------------- |
| [SchemaRegistry.sol (Ethereum Attestation Service)][29] | `0x97900F59828Da4187607Cb8F84f49e3944199d18` |
| [EAS.sol (Ethereum Attestation Service)][30] | `0xBCF2dA8f82fb032A2474c92Ec5b70C95A83fc0cc` |
-Mainnet EAS Explorer: [https://flow.easscan.credora.io] (https://flow.easscan.credora.io)
+Mainnet EAS Explorer: [https://flow.easscan.credora.io](https://flow.easscan.credora.io)
| Contract Name | Flow EVM Mainnet Address |
| ------------------------------------------------------- | -------------------------------------------- |
From 9fabe148f1f38b1abe47d0a173de74b65f9298c0 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:22:02 -0700
Subject: [PATCH 06/13] Change link
---
docs/ecosystem/defi-liquidity/band-oracle.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 8fc395ab09..6e07bd84f9 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -24,8 +24,8 @@ The Band Protocol Oracle contract enables Flow blockchain applications to access
| Network | Address | Contract Browser |
|---------|---------|------------------|
-| Testnet | `0x2c71de7af78d1adf` | [View Contract](https://contractbrowser.com/A.2c71de7af78d1adf.BandOracle) |
-| Mainnet | `0x9fb6606c300b5051` | [View Contract](https://contractbrowser.com/A.9fb6606c300b5051.BandOracle) |
+| Testnet | `0x9fb6606c300b5051` | [View Contract](https://testnet.flowscan.io/contract/A.9fb6606c300b5051.BandOracle) |
+| Mainnet | `0x6801a6222ebf784a` | [View Contract](https://flowscan.io/contract/A.6801a6222ebf784a.BandOracle) |
## Supported Symbols
From cd79bcc3d5960abcbedff5cf2cc402d7089c0c57 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:22:37 -0700
Subject: [PATCH 07/13] CHange heading
---
docs/ecosystem/defi-liquidity/band-oracle.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 6e07bd84f9..4e06ef04fb 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -22,8 +22,8 @@ The Band Protocol Oracle contract enables Flow blockchain applications to access
## Contract Addresses
-| Network | Address | Contract Browser |
-|---------|---------|------------------|
+| Network | Address | Explorer |
+|---------|---------|----------|
| Testnet | `0x9fb6606c300b5051` | [View Contract](https://testnet.flowscan.io/contract/A.9fb6606c300b5051.BandOracle) |
| Mainnet | `0x6801a6222ebf784a` | [View Contract](https://flowscan.io/contract/A.6801a6222ebf784a.BandOracle) |
From 425a4daafc3208f95d99c86048b042c8a67b8cd8 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:23:42 -0700
Subject: [PATCH 08/13] Add DM link
---
docs/ecosystem/defi-liquidity/band-oracle.md | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 4e06ef04fb..31fa65d918 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -16,16 +16,18 @@ sidebar_position: 6
sidebar_label: Band Oracle
---
+import CopyButton from '@site/src/components/CopyButton';
+
# Band Oracle with Cadence
The Band Protocol Oracle contract enables Flow blockchain applications to access real-time price data from the [Band Protocol Oracle network](https://faq.bandprotocol.com/). The oracle provides a comprehensive set of cryptocurrency and fiat currency price quotes from the Band Standard Dataset, making them available to any Cadence application, contract, or transaction.
## Contract Addresses
-| Network | Address | Explorer |
-|---------|---------|----------|
-| Testnet | `0x9fb6606c300b5051` | [View Contract](https://testnet.flowscan.io/contract/A.9fb6606c300b5051.BandOracle) |
-| Mainnet | `0x6801a6222ebf784a` | [View Contract](https://flowscan.io/contract/A.6801a6222ebf784a.BandOracle) |
+| Network | Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Explorer |
+|---------|---------|----------|----------|
+| Testnet | `0x9fb6606c300b5051` | | [View Contract](https://testnet.flowscan.io/contract/A.9fb6606c300b5051.BandOracle) |
+| Mainnet | `0x6801a6222ebf784a` | | [View Contract](https://flowscan.io/contract/A.6801a6222ebf784a.BandOracle) |
## Supported Symbols
From 54a29b9cd42842dadf88ee1254d94706111595e4 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:25:37 -0700
Subject: [PATCH 09/13] Add increment fi docs
---
.../defi-liquidity/defi-contracts.md | 21 ++++++++++---------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/defi-contracts.md b/docs/ecosystem/defi-liquidity/defi-contracts.md
index 4279b1a4f5..781070851d 100644
--- a/docs/ecosystem/defi-liquidity/defi-contracts.md
+++ b/docs/ecosystem/defi-liquidity/defi-contracts.md
@@ -50,14 +50,14 @@ Below is a list of commonly used DeFi contracts on Flow:
#### Flow Cadence Mainnet
-| Contract Name | Flow Cadence Mainnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) |
-| ----------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
-| [SwapFactory.cdc (IncrementFi)][22] | `0xb063c16cac85dbd1` | |
-| [SwapPair (IncrementFi)][23] | `0xecbda466e7f191c7` | |
-| [SwapError (IncrementFi)][24] | `0xb78ef7afa52ff906` | |
-| [SwapInterfaces (IncrementFi)][25] | `0xb78ef7afa52ff906` | |
-| [SwapConfig (IncrementFi)][26] | `0xb78ef7afa52ff906` | |
-| [SwapRouter (IncrementFi)][27] | `0xa6850776a94e6551` | |
+| Contract Name | Flow Cadence Mainnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Docs |
+| ----------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
+| [SwapFactory.cdc (IncrementFi)][22] | `0xb063c16cac85dbd1` | | [Docs][incrementfi-doc] |
+| [SwapPair (IncrementFi)][23] | `0xecbda466e7f191c7` | | [Docs][incrementfi-doc] |
+| [SwapError (IncrementFi)][24] | `0xb78ef7afa52ff906` | | [Docs][incrementfi-doc] |
+| [SwapInterfaces (IncrementFi)][25] | `0xb78ef7afa52ff906` | | [Docs][incrementfi-doc] |
+| [SwapConfig (IncrementFi)][26] | `0xb78ef7afa52ff906` | | [Docs][incrementfi-doc] |
+| [SwapRouter (IncrementFi)][27] | `0xa6850776a94e6551` | | [Docs][incrementfi-doc] |
## Bridges & Cross-Chain Messaging
@@ -104,14 +104,14 @@ Below is a list of commonly used DeFi contracts on Flow:
| Contract Name | Flow Cadence Testnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Docs |
| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| [PublicPriceOracle.cdc (IncrementFi)][31] | `0x8232ce4a3aff4e94` | | - |
+| [PublicPriceOracle.cdc (IncrementFi)][31] | `0x8232ce4a3aff4e94` | | [Docs][incrementfi-doc] |
| [BandOracle.cdc (Band)][32] | `0x9fb6606c300b5051` | | [Docs][band-oracle-doc] |
#### Flow Cadence Mainnet
| Contract Name | Flow Cadence Mainnet Address | [CLI](https://developers.flow.com/build/tools/flow-cli/dependency-manager) | Docs |
| ----------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
-| [PublicPriceOracle.cdc (IncrementFi)][19] | `0xec67451f8a58216a` | | - |
+| [PublicPriceOracle.cdc (IncrementFi)][19] | `0xec67451f8a58216a` | | [Docs][incrementfi-doc] |
| [BandOracle.cdc (Band) Protocol][33] | `0x6801a6222ebf784a` | | [Docs][band-oracle-doc] |
## Ethereum Attestation Service
@@ -170,3 +170,4 @@ Mainnet EAS Explorer: [https://flow.easscan.credora.io](https://flow.easscan.cre
[36]: https://relay.link/bridge
[37]: https://docs.relay.link/resources/contract-addresses
[band-oracle-doc]: ./band-oracle
+[incrementfi-doc]: https://docs.increment.fi/
From 24e75b22a64d5e760924517d587b34da05091a5f Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:26:51 -0700
Subject: [PATCH 10/13] Add KP docs
---
.../defi-liquidity/defi-contracts.md | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/defi-contracts.md b/docs/ecosystem/defi-liquidity/defi-contracts.md
index 781070851d..7084fa2cab 100644
--- a/docs/ecosystem/defi-liquidity/defi-contracts.md
+++ b/docs/ecosystem/defi-liquidity/defi-contracts.md
@@ -38,15 +38,15 @@ Below is a list of commonly used DeFi contracts on Flow:
#### Flow EVM Mainnet
-| Contract Name | Flow EVM Mainnet Address |
-| -------------------------------------------- | -------------------------------------------- |
-| [StableKittyFactoryNG.sol (KittyPunch)][1] | `0x4412140D52C1F5834469a061927811Abb6026dB7` |
-| [TwoKittyFactory.sol (KittyPunch)][2] | `0xf0E48dC92f66E246244dd9F33b02f57b0E69fBa9` |
-| [TriKittyFactory.sol (KittyPunch)][3] | `0xebd098c60b1089f362AC9cfAd9134CBD29408226` |
-| [KittyRouterNgPoolsOnly.sol (KittyPunch)][4] | `0x87048a97526c4B66b71004927D24F61DEFcD6375` |
-| [PunchSwapV2Router02.sol (KittyPunch)][5] | `0xf45AFe28fd5519d5f8C1d4787a4D5f724C0eFa4d` |
-| [PunchSwapV2Factory.sol (KittyPunch)][6] | `0x29372c22459a4e373851798bFd6808e71EA34A71` |
-| [TrenchesTokensBuyer.sol (KittyPunch)][7] | `0x6D0e081Acc28eA9ee6b7fD293eC03F97147b026d` |
+| Contract Name | Flow EVM Mainnet Address | Docs |
+| -------------------------------------------- | -------------------------------------------- | --------------------- |
+| [StableKittyFactoryNG.sol (KittyPunch)][1] | `0x4412140D52C1F5834469a061927811Abb6026dB7` | [Docs][kittypunch-doc] |
+| [TwoKittyFactory.sol (KittyPunch)][2] | `0xf0E48dC92f66E246244dd9F33b02f57b0E69fBa9` | [Docs][kittypunch-doc] |
+| [TriKittyFactory.sol (KittyPunch)][3] | `0xebd098c60b1089f362AC9cfAd9134CBD29408226` | [Docs][kittypunch-doc] |
+| [KittyRouterNgPoolsOnly.sol (KittyPunch)][4] | `0x87048a97526c4B66b71004927D24F61DEFcD6375` | [Docs][kittypunch-doc] |
+| [PunchSwapV2Router02.sol (KittyPunch)][5] | `0xf45AFe28fd5519d5f8C1d4787a4D5f724C0eFa4d` | [Docs][kittypunch-doc] |
+| [PunchSwapV2Factory.sol (KittyPunch)][6] | `0x29372c22459a4e373851798bFd6808e71EA34A71` | [Docs][kittypunch-doc] |
+| [TrenchesTokensBuyer.sol (KittyPunch)][7] | `0x6D0e081Acc28eA9ee6b7fD293eC03F97147b026d` | [Docs][kittypunch-doc] |
#### Flow Cadence Mainnet
@@ -171,3 +171,4 @@ Mainnet EAS Explorer: [https://flow.easscan.credora.io](https://flow.easscan.cre
[37]: https://docs.relay.link/resources/contract-addresses
[band-oracle-doc]: ./band-oracle
[incrementfi-doc]: https://docs.increment.fi/
+[kittypunch-doc]: https://kittypunch.gitbook.io/kittypunch-docs
From 8f7c3d5fc031870c15cc874ef0f1f9da0cf1e974 Mon Sep 17 00:00:00 2001
From: Chase Fleming
Date: Fri, 10 Oct 2025 11:56:37 -0700
Subject: [PATCH 11/13] Update docs/ecosystem/defi-liquidity/band-oracle.md
Co-authored-by: Brian Doyle
---
docs/ecosystem/defi-liquidity/band-oracle.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 31fa65d918..a2d72288a5 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -246,7 +246,7 @@ pub event BandOracleSymbolsUpdated(
)
```
-When you detect an update for symbols your dapp uses, trigger a transaction to refresh your stored prices.
+When you detect an update for symbols your app uses, trigger a transaction to refresh your stored prices.
## Advanced Features
From fed27f502c4c5406c0964919679c18eeb1113ad7 Mon Sep 17 00:00:00 2001
From: Chase Fleming
Date: Fri, 10 Oct 2025 11:56:42 -0700
Subject: [PATCH 12/13] Update docs/ecosystem/defi-liquidity/band-oracle.md
Co-authored-by: Brian Doyle
---
docs/ecosystem/defi-liquidity/band-oracle.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index a2d72288a5..a37a337d6a 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -276,7 +276,6 @@ let currentFee = BandOracle.getFee()
- [Band Protocol FAQ](https://faq.bandprotocol.com/)
- [Band Standard Dataset](https://data.bandprotocol.com/)
-- [Flow Documentation](https://docs.onflow.org/)
- [Cadence Language Reference](https://cadence-lang.org/)
---
From 7e52ad045c2a697922dd5c5d83c07e1f0418d6d9 Mon Sep 17 00:00:00 2001
From: Chase Fleming <1666730+chasefleming@users.noreply.github.com>
Date: Fri, 10 Oct 2025 11:59:17 -0700
Subject: [PATCH 13/13] Update
---
docs/ecosystem/defi-liquidity/band-oracle.md | 30 ++++++++++----------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/docs/ecosystem/defi-liquidity/band-oracle.md b/docs/ecosystem/defi-liquidity/band-oracle.md
index 31fa65d918..4d2ef2200d 100644
--- a/docs/ecosystem/defi-liquidity/band-oracle.md
+++ b/docs/ecosystem/defi-liquidity/band-oracle.md
@@ -60,28 +60,28 @@ The Band Oracle contract maintains a decentralized price feed system with three
Price data is stored using the `RefData` struct:
```cadence
-pub struct RefData {
+access(all) struct RefData {
// USD-rate, multiplied by 1e9
- pub var rate: UInt64
+ access(all) var rate: UInt64
// UNIX epoch when data was last resolved
- pub var timestamp: UInt64
+ access(all) var timestamp: UInt64
// BandChain request identifier for this data
- pub var requestID: UInt64
+ access(all) var requestID: UInt64
}
```
When querying prices, you receive a `ReferenceData` struct:
```cadence
-pub struct ReferenceData {
+access(all) struct ReferenceData {
// Rate as integer multiplied by 1e18
- pub var integerE18Rate: UInt256
+ access(all) var integerE18Rate: UInt256
// Rate as a fixed-point decimal
- pub var fixedPointRate: UFix64
+ access(all) var fixedPointRate: UFix64
// Timestamp of base symbol data
- pub var baseTimestamp: UInt64
+ access(all) var baseTimestamp: UInt64
// Timestamp of quote symbol data
- pub var quoteTimestamp: UInt64
+ access(all) var quoteTimestamp: UInt64
}
```
@@ -107,14 +107,14 @@ The contract emits events to notify applications of updates:
```cadence
// Emitted when symbol prices are updated
-pub event BandOracleSymbolsUpdated(
+access(all) event BandOracleSymbolsUpdated(
symbols: [String],
relayerID: UInt64,
requestID: UInt64
)
// Emitted when a symbol is removed
-pub event BandOracleSymbolRemoved(symbol: String)
+access(all) event BandOracleSymbolRemoved(symbol: String)
```
## Usage Guide
@@ -189,12 +189,12 @@ import "BandOracle"
import "FlowToken"
import "FungibleToken"
-pub contract MyDeFiContract {
+access(all) contract MyDeFiContract {
// Store a vault to pay for oracle fees
access(self) let oracleFeeVault: @{FungibleToken.Vault}
- pub fun getTokenPriceInUSD(tokenSymbol: String): UFix64 {
+ access(all) fun getTokenPriceInUSD(tokenSymbol: String): UFix64 {
// Withdraw payment for oracle
let payment <- self.oracleFeeVault.withdraw(
amount: BandOracle.getFee()
@@ -210,7 +210,7 @@ pub contract MyDeFiContract {
return priceData.fixedPointRate
}
- pub fun swapTokens(amount: UFix64, maxPrice: UFix64) {
+ access(all) fun swapTokens(amount: UFix64, maxPrice: UFix64) {
// Get current price
let currentPrice = self.getTokenPriceInUSD(tokenSymbol: "ETH")
@@ -239,7 +239,7 @@ Monitor the `BandOracleSymbolsUpdated` event to keep your contract's stored pric
```cadence
// Listen for this event in your application
-pub event BandOracleSymbolsUpdated(
+access(all) event BandOracleSymbolsUpdated(
symbols: [String],
relayerID: UInt64,
requestID: UInt64