Staking Smart Contract Protocol#3
Open
PabloVallejoCrypto wants to merge 4 commits intosolace-fi:mainfrom
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staking Protocol based on Solidity.
The protocol works with two Smart Contracts.
Contracts at https://github.com/PabloVallejoCrypto/ArgentinaStakingProtocol
First the ERC20 contract to define the token CHAOS(XΟΣ) and send 18 000 000 to owner. Has two minting functions, one the normal for owner but to make it easy I developed another one with free permisions.
The second contract, the Staking one has the basic functionality to work as an staking contract. It is connected to the first contract as it uses the first one as an staking method. It works with a position-based model, where the user can open a position and with time it gets benefits from an specific deposit. Never can waste more than that Benefit Deposit.
The reward method work in a way that if a person stakes the same supply as the total Benefit Deposit it will recieve 100 tokens per block. Otherwise it calculates the proporcional part for rewards.
Owner can mint more tokens at ERC20 and on the Staking contract it can add tokens to the Benefit Deposit, know if an address is a staker, get and change parameters.
You can add fees on the ERC20 and Staking contract in a simple way.
The protocol ERC20 is based on OpenZeppelin Library.
I have used Truffle, Binance, Ropsten, Vercel, NextJS, React and Web3.
I have developed a simple user-owner interface with React and Web3, and it is hosted at Vercel.
(Owner address seedPhrase at website)
https://argentina-web.vercel.app/
Personal CV
chaoticbcn.com
Let me know your feedback about the protocol.
Thanks in advance,
Pablo Vallejo.