-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from lidofinance/develop
Develop
- Loading branch information
Showing
23 changed files
with
1,008 additions
and
2,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Examples | ||
|
||
SDK usage examples for various practical cases. | ||
|
||
## stETH rewards accounting | ||
|
||
The provided examples are useful to establish robust accounting for the stETH rebaseable token, learn more about [stETH rebases](https://docs.lido.fi/contracts/lido/#rebase). For some complicated scenarios of using collective accounts for multiples users (might be applicable for CEXes and custodian services), see the suggested [reward attribution](https://hackmd.io/@lido/rewards-attribution) approaches. | ||
|
||
### Basic rebase tracking | ||
|
||
- [Example 1. Subscribe on the stETH token rebase events to track rewards updates](rewards/README.md#subscribe-on-the-steth-token-rebase-events-to-track-reward-updates) | ||
- [Example 2. Get rewards accrued with the latest stETH token rebase for the chosen account](rewards/README.md#get-rewards-accrued-with-the-latest-steth-token-rebase-for-the-chosen-account) | ||
|
||
### Reward history | ||
|
||
- [Example 3. Retrieve reward history for the chosen account using the event logs (recommended)](rewards/README.mdretrieve-reward-history-for-the-particular-account-using-the-event-logs-recommended) | ||
- [Example 4. Retrieve reward history for the chosen account using the Subgraph indexer (alternative way)](rewards/README.md#retrieve-reward-history-for-the-particular-account-using-the-subgraph-indexer-alternative-way) | ||
- [Example 5. Calculate the effective APR for the chosen account concerning the given period](rewards/README.md#calculate-the-effective-apr-for-the-chosen-account-concerning-the-given-period) | ||
- [Example 6. Keep track of rewards accrued for the set of accounts](rewards/README.md#keep-track-of-rewards-accrued-for-the-set-of-accounts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/.yarn/** linguist-vendored | ||
/.yarn/releases/* binary | ||
/.yarn/plugins/**/* binary | ||
/.pnp.* binary linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yalc | ||
yalc.lock | ||
tsconfig.tsbuildinfo | ||
|
||
# playwright | ||
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
|
||
# testing | ||
/coverage | ||
|
||
# generated | ||
/generated | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
||
# env | ||
.env | ||
.env.local | ||
.env.production | ||
.env.development | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
#ide | ||
.vscode | ||
.idea | ||
|
||
/public/runtime/ |
Oops, something went wrong.