Skip to content

Update README.md #38

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
58 changes: 54 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,57 @@
# LunaX
# LunaX - Liquid staking with crazy yields on Terra 2.0

LunaX docs: https://docs.google.com/document/d/1oChlz2ndKCTO_QFp0KtnYQrfUpbBtHZdTp8ABV7MbFY/edit?usp=sharing
LunaX is a liquid staking solution offered by [Staderlabs](https://staderlabs.com "Staderlabs") to the Terra 2.0 ecosystem. LunaX unlocks your staked Luna and enables you to participate in various DeFi protocols like Terraswap, Astroport etc to get yields on top of your staking rewards! Plus the Luna staked is distributed equally across our validator pool, so you are also contributing towards decentralization of the Terra 2.0 ecosystem! Double win!

Miro board for LunaX: https://miro.com/app/board/uXjVORU5ITo=/
### Contracts in the repo

The LunaX contracts are built with [cosmwasm 1.0.0](https://github.com/CosmWasm "cosmwasm 1.0.0") . The following are the contracts in the repo

1. Airdrops registry: This contract is a registry contract of various airdrop contracts. This is a central store for Stader to query the cw20 contracts of various airdrop tokens.

2. Reward: This contract collects staking rewards from the staking pool. All the staking rewards collected are sent to this contract.

3. Staking: This is the main staking contract which the user interacts with. users interact with this contract to deposit Luna and mint LunaX. Similarly, users interact with this contract to burn LunaX and unstake their stake which takes 21 days to release. Post the 21 day unstaking period users, users interact with this contract to withdraw their stake. This contract also contains messages required for validator stake pool operations.

### Building the project

To build the project for a production release, run the following command in the root directory of the project:

```bash
docker run --rm -v "$(pwd)":/code \
-v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock \
-e SSH_AUTH_SOCK="/run/host-services/ssh-auth.sock" \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.12.10
```

The optimized wasms get saved in the artifacts directory.

You can also go into each directory and run

```bash
cargo build

```
To run tests, you can go into each contract directory and run

```bash
cargo test
```

### Live contracts

The following are the contracts on mainnet:

1. Staking contract: terra179e90rqspswfzmhdl25tg22he0fcefwndgzc957ncx9dleduu7ms3evpuk

2. Reward contract: terra1sstqldl7tyvvdseppsa022acrxp7cuuplkc7639w7x7cmm4hjvvqjpwh0x

3. Airdrop registry: terra1fvw0rt94gl5eyeq36qdhj5x7lunv3xpuqcjxa0llhdssvqtcmrnqlzxdyr

4. LunaX Cw20 Token: terra14xsm2wzvu7xaf567r693vgfkhmvfs08l68h4tjj5wjgyn5ky8e2qvzyanh

### Dapp link

https://terra.staderlabs.com/liquid-staking

The above documents have all the tech architecture related to LunaX