Skip to content

Commit

Permalink
add karak subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv-chauhan committed Jun 17, 2024
1 parent 1b47606 commit cbbee27
Show file tree
Hide file tree
Showing 78 changed files with 13,742 additions and 0 deletions.
86 changes: 86 additions & 0 deletions deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -10790,5 +10790,91 @@
}
}
}
},
"karak": {
"schema": "generic",
"base": "karak",
"protocol": "karak",
"project": "karak",
"deployments": {
"karak-ethereum": {
"network": "ethereum",
"status": "prod",
"versions": {
"schema": "2.1.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
},
"files": {
"template": "karak.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": true
},
"services": {
"hosted-service": {
"slug": "karak-ethereum",
"query-id": "karak-ethereum"
},
"decentralized-network": {
"slug": "karak-ethereum",
"query-id": "todo"
}
}
},
"karak-arbitrum": {
"network": "arbitrum",
"status": "prod",
"versions": {
"schema": "2.1.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
},
"files": {
"template": "karak.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": true
},
"services": {
"hosted-service": {
"slug": "karak-arbitrum",
"query-id": "karak-arbitrum"
},
"decentralized-network": {
"slug": "karak-arbitrum",
"query-id": "todo"
}
}
},
"karak-bsc": {
"network": "bsc",
"status": "prod",
"versions": {
"schema": "2.1.1",
"subgraph": "1.0.0",
"methodology": "1.0.0"
},
"files": {
"template": "karak.template.yaml"
},
"options": {
"prepare:yaml": true,
"prepare:constants": true
},
"services": {
"hosted-service": {
"slug": "karak-bsc",
"query-id": "karak-bsc"
},
"decentralized-network": {
"slug": "karak-bsc",
"query-id": "todo"
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions subgraphs/karak/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
configure.ts
docs/
package-lock.json
34 changes: 34 additions & 0 deletions subgraphs/karak/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Karak Subgraph

## Methodology v1.0.0

Karak operates as a marketplace where,

- users repurpose their staked assets to extend Ethereum as well as other trust networks' security to other applications
- developers get to incentivize validators to allocate their restaked assets to secure their secured services instead of issuing their own highly inflationary tokens as rewards for validators and having to establish a new trust network from the ground up

Karak introduces multiasset restaking, a new primitive in cryptoeconomic security allowing users to restake assets such as ethereum, liquid staking tokens, stablecoins, and more preventing a single asset's failure and to earn rewards.

![overview](image.png)

## Metrics

### Usage and Transactions

- Deposits into ERC4626 vault to restake
- Withdrawals from the vault to unstake (there is a delay of 7 days since requesting withdrawal to receiving)

### TVL

Total assets in all of Karak's vaults.

### Fees and Revenue

The protocol does not charge a fee or generate any revenue at the moment.

## Useful Links

- Landing Page: https://karak.network/
- Staking App: https://app.karak.network/
- Docs: https://docs.karak.network/karak
- Contracts: https://docs.karak.network/karak/developers/contract-addresses
159 changes: 159 additions & 0 deletions subgraphs/karak/abis/Prices/AaveOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
[
{
"inputs": [
{
"internalType": "contract IPoolAddressesProvider",
"name": "provider",
"type": "address"
},
{ "internalType": "address[]", "name": "assets", "type": "address[]" },
{ "internalType": "address[]", "name": "sources", "type": "address[]" },
{
"internalType": "address",
"name": "fallbackOracle",
"type": "address"
},
{ "internalType": "address", "name": "baseCurrency", "type": "address" },
{
"internalType": "uint256",
"name": "baseCurrencyUnit",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "source",
"type": "address"
}
],
"name": "AssetSourceUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "baseCurrency",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "baseCurrencyUnit",
"type": "uint256"
}
],
"name": "BaseCurrencySet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "fallbackOracle",
"type": "address"
}
],
"name": "FallbackOracleUpdated",
"type": "event"
},
{
"inputs": [],
"name": "ADDRESSES_PROVIDER",
"outputs": [
{
"internalType": "contract IPoolAddressesProvider",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "BASE_CURRENCY",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "BASE_CURRENCY_UNIT",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "asset", "type": "address" }
],
"name": "getAssetPrice",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address[]", "name": "assets", "type": "address[]" }
],
"name": "getAssetsPrices",
"outputs": [
{ "internalType": "uint256[]", "name": "", "type": "uint256[]" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFallbackOracle",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "asset", "type": "address" }
],
"name": "getSourceOfAsset",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address[]", "name": "assets", "type": "address[]" },
{ "internalType": "address[]", "name": "sources", "type": "address[]" }
],
"name": "setAssetSources",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "fallbackOracle", "type": "address" }
],
"name": "setFallbackOracle",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading

0 comments on commit cbbee27

Please sign in to comment.