Questions tagged [staking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Help understanding the data in a validator deposit file

I want to understand how the data in a validator deposit file is generated. Below is an example. [{ "pubkey": "...
user avatar
  • 111
0 votes
0 answers
20 views

Is it gas efficient to call another contract's external function in a loop?

I am trying to create a staking protocols where rewards and staking are separate. But there are multiple tokens that get rewarded and I need to update each of them in a loop. Now, my question is how ...
user avatar
  • 363
1 vote
0 answers
20 views

rebase always return 0 & totalStaked always equal circulatingSupply

run this function rebase but always get epoch distribute 0. why totalStaked equal circulatingSupply ? function rebase() public { if( epoch.endBlock <= block.number ) { IsCTX( sCTX )....
user avatar
  • 11
0 votes
0 answers
12 views

How do I display a users NFTs in reactjs?

Currently on my website I have a minting page that works perfectly but I want to be able to display a users NFTs from the project and be able to stake them. I have a staking contract that works but I ...
user avatar
  • 3
1 vote
1 answer
27 views

How many validators can run with single Consensus client?

Is there limit for how many Validators (full = 32ETH) can be running on/with single Consensus client ? Based on schema (below), only Consensus client is connected to p2p network and validators are ...
user avatar
  • 143
1 vote
3 answers
121 views

Unstaking ETH from validator set After The merge

When validators stake ETH after the merge, would that ETH be beholden to the same hard-fork to that allows pre-merge staked ETH to be withdrawn? example: post merge, stake ETH. what is the withdrawal ...
user avatar
  • 11
0 votes
2 answers
39 views

How to Return an Array of structs from Solidity?

i'm having an issue when trying to return an array of structs from a getter function i've made. The smart contract is an ERC721 Staking Contract. This is the getter function: function getNftInfo(...
user avatar
0 votes
0 answers
12 views

I want to make a staking contract with max supply limit for reward token, how should I add this on the staking contract?

Staking Contract: pragma solidity ^0.8; contract StakingFuture { IERC20 public rewardsToken; IERC20 public stakingToken; uint public rewardRate = 100; uint public lastUpdateTime; uint public ...
user avatar
  • 1
1 vote
1 answer
170 views

Withdrawal activation through a hard fork and the role of the Eth2 Deposit Contract post-Merge

As we all know, the withdrawals for Beacon Chain validators will only become available in a later hard fork post-Merge. Can anyone please explain in a little bit more detail or point me to an EIP or ...
user avatar
0 votes
1 answer
6 views

Metamask Staked Tokens not loading

I am trying to look at my account where I have staked my OX to review how much ether I have earned. I am loading my wallet with metamask, and I have done this many times in the past, and I sit in an ...
user avatar
  • 1
1 vote
0 answers
29 views

Is there any well done and automatic staking contract?

Staking contracts in Solidity are sometimes challenging to program, and it's even harder when you want to make them autonomous. I would like to make a staking contract collecting fees from a defi ...
user avatar
  • 309
0 votes
1 answer
53 views

How to pass NFT property value to smart contract

I have an NFT staking contract that issues rewards based on the property rarity of the NFT staked. The four property tiers are 1,2,3 and 4. When a user clicks stakeNFT(tokenId, nftTier), I use the ...
user avatar
0 votes
0 answers
34 views

How would I link multiple tokens to a single token?

So I'm trying to allow a user to stake a token and have users stake their tokens from a different collection within that token if that makes sense. Kind of like storing cars in a garage. The contract ...
user avatar
  • 3
0 votes
2 answers
22 views

What happens to stakers' rewards when initial supply of coins are ended?

I was just reading about staking. Came to know that stakers stake their coins in the blockchain, validate the blocks and earn rewards. These rewards are from the initial supply of coins that is being ...
user avatar
0 votes
2 answers
25 views

Where does the yield for staked eth before the merge come from?

After the merge it is clear where the yield comes from, but right now I do not understand where the approx. 4.4% come from? Is the supply of eth simply inflated by the beacon chain in order to pay out ...
user avatar
0 votes
2 answers
253 views

How do you create a staking contract?

I have an erc721a contract and I want to learn how to let users stake their token. I've tried using examples on github but it never recognizes the token ID being staked. Am I doing something wrong? Do ...
user avatar
  • 3
0 votes
1 answer
83 views

How do I get addresses of tokens held by a smart contract?

My contract receives various types of ERC20 tokens. I'd like to know the addresses of the ERC20 tokens within the contract. The addresses are compulsory since they are still used within the contract. ...
user avatar
  • 38
0 votes
0 answers
18 views

What is the value of staking for an issuer of an utility token?

Suppose, you are issuing an utility TOKEN. And you have a staking pool where your holders can lock their tokens in exchange of rewards. Ok, but, what is the value for your business model to have a ...
user avatar
1 vote
1 answer
68 views

Gas optimisation for staking contract when using loops

I'm working on a staking contract, where the APY will be generated dynamically from a balance of the "rewards contract". #1 Deposits 50 #2 Deposits 50 Rewards pool - 200 tokens After a year ...
user avatar
1 vote
1 answer
213 views

Understanding `rewardRate` and `rewardPerToken` in Synthetix Staking contract

In the Synthetix Staking Contract or even the following simple staking contract from Smart Contract Programmer there are a few parameters that govern the rewards dispersed, namely rewardRate and ...
user avatar
0 votes
0 answers
26 views

What's "allocation point" in Yield Farming?

In Sushiswap and, perhaps, Uniswap, as well as in the number of others DEX-es inherited from those, in Yield Farming there's the notion of "allocation point". What's it for? How does it work?...
user avatar
0 votes
0 answers
49 views

Calculating APR from a Token/USDC Farming Pool

I was trying to look at how to calculate the APR of a PRNTR USDC Farming Pool and i struggled a lot as I can't really find a example nor a formula close to it. I studied the contract but still can't ...
user avatar
  • 1
0 votes
1 answer
385 views

How to accept ERC20 token inside my own smart contract? [duplicate]

What I basically have is my own ERC20 smart contract. I want the following functionality in my smart contract: A user transfers X amount of an ERC20 token (I can choose/change this token at any time). ...
user avatar
0 votes
0 answers
9 views

What are ve--- Type tokens?

I read somewhere about veXXX type tokens. I know it has to do something with locking up your tokens. But what is it exactly mean? What other new terminology is related to ve Defi tokens?
user avatar
0 votes
0 answers
14 views

staking on ethereum, reward user with tokens of different chains

Is it possible to reward users with tokens of different chains when staking on ethereum? I've been discussing with several people and none of them gave me positive answers, but I'm still trying to ...
user avatar
0 votes
0 answers
38 views

Ownership Issue (Staking)

I have a staking function which transfers 2 NFTs from user to the smart contract and an unstaking function which should return both the NFTs to the respective owner. But when the unstake function is ...
user avatar
0 votes
1 answer
116 views

Erc20 staking but with variable reward rate [closed]

How would I go about implementing a staking contract similar to pancakeswap farms or synthetix staking rewards but with a reward rate which can be changed in the midst of staking duration? Where users ...
user avatar
1 vote
0 answers
197 views

Farming bot to recompound on quickswap using web3.py: StakeWithPermit v, r and s missing

I'm using web3.py for farming and recompoundig on quickswap. I want to claim rewards, swap to the original tokens, add liquidity and verify the transaktion. I use the abi of the farm contract to ...
user avatar
  • 11
0 votes
1 answer
41 views

Pancakeswap BNB Staking contract not pending balance on Polygon Mumbai

Im trying to port over Pancakeswap BNB Staking to Polygon. So Instead of BNB staking id like to support MATIC staking. I have WMATIC contract, reward token contract and BNB Staking from pancakeswap. ...
user avatar
0 votes
0 answers
578 views

Transaction error "SafeERC20: low-level call failed'"

Hi I am trying to make a call to a smart contract function as defined below- function stake(uint256 amount) external nonReentrant notPaused updateReward(msg.sender) { require(amount > 0, "...
user avatar
0 votes
1 answer
194 views

How to find LP Tokens contract code to import

I add liquidity to Uniswap v2 (rinkeby) with myToken and ETH and got some LP Tokens (UNI-V2 ERC2-0). And I'm going to connect to LP Token's function transferFrom(). How I'm understanding I have to ...
user avatar
  • 79
0 votes
0 answers
12 views

Can a contract be the Ethereum 2.0 validator balance owner?

As we know it's not that easy to become a validator because it requires to have 32 ether. There are bypasses for lesser balance owners like staking on various websites or exchanges who can compound ...
user avatar
  • 651
0 votes
1 answer
100 views

Can't kick off the function which contains reference to another contract's function

I'm trying to test function (stake) which contains reference to another contract function (transferFrom). But when I test it I have a mistake. But MyToken has deployed and has address to hardhat ...
user avatar
  • 79
0 votes
0 answers
12 views

Stake / Unstake ZRX

In August last year I staked about 1500 ZRX and received a little ETH, Attached is activity log. But since October I've received no rewards and I can't un-stake / re-stake. When I click move / ...
user avatar
  • 1
0 votes
0 answers
267 views

I need guidance on building a staking smart contract for my ERC 721 NFTs

I have written a smart contract in solidity using remix that will mint ERC721 NFTs. I now want to write another smart contract that will stake the NFTs. My code for the minting contract is below, any ...
user avatar
1 vote
1 answer
302 views

How are contracts allowed to transfer ERC20 tokens from a different contract?

Sorry if my question sounds a bit vague, but I'm looking at writing an NFT staking contract that will allow holders of the ERC721 token to transfer those tokens in return for our ERC20 token. There ...
user avatar
  • 111
1 vote
0 answers
12 views

How does POS protocol handle the case where Staking node is offline

How does POS protocol handle the case where Staking node is offline and was chosen by consensus algorithm as the next block creator. Will the task be delegated to some other node? Let's say the node ...
user avatar
  • 111
0 votes
0 answers
71 views

ERC20 : problem with transferFrom

I am trying to make a staking application DApp and I am facing this problem when I launch the DApp: Obviously, it's a problem of balance, this one is not enough big. I red this link too: https://...
user avatar
  • 11
0 votes
1 answer
91 views

Can an ERC-20 token's contract be modified after initial offering?

If a custom ERC-20 token is initially issued, can its solidity code be modified for all existing holders and circulating supply to include a new function? For example, you issue ERC-20 token in ...
user avatar
0 votes
0 answers
42 views

Governance Voting Power based on staking

I am using openzeppelin Governance contract i want to made some changes in terms of "how to calculate the voting power" I want to calculate voting power like that VP = T * M Where: ● VP is ...
user avatar
1 vote
1 answer
61 views

How are transfer prevented of a token?

Was read through Solidity staking source codes, something left me quite puzzled. dappToken.transfer(recipient, getUserTotalValue(recipient)); The code above is the line of code to transfer the reward ...
user avatar
0 votes
1 answer
19 views

What if the unstaking time is shortened to several minutes?

I am wondering What if the unstaking time is shortened to several minutes? not several days or weeks? Is there any problem with it?
user avatar
  • 137
0 votes
0 answers
40 views

Is there any trustable contracts on bsc that I can stake or invest the the stable coin?

I'm developing a smart contract with solidity that users send a stable coin (for example usdt) to it and get other tokens. This stable coin would be held in contract for the time user wants to ...
user avatar
  • 101
0 votes
0 answers
843 views

Staking ERC20 Token: external contract and burn function

I’m trying to understand how to create a staking token. My purpose is to create a token, in which the user can stake the token and earn interest in the token itself. We can have two ways to implement ...
user avatar
  • 145
1 vote
1 answer
112 views

Code for staking Ethereum

Ethereum enabled staking for anyone with a minimum of 32 ETH. Where can I see the code of their staking protocol? Is it a .sol file? Is it a contract address whose code is viewable on Etherscan? ...
user avatar
0 votes
1 answer
221 views

ERC20 Unstaking function not working

I am building a staking contract that accepts an ERC20 token set by the owner. contract ECommerce { IERC20 token; .... token = IERC20(**"I insert the token address here"**); Here ...
user avatar
0 votes
0 answers
24 views

Staking (and farming yield) with small amount ETH - where to?

I'm a simple hodler with a small amount of ETH (~4) and I wanted to earn some via staking. I did my research and came to the conclusion the most profitable options would be: to stake via Lido (or ...
user avatar
  • 101
0 votes
0 answers
19 views

Basic difference among time lock, staking, hodling, liquidity pooling?

Can some one make me to clear with this keywords in short. In the process of learning block chain technology I got stuck and confused among this terminology. I got some basic understanding between ...
user avatar
0 votes
0 answers
41 views

How do i allow our users to stake their NFTs for our EC20 utility token

Sorry if this question has already been asked somewhere, but I’ve been searching for some time now and still can’t get a straight answer about this. Basically I’m looking to allow the users who ...
user avatar
  • 111
0 votes
0 answers
18 views

Had Coinbase directly connected to 0x staking and I think I lost all my accumulated ZRX and ETH

Apologies if this is not the right place to ask, but I'm at my wits end. I had started staking my ZRX about 10 months ago by directly linking it to my coinbase account (I did not install the coinbase ...
user avatar
  • 1