Skip to content

Commit

Permalink
WIP: Ekubo options
Browse files Browse the repository at this point in the history
  • Loading branch information
Chepelau committed Oct 14, 2024
1 parent 213c915 commit 754cc73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/amm_core/constants.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const TOKEN_WBTC_ADDRESS: felt252 =
const TOKEN_STRK_ADDRESS: felt252 =
0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d; // mainnet

const TOKEN_EKUBO_ADDRESS: felt252 =
0x075afe6402ad5a5c20dd25e10ec3b3986acaa647b77e4ae24b0cbc9a54a27a87; // mainnet

// Tests --------------------------------------------------------------------------------------------------------------

#[cfg(test)]
Expand Down
10 changes: 9 additions & 1 deletion src/amm_core/oracles/pragma.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ mod Pragma {


use carmine_protocol::amm_core::constants::{
TOKEN_USDC_ADDRESS, TOKEN_ETH_ADDRESS, TOKEN_WBTC_ADDRESS, TOKEN_STRK_ADDRESS
TOKEN_USDC_ADDRESS, TOKEN_ETH_ADDRESS, TOKEN_WBTC_ADDRESS, TOKEN_STRK_ADDRESS,
TOKEN_EKUBO_ADDRESS
};

// Mainnet
Expand Down Expand Up @@ -66,6 +67,12 @@ mod Pragma {
} else {
0
}
} else if base_token_addr.into() == TOKEN_EKUBO_ADDRESS {
if quote_token_addr.into() == TOKEN_USDC_ADDRESS {
PragmaUtils::PRAGMA_EKUBO_USD_KEY
} else {
0
}
} else {
0
}
Expand Down Expand Up @@ -284,6 +291,7 @@ mod PragmaUtils {
const PRAGMA_XRP_USD_KEY: felt252 = 24860302295520068;
const PRAGMA_MATIC_USD_KEY: felt252 = 1425106761739050242884;
const PRAGMA_STRK_USD_KEY: felt252 = 6004514686061859652;
const PRAGMA_EKUBO_USD_KEY: felt252 = 1278253658919688033092;

// Stablecoins
const PRAGMA_USDT_USD_KEY: felt252 = 6148333044652921668;
Expand Down

0 comments on commit 754cc73

Please sign in to comment.