Skip to content
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

Set up the reward interface #5

Open
opcryptogroot opened this issue Jun 18, 2022 · 35 comments
Open

Set up the reward interface #5

opcryptogroot opened this issue Jun 18, 2022 · 35 comments

Comments

@opcryptogroot
Copy link
Owner

I made the GUARD token contract. For the farming contract we'll simply reuse synthetics contracts which are standard.
Both contracts are uploaded on this github.
Note that I can't deploy the stakingrewards now (because otherwise people could start staking before the UI is ready and it would not be fair), so you'll need to test on testnet first. Once it's working on testnet, I'll deploy on mainnet (I let you deploy on testnet).

You can put a "stake" onglet to allow people to farm.
Basically, people having PBTY can stake those to get GUARD tokens. The staking contract is standard so I'd expect youu would find a lot of interfaces (try vfat.tools, note that some interfaces use some contracts where you can sign instead of approving, note that it is not our case) you could copy+change the color to match the theme.

Since ETH has decreased a bit since last time I'll pay 1.5 ETH this this (+GUARD when some are assigned to us by the DAO).

@opcryptogroot
Copy link
Owner Author

@hashedpip

@hashedpip
Copy link
Collaborator

@hashedpip

@opcryptogroot amazing, I started working on this template: https://guard-staking-template.vercel.app/dashboard

It is still a simple concept with two tabs Dashboard and History. The idea is leaving Dashboard for all staking/unstaking related actions and history to show the account history of staking/unstaking and claimed rewards.

The dashboard has several Cards to introduce different APIs or different staking options such as: staking PBTY yielding GUARD, staking GUARD yielding GUARD or staking any other future token yielding GUARD. We can make it only 1 Card and centralize the element if you think having several cards is not needed. This tab is inspired on the biswap.org staking page.

Let me know what we can improve/change on the front-end. I will start working on deploying and testing the Smart Contracts on the testnet.

@hashedpip
Copy link
Collaborator

PS:. I noticed the template is kinda buggy on 1366x920, I suggest using 1920 × 1080 to better visualize the page.

@opcryptogroot
Copy link
Owner Author

opcryptogroot commented Jun 20, 2022

Hi thanks for the work,

I think the dashboard template you showed is too complex.
I think we need only 1 extra tab (the main tab being the curent one we would have one staking tab, so we also need to add a menu).
I think we could use quickswap as a template https://quickswap.exchange/#/syrup with the following modifications:

  • Remove Participating tokens, search bar, APR, deposit total deposits (I expect that we would only get 1-4 bounties active at the same time so all could be displayed and no search is needed).
  • "Deposits" -> "Bounty"
  • Have the theme matching the main tab (what was currently developed).
  • For the bounty token values, use the value of the underlying ETH.
  • For the GUARD token value, use Uniswap V2 price (ETH-GUARD pair, note that initially this will be undefined, so put a ? if the pair doesn't exist).

No need of an history let's keep it simple.

@hashedpip
Copy link
Collaborator

Alright, I will start working on the suggested changes/improvements.

@opcryptogroot
Copy link
Owner Author

Hi @hashedpip, did you get some progress?

@hashedpip
Copy link
Collaborator

Hi @hashedpip, did you get some progress?

hi @opcryptogroot I got back to the drawing board to make something more in line with what you asked. I will send you a Figma template this week so you can validate the new design before I refactor the app. Is that ok?

@opcryptogroot
Copy link
Owner Author

opcryptogroot commented Jul 14, 2022

Hi @hashedpip, any ETA for this? (by the way I managed to get some funding for the guardian DAO :) )

@hashedpip
Copy link
Collaborator

Hi @opcryptogroot, It will be ready to ship in 7~10 days, counting on your approval of the new template. You can check how it will look like on Figma here: https://www.figma.com/file/CPy2SKmIzcfH7uJUr5VKmv/Untitled?node-id=0%3A1

Once you say ok, I will start porting the template to code and integrate the smart contract.

@hashedpip
Copy link
Collaborator

Hi @hashedpip, any ETA for this? (by the way I managed to get some funding for the guardian DAO :) )

Awesome! It means we will have more work to do, right?

@opcryptogroot
Copy link
Owner Author

Thanks for waiting as I didn't have any secure connection where I was.
Unfortunately figma is not compatible with Tor so I can see it.
Maybe if you could show a few screenshots.

@opcryptogroot
Copy link
Owner Author

Hi @hashedpip, any ETA for this? (by the way I managed to get some funding for the guardian DAO :) )
Awesome! It means we will have more work to do, right?

Yeah, that even mean that we may be able to pay permanent team members.

@opcryptogroot
Copy link
Owner Author

This looks great.
You can start implementing.

@hashedpip
Copy link
Collaborator

This looks great. You can start implementing.

I'm on it

@hashedpip
Copy link
Collaborator

Hi, @opcryptogroot tornadocash has gone down. Hope it didn't affect you.

Integration is 90% complete, the new improved front-end will be ready really soon.

@hashedpip
Copy link
Collaborator

Plus, if you still don't have icons for GUARD & PBTY tokens (on the example I showed last time, the icons are placeholders), I can have my Designer create them.

@opcryptogroot
Copy link
Owner Author

Nice.
Yeah that's be great to have the images.
We can add 0.5ETH for the design.

Here are some ideas

