Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv-chauhan committed Jul 4, 2024
2 parents e475f21 + d5b857a commit c85d084
Show file tree
Hide file tree
Showing 147 changed files with 35,392 additions and 27 deletions.
96 changes: 95 additions & 1 deletion deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -5087,6 +5087,32 @@
}
}
},
"qidao-base": {
"network": "base",
"status": "prod",
"versions": {
"schema": "1.3.0",
"subgraph": "1.0.2",
"methodology": "1.0.1"
},
"files": {
"template": "qidao.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": false
},
"services": {
"hosted-service": {
"slug": "qidao-base",
"query-id": "qidao-base"
},
"decentralized-network": {
"slug": "qidao-base",
"query-id": "TODO"
}
}
},
"qidao-bsc": {
"network": "bsc",
"status": "prod",
Expand Down Expand Up @@ -6188,7 +6214,7 @@
"status": "prod",
"versions": {
"schema": "1.3.2",
"subgraph": "1.1.0",
"subgraph": "1.1.1",
"methodology": "1.0.0"
},
"files": {
Expand Down Expand Up @@ -11315,6 +11341,74 @@
}
}
},
"ring-few": {
"schema": "generic",
"base": "ring-few",
"protocol": "ring-few",
"project": "ring-few",
"deployments": {
"ring-few-blast": {
"network": "blast-mainnet",
"status": "prod",
"versions": {
"schema": "3.0.0",
"subgraph": "1.0.0",
"methodology": "1.0.0"
},
"files": {
"template": "ring.few.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": false
},
"services": {
"hosted-service": {
"slug": "ring-few-blast",
"query-id": "ring-few-blast"
},
"decentralized-network": {
"slug": "ring-few-blast",
"query-id": "TODO"
}
}
}
}
},
"cygnus-finance": {
"schema": "generic",
"base": "cygnus-finance",
"protocol": "cygnus-finance",
"project": "cygnus-finance",
"deployments": {
"cygnus-finance-base": {
"network": "base",
"status": "prod",
"versions": {
"schema": "3.0.0",
"subgraph": "1.0.0",
"methodology": "1.0.0"
},
"files": {
"template": "cygnus.finance.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": false
},
"services": {
"hosted-service": {
"slug": "cygnus-finance-base",
"query-id": "cygnus-finance-base"
},
"decentralized-network": {
"slug": "cygnus-finance-base",
"query-id": "TODO"
}
}
}
}
},
"symbiotic": {
"schema": "generic",
"base": "symbiotic",
Expand Down
3 changes: 3 additions & 0 deletions subgraphs/_reference_/src/prices/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as CELO from "../config/celo";
import * as FUSE from "../config/fuse";
import * as XDAI from "../config/gnosis";
import * as BLAST from "../config/blast";
import * as LINEA from "../config/linea";
import * as CRONOS from "../config/cronos";
import * as AURORA from "../config/aurora";
import * as FANTOM from "../config/fantom";
Expand Down Expand Up @@ -123,6 +124,8 @@ export function getConfig(): Configurations {
return new SCROLL.config();
} else if (network == ZKSYNC_ERA.NETWORK_STRING) {
return new ZKSYNC_ERA.config();
} else if (network == LINEA.NETWORK_STRING) {
return new LINEA.config();
}

return new TEMPLATE.config();
Expand Down
129 changes: 129 additions & 0 deletions subgraphs/_reference_/src/prices/config/linea.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import * as constants from "../common/constants";
import { Address, BigInt, ethereum } from "@graphprotocol/graph-ts";
import { Configurations, OracleConfig, OracleContract } from "../common/types";

export const NETWORK_STRING = "linea";

///////////////////////////////////////////////////////////////////////////
///////////////////// CALCULATIONS/ORACLE CONTRACT ////////////////////////
///////////////////////////////////////////////////////////////////////////

export const YEARN_LENS_CONTRACT_ADDRESS = new OracleContract();
export const CHAIN_LINK_CONTRACT_ADDRESS = new OracleContract();
export const AAVE_ORACLE_CONTRACT_ADDRESS = new OracleContract();
export const SUSHISWAP_CALCULATIONS_ADDRESS = new OracleContract();

///////////////////////////////////////////////////////////////////////////
///////////////////////////// CURVE CONTRACT //////////////////////////////
///////////////////////////////////////////////////////////////////////////

export const CURVE_CALCULATIONS_ADDRESS = new OracleContract();

export const CURVE_REGISTRY_ADDRESSES: OracleContract[] = [];

///////////////////////////////////////////////////////////////////////////
/////////////////////////// UNISWAP FORKS CONTRACT ////////////////////////
///////////////////////////////////////////////////////////////////////////

export const UNISWAP_FORKS_ROUTER_ADDRESSES: OracleContract[] = [
new OracleContract("0x8cfe327cec66d1c090dd72bd0ff11d690c33a2eb", 1440), // Pancakeswap v2 Router2
];

///////////////////////////////////////////////////////////////////////////
/////////////////////////// BLACKLISTED TOKENS ////////////////////////////
///////////////////////////////////////////////////////////////////////////

export const YEARN_LENS_BLACKLIST: Address[] = [];
export const AAVE_ORACLE_BLACKLIST: Address[] = [];
export const CURVE_CALCULATIONS_BLACKSLIST: Address[] = [];
export const SUSHI_CALCULATIONS_BLACKSLIST: Address[] = [];

///////////////////////////////////////////////////////////////////////////
//////////////////////////// HARDCODED STABLES ////////////////////////////
///////////////////////////////////////////////////////////////////////////

export const HARDCODED_STABLES: Address[] = [];

///////////////////////////////////////////////////////////////////////////
///////////////////////////////// HELPERS /////////////////////////////////
///////////////////////////////////////////////////////////////////////////

export const USDC_TOKEN_DECIMALS = BigInt.fromI32(6);

export const ETH_ADDRESS = constants.NULL.TYPE_ADDRESS;
export const WETH_ADDRESS = Address.fromString(
"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f"
);
export const USDC_ADDRESS = Address.fromString(
"0x176211869ca2b568f2a7d4ee941e073a821ee1ff"
);

export class config implements Configurations {
network(): string {
return NETWORK_STRING;
}

yearnLens(): OracleContract {
return YEARN_LENS_CONTRACT_ADDRESS;
}
chainLink(): OracleContract {
return CHAIN_LINK_CONTRACT_ADDRESS;
}
yearnLensBlacklist(): Address[] {
return YEARN_LENS_BLACKLIST;
}

aaveOracle(): OracleContract {
return AAVE_ORACLE_CONTRACT_ADDRESS;
}
aaveOracleBlacklist(): Address[] {
return AAVE_ORACLE_BLACKLIST;
}

curveCalculations(): OracleContract {
return CURVE_CALCULATIONS_ADDRESS;
}
curveCalculationsBlacklist(): Address[] {
return CURVE_CALCULATIONS_BLACKSLIST;
}

sushiCalculations(): OracleContract {
return SUSHISWAP_CALCULATIONS_ADDRESS;
}
sushiCalculationsBlacklist(): Address[] {
return SUSHI_CALCULATIONS_BLACKSLIST;
}

uniswapForks(): OracleContract[] {
return UNISWAP_FORKS_ROUTER_ADDRESSES;
}
curveRegistry(): OracleContract[] {
return CURVE_REGISTRY_ADDRESSES;
}

hardcodedStables(): Address[] {
return HARDCODED_STABLES;
}

ethAddress(): Address {
return ETH_ADDRESS;
}
wethAddress(): Address {
return WETH_ADDRESS;
}
usdcAddress(): Address {
return USDC_ADDRESS;
}

usdcTokenDecimals(): BigInt {
return USDC_TOKEN_DECIMALS;
}

getOracleOverride(
tokenAddr: Address | null,
block: ethereum.Block | null
): OracleConfig | null {
return null;
}
}
27 changes: 27 additions & 0 deletions subgraphs/cygnus-finance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Cygnus Finance Subgraph

## Methodology v1.0.0

Cygnus Finance is a RWA stablecoin protocol built on pure, short-term U.S. debt assets. It is also the first native interest-bearing stablecoin protocol and the first native RWA protocol on Base.

Each lending pool represents a pair of 2 tokens of a DEX. Lenders can supply tokens to any lending pool to earn passive yield without impermanent loss. Borrowers can deposit LP tokens in a lending pool to borrow tokens of the token pair. This enables borrowers to leverage their LP tokens and get even more LP tokens, allowing for leveraged yield farming and enhanced LP rewards.

## Metrics

### Usage and Transactions

Following activities count towards usage and transactions of the protocol,

- Minting and staking cgUSD shares
- Depositing and withdrawing cgUSD shares

### TVL

TVL of a market is the value of staked cgUSD tokens.

## Useful Links

- Landing Page: https://www.cygnus.finance/
- Lending App: https://app.cygnus.finance/mint
- Docs: https://wiki.cygnus.finance/
- Contracts: https://github.com/arks-labs/cygnus-contracts-public
Loading

0 comments on commit c85d084

Please sign in to comment.