Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#patch); baseswap; fix pool tvl, fees #2365

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployment/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -5300,7 +5300,7 @@
"status": "dev",
"versions": {
"schema": "1.3.2",
"subgraph": "1.0.0",
"subgraph": "1.1.0",
"methodology": "1.0.0"
},
"files": {
Expand Down
13 changes: 9 additions & 4 deletions subgraphs/uniswap-forks/protocols/baseswap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ When users make a token swap (trade) in the Exchange tab, a trading fee is charg

## Baseswap Trading Fees & Breakdown

- 0.25% - Trade Fees
- 0.25% - Trading Fees
- 0.17% - Supply Fees
- 0.08% - Protocol Fee
- 0% - LP Reward for Liquidity Providers
- 0.25% - Protocol Fee

LP providers earn rewards for staking LP tokens

Expand All @@ -20,9 +21,13 @@ LP providers earn rewards for staking LP tokens

Sum across all Pools: `Liquidity Pool TVL`

> Note: For WETH/BSWAP, there was an initial liquidity lock up of $410k in the WETH/BSWAP pool as BSWAP token's initial liquidity ([docs](https://base-swap-1.gitbook.io/baseswap/tokenomics/usdbswap-token), [transaction](https://basescan.org/tx/0x8fe53fa234ff89bed2ca6cb2c5528f53a6e5e3df313279d694421f4cef8cc4b2)), which is not counted in pool's liquidity on protocol's UI.
> However, we feel it should be counted as a regular transfer contributing to pool's liquidity, and will cause mispricing of LP token if not counted.
> Hence the subgraph will show WETH/BSWAP pool's liquidity greater than the protocol UI by $410k.

### Total Revenue USD

Sum across all Pools: `Pool Swap Trading Volume * Trading Fee`
Sum across all Pools: `Pool Swap Trading Volume * Supply Fee`

### Protocol-Side Revenue USD

Expand All @@ -32,7 +37,7 @@ Sum across all Pools: `Pool Swap Trading Volume * Protocol Fee`

Portion of the Total Revenue allocated to the Supply-Side (LPs).

Sum across all Pools: `Pool Swap Trading Volume * Trading Fee`
Sum across all Pools: `Pool Swap Trading Volume * Supply Fee`

### Total Unique Users

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export class BaseswapBaseConfigurations implements Configurations {
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getTradeFee(blockNumber: BigInt): BigDecimal {
return BigDecimal.fromString("0.25");
return BigDecimal.fromString("0.17");
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getProtocolFeeToOn(blockNumber: BigInt): BigDecimal {
return BigDecimal.fromString("0.25");
return BigDecimal.fromString("0.08");
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
getLPFeeToOn(blockNumber: BigInt): BigDecimal {
Expand Down Expand Up @@ -84,12 +84,16 @@ export class BaseswapBaseConfigurations implements Configurations {
"0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22", // coinbase wsETH
"0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", // usdc
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb", // dai
"0x65a2508c429a6078a7bc2f7df81ab575bd9d9275", // dai+
"0xb79dd08ea68a908a97220c76d19a6aa9cbde4376", // usd+
];
}
getStableCoins(): string[] {
return [
"0xd9aaec86b65d86f6a7b5b1b0c42ffa531710b6ca", // USDC
"0x50c5725949a6f0c72e6c4a641f24049a917db0cb", // DAI
"0x65a2508c429a6078a7bc2f7df81ab575bd9d9275", // DAI+
"0xb79dd08ea68a908a97220c76d19a6aa9cbde4376", // USD+
];
}
getStableOraclePools(): string[] {
Expand All @@ -98,7 +102,9 @@ export class BaseswapBaseConfigurations implements Configurations {
];
}
getUntrackedPairs(): string[] {
return [];
return [
"0xda2e677649dd670dac5db2d0df06c97c0a92b40d", // Wrapped Ether/BaseHarryPotterObamaSonic10Inu
];
}
getUntrackedTokens(): string[] {
return [];
Expand Down
Loading