For PBTY: A Putin image with a cancel sign (https://duckduckgo.com/?q=cancel&ia=images&iax=images&iai=https%3A%2F%2Fclipground.com%2Fimages%2Fcancel-png-20.png)

For GUARD: A shield protecting a galaxy.

That'd be great to have different proposals to choose from.

@opcryptogroot
Copy link
Owner Author

I made 2 issues:

@hashedpip
Copy link
Collaborator

hashedpip commented Aug 16, 2022

@opcryptogroot Information about Bounty DAPP v2.0

Pull Request #8

[1] Bounty and Staking Contracts have testnet deployments on Ethereum Goerli Testnet. The contract addresses are as follows:

PBTYToken: 0xdfB4f93170BE0BB9c611079626e580B3c15eFF0d
GuardianToken: 0xb71A9711217ebCA3C91C466b54a2816c774A5255
StakingRewards (Stake PBTY to yield GUARD): 0xD1B3c689A90AB6077ef3DF29c60744b1135FB242
StakingRewards (Stake GUARD to yield GUARD): 0xB51acFB250d8dD67c89ec9Cdb30B40962a0d551e

[2] Contracts GuardianToken.sol and StakingRewards.sol had fixes to small bugs that kept them from compiling:

  • Fix 1 out of 2: In GuardianToken.sol, the use of balance mapping is inconsistent throughout the code.
  • Fix 2 out of 2: In StakingRewards.sol, solidity compiler version is declared twice, which kept the code from compiling correctly.

[3] A demo version of the new Dapp is available HERE.

[4] Next Steps:

  • Changing placeholder icons and suggestions to PBTY and GUARD icons are available waiting for feedback on issues Make the PBTY logo #6 and Make the GUARD logo #7.
  • Since staking contracts are deployed on Goerli Testnet, the dapp doesn't ask the user to change to the default network yet. This will be implemented after Staking contracts are deployed on mainet.

@hashedpip
Copy link
Collaborator

@opcryptogroot icons approved in #6 and #7 have been added to pull request #8 and are already on the live demo

Let me know if there is anything else you think we can change/improve.

My ETH address has changed since the last bouty and is now 0x86bFD29599b3e8d24e91Fc87d5f763a026Af7829

@opcryptogroot
Copy link
Owner Author

Nice, I'm verifying everything is good and will deploy on mainnet if it is.
(I verified the contracts already and modifications are good)

@opcryptogroot
Copy link
Owner Author

Typos:
"others'predictions" -> "others' predictions"

@opcryptogroot
Copy link
Owner Author

Also if you could give me a bit of GoerliETH for testing that would help me as I can't manage to find a working faucet 0x129DCd1136AA26c78413aB2ce2644f66CEa178F2

@hashedpip
Copy link
Collaborator

Also if you could give me a bit of GoerliETH for testing that would help me as I can't manage to find a working faucet 0x129DCd1136AA26c78413aB2ce2644f66CEa178F2

Sent 0.25 GoerliETH

@opcryptogroot
Copy link
Owner Author

Thanks.
Could you update the following?:

  • The approve is approving only 100000 PBTY / GUARD which corresponds to only 10 ETH (currently the whale has 1 000 000 PBTY). A total approve should be approving the maximum which is 2^256-1 base units (not tokens).
  • After approving, the buttons stays as "Approve" (true for both PBTY and GUARD) and we need to reload the page to see the staking button.
  • We can prefil the staking field with the maximum stakable amount (as most users would stake it all).

@hashedpip
Copy link
Collaborator

Thanks. Could you update the following?:

  • The approve is approving only 100000 PBTY / GUARD which corresponds to only 10 ETH (currently the whale has 1 000 000 PBTY). A total approve should be approving the maximum which is 2^256-1 base units (not tokens).
  • After approving, the buttons stays as "Approve" (true for both PBTY and GUARD) and we need to reload the page to see the staking button.
  • We can prefil the staking field with the maximum stakable amount (as most users would stake it all).

@opcryptogroot may I suggest instead of prefiling the staking field, we can have stake all button next to the input field? As for the other fixes, I am working on em.

@hashedpip
Copy link
Collaborator

@opcryptogroot just pushed a few fixes. Let me know what you think.

@opcryptogroot
Copy link
Owner Author

It's good.
I'll deploy contracts on mainnet soon.

@opcryptogroot
Copy link
Owner Author

GUARD token: https://etherscan.io/address/0x5cfa3e8276196c481a42264ddd3745eb27b762b8
Staking reward (PBTY giving GUARD): https://etherscan.io/address/0x5bc49183cb5de71d9ea9d6163e114e87f74c03c5

Note that for now only PBTY is gonna reward GUARD (we can discuss after if we want to incentivize liquidity of GUARD or not).

@hashedpip
Copy link
Collaborator

hashedpip commented Aug 25, 2022

@opcryptogroot PR #9 have the following changes:

  • Staking is now integrated into rewards contract on mainet;
  • Now Metamask "change to default network" message pops up when not on mainet;
  • Removed Guard to Guard staking Card from the Staking page;

As usual, a live demo is available HERE

@hashedpip
Copy link
Collaborator

Note: rewards will only start rolling out once the Staking contract is funded with GUARD tokens and the notifyRewardAmount function is called by the rewardsDistribution address.

@hashedpip
Copy link
Collaborator

@opcryptogroot if there are no changes after the current PR, can we proceed to payout? The ETH price movements these last weeks are making me a lil' anxious 😣

@opcryptogroot
Copy link
Owner Author

Thanks for waiting. I merged.
Could you give me the address to send your ETH and the logo designer ETH?

@hashedpip
Copy link
Collaborator

@opcryptogroot Here you go: 0x86bFD29599b3e8d24e91Fc87d5f763a026Af7829

Let me know if there is anything else we can do! Always a pleasure working with u 😁

@opcryptogroot
Copy link
Owner Author

I paid out. Pleasure working with you too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants