diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..d96bfaea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +## v7 + +- APY numbers have been changed to return proper percentages. (v6 value / 100) \ No newline at end of file diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md new file mode 100644 index 00000000..4df05624 --- /dev/null +++ b/DEPENDENCIES.md @@ -0,0 +1,7 @@ +# Dependencies + +Log our important dependencies in here so that we know what should be updated when breaking changes are made for the +next version. + +- https://github.com/OriginProtocol/oeth.com +- https://github.com/OriginProtocol/origin-defi diff --git a/README.md b/README.md index b06e06a9..f79a9640 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,4 @@ -[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/subsquid/squid-evm-template) - -# Minimal EVM squid - -This is a starter template of a squid indexer for EVM networks (Ethereum, Polygon, BSC, etc.). See [Squid SDK docs](https://docs.subsquid.io/) for a complete reference. - -To extract EVM logs and transactions by a topic or a contract address, use `EvmBatchProcessor.addLog()` and `EvmBatchProcessor.addTransaction()` methods of the `EvmBatchProcessor` instance defined in `src/processor.ts`. - -The requested data is transformed in batches by a single handler provided to the `processor.run()` method. - -For a full list of supported networks and config options, -check the [`EvmBatchProcessor` overview](https://docs.subsquid.io/develop-a-squid/evm-processor/) and the [configuration page](https://docs.subsquid.io/develop-a-squid/evm-processor/configuration/). - -For a step-by-step migration guide from TheGraph, see [the dedicated docs page](https://docs.subsquid.io/migrate/migrate-subgraph/). - -Dependencies: Node.js, Docker. +# Origin Subsquid ## Quickstart @@ -78,7 +63,9 @@ See [docs on database migrations](https://docs.subsquid.io/basics/db-migrations) ### 4. Import ABI contract and generate interfaces to decode events -It is necessary to import the respective ABI definition to decode EVM logs. One way to generate a type-safe facade class to decode EVM logs is by placing the relevant JSON ABIs to `./abi`, then using `squid-evm-typegen(1)` via an `sqd` script: +It is necessary to import the respective ABI definition to decode EVM logs. One way to generate a type-safe facade class +to decode EVM logs is by placing the relevant JSON ABIs to `./abi`, then using `squid-evm-typegen(1)` via an `sqd` +script: ```bash sqd typegen diff --git a/src/processors/oeth/utils.ts b/src/processors/oeth/utils.ts index b526796c..972f166d 100644 --- a/src/processors/oeth/utils.ts +++ b/src/processors/oeth/utils.ts @@ -113,12 +113,10 @@ export async function createRebaseAPY( ((Number(lastApy.rebasingCreditsPerToken) / Number(apy.rebasingCreditsPerToken) - 1) * - 100 * 365.25) / dayDiff const periods_per_year = 365.25 / dayDiff - apy.apy = - ((1 + apy.apr / periods_per_year / 100) ** periods_per_year - 1) * 100 + apy.apy = (1 + apy.apr / periods_per_year) ** periods_per_year - 1 const last7daysDateId = { key: 'apy7DayAvg' as const,