Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gammaswap/lrt-integration-docs
Documentation about integrating with Liquid Restaking Tokens
https://github.com/gammaswap/lrt-integration-docs
Last synced: about 1 month ago
JSON representation
Documentation about integrating with Liquid Restaking Tokens
- Host: GitHub
- URL: https://github.com/gammaswap/lrt-integration-docs
- Owner: gammaswap
- License: mit
- Created: 2024-03-19T16:47:39.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-08T04:31:58.000Z (8 months ago)
- Last Synced: 2024-05-09T04:38:25.419Z (8 months ago)
- Size: 79.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LRT-Integration-Docs
Documentation about integrating GammaSwap with Liquid Restaking Tokens. Full description of subgraph and smart contract calls to achieve the integration are described in the word document called "GammaSwap_LRT_Integrations.docx"## Addresses
LPViewer contract used for getting the reserve token quantities of an LP
arbitrumSepolia: 0x1Ff4013fC30ce56A6c3434F71261adbbA2642f34
baseSepolia: 0x5A406f713e61BB873B900040fe2084ad1e51Cc96
arbitrum: 0x3a6CE4c0467B8a0fFb74624134C1b525d9F42198
base: 0x9289b0b70621b90677b8F95ad35225B01341e613
## Two types of integrations:
1. Providing liquidity: Reward unborrowed tokens with LRT points, earn interest on borrowed tokens
2. Borrowing liquidity: Reward borrowed tokens with LRT points, pay interest to liquidity providersNote: Examples given below are for a GammaSwap pool made of wstETH and USDC but any combination of tokens can be used.
## 1. Providing liquidity
Providing liquidity into a full range x*y=k AMM. Users would earn points from the LRT token in the AMM. The AMM can be made of an LRT token and any other token. Alternatively it could be two LRT tokens.Example:
user1 provides 100 wstETH and 100 USDC as liquidity into the AMM. His wstETH balance is 100 wstETH. Total wstETH in the platform is 100 wstETH.
## 2. Borrowing liquidity
Borrowing liquidity from the above mentioned AMM in order to turn impermanent loss into impermanent gain. Users would earn points on the LRT token held as collateral against the AMM liquidity loan.
Example:
After user1 above provides liquidity, user2 borrows 90 wstETH and 90 USDC from the AMM as a liquidity loan, holding 90wstETH and 90 USDC as collateral. User2 wstETH balance is 90 wstETH.
However, user1’s balance has now changed to 10 wstETH because user2 borrowed 90 wstETH from it. Total wstETH in the platform is still 100 wstETH because wstETH never leaves the platform. All loans are held inside the GammaSwap platform (either the AMM as liquidity or in the GammaPool as collateral for a loan). User1 of course would be compensated in interest payments from user2 for lending his wstETH which he can use to earn LRT point rewards.