puremoney / zerointerestdefi Goto Github PK
View Code? Open in Web Editor NEWA port of Liquity to Solana, in Rust
A port of Liquity to Solana, in Rust
Interact with the Phantom Wallet on the UI. (Phantom is better than Sollet.)
See: https://phantom.app/
This is not clear. @y2kappa , please edit this description.
In the Liquity system, redeemers have to "catch" the riskiest trove in order to redeem from it. In our system, the selection can be done from the sorted list of troves, and we can design it such that the redeemer comes to our system knowing only how much stable-token she wants to exchange for SOL. Our system then selects the riskiest trove to either partially or fully redeem. Even in the case of a full redemption, the borrower does not lose all her SOL. If the contents of the first trove is not enough, the system redeems the next trove in line, and so on.
ROKS Minting account (to create a coin) SPL
Total locked value (TVL) should be the amount of SOL locked in the Active Pool.
VTT Minting account (initial supply) SPL
After the system receives SOL for collateral, we consult the oracle (Pyth - see #11 (comment)) for current SOL price in USD, multiply that by the amount of SOL deposited, and mint 90.9% of the value. We then send this much stable-token to the borrower's address. This address is the "associated token account".
Borrower's collateral falls below 110% of loan value, either because the price of SOL drops or the borrower has borrowed more stable-token.
The riskiest troves are redeemed from; however, as opposed to the liquidation case, the borrower in this case does not lose all her SOL. For example, if she has 120% SOL collateral, the most she loses is 100% of the value of her debt, leaving 20% in the worst case scenario. SOL is paid to the redeemer, and the burned stable-token basically pays-off the loan (or at least part of it).
Reward token holders can stake their reward token for rewards. These rewards come from the fees paid by users during trove openings and redemptions.
Very simple connection to Pyth, as described here: https://www.twitch.tv/videos/1029723204
Separate page where you can stake your coins.
(Note: I may have attached this to the wrong milestone.)
User (could be borrower or another user who bought stable-token from open market) deposits stable-token into Stability Pool.
The redeemer in this case can be anybody, not just borrowers. She could be somebody who bought the stable-token from a DEX. She comes to the system and deposits 500 stable-tokens, with the aim of receiving SOL in return. This is only profitable when the stable-token exchange rate with USD goes below 1.0.
All of SOL in liquidated troves are placed in "Collateral Surplus Pool". These SOL are distributed to Stability Pool depositors. (Please consult with Liquity code to determine exactly when the Collateral Surplus Pool should be distributed.)
Unstake stable-token from Stability Pool. If any reward-token is due, those would be sent to the user's reward-token address also.
When a trove is liquidated, then depending on system conditions, some of its Stable-token debt gets offset with stable-tokens in the Stability Pool: that is, the offset debt evaporates, and an equal amount of LUSD tokens in the Stability Pool is burned.
Thus, a liquidation causes each depositor to receive a stable-token loss, in proportion to their deposit as a share of total deposits. They also receive a SOL gain, as the SOL collateral of the liquidated trove is distributed among Stability depositors, in the same proportion.
When a liquidation occurs, it depletes every deposit by the same fraction: for example, a liquidation that depletes 40% of the total stable-token in the Stability Pool, depletes 40% of each deposit. A deposit that has experienced a series of liquidations is termed a "compounded deposit": each liquidation depletes the deposit, multiplying it by some factor in range [0,1].
Deposit SOL in order to borrow stable-token ROKS.
The redemption fee is calculated according to a decaying formula. It goes up at a certain rate for every redemption, but then decays until the next redemption.
In order to incentivize early staking, rewards start large and then decay in time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.