Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vyper-protocol/vyper-core
🐍 Permissionless derivatives
https://github.com/vyper-protocol/vyper-core
rust solana solana-program
Last synced: 15 days ago
JSON representation
🐍 Permissionless derivatives
- Host: GitHub
- URL: https://github.com/vyper-protocol/vyper-core
- Owner: vyper-protocol
- License: mit
- Created: 2022-01-06T15:14:44.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2023-05-19T14:36:16.000Z (over 1 year ago)
- Last Synced: 2023-05-19T15:36:53.255Z (over 1 year ago)
- Topics: rust, solana, solana-program
- Language: Rust
- Homepage: https://vyperprotocol.io/
- Size: 2.02 MB
- Stars: 41
- Watchers: 4
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Vyper Core works as a set of smart contract which can take any SPL token and a custom payoff function, and redistribute the tokens to match the payoff upon certain conditions. For example, people can deposit farming LP tokens, which after some time (e.g. a week) are redistributed to reflect the the impermanent loss vs fees generated.
There are three main smart contracts:
- **Vyper Core**: manages position IOUs creation and redemption, accepts only fungible tokens (e.g. LP tokens or cTokens). It redistributes collateral deposited consuming data from the rate calculator and redeem logic contracts
- **Rate Calculator**: updates the fair price of the collateral deposited (e.g. USD value of LP token). Supports up to 10 different underlyings for sophisticated payoffs
- **Redeem Logic**: payoff formula which specifies how collateral should be distributed, based on initial collateral deposited, initial prices, final prices, and other parameters (e.g. strike, duration)# Repository Structure
Following the Vyper suite
## Solana Programs
| Name | Type | Version | Path |
| ----------------------------------| ------------------- | ------- | -------------------------------------- |
| **Vyper Core** | Core Primitive | `0.1.0` | `programs/vyper-core` |
| **Rate Switchboard** | Rate Plugin | `0.1.0` | `programs/rate-switchboard` |
| **Rate Pyth** | Rate Plugin | `0.1.0` | `programs/rate-pyth` |
| **Rate Mock** | Rate Plugin | `0.1.0` | `programs/rate-mock` |
| **Redeem Logic Lending** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-lending` |
| **Redeem Logic Lending Fee** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-lending-fee` |
| **Redeem Logic Farming** | Redeem Logic Plugin | `2.0.0` | `programs/redeem-logic-farming` |
| **Redeem Logic Vanilla Option** | Redeem Logic Plugin | `2.0.0` | `programs/redeem-logic-vanilla-option` |
| **Redeem Logic Forward** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-forward` |
| **Redeem Logic Settled Forward** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-settled-forward`|
| **Redeem Logic Fila** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-fila` |
| **Redeem Logic Digital** | Redeem Logic Plugin | `1.0.0` | `programs/redeem-logic-digital` |## Rust Libraries
| Name | Version | Path |
| ------------ | ------- | ------------------- |
| Vyper Utils | `0.1.0` | `libs/vyper-utils` |
| Vyper Macros | `0.1.0` | `libs/vyper-macros` |## Typescript SDK
We're currently working on a typescript sdk for frontend integrations. This is still a WIP, but it's available at the path `/sdk`.
Once finished it'll be published as a npm module.
# Setup, Build, and Test
First, install dependencies:
```
$ yarn install
```And install Anchor by following the [instructions here](https://github.com/coral-xyz/anchor/blob/master/docs/src/getting-started/installation.md).
Build the program:
```
$ anchor build
```Finally, run the tests:
```
$ cargo test
$ anchor test
```# Documentation
General Vyper documentation can be found [here](https://docs.vyperprotocol.io/).
# Getting Help
Join [our Discord channel](https://discord.gg/KYaXgwetcK) and post a message