Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Euler Staking
copy icon
euler-xyz
• version 1.0.0
Staking
ERC20
Synthetix

Euler Staking

Staking on Euler is based on Synthetix’s staking contracts. This is an overhaul to Euler’s gauge system, which thanks to eIP 24 is modified from its previous iteration coming into effect with the arrival of Epoch 18. For the duration of the three month trial, 5000 EUL a month (for a total of 15000 EUL) will be distributed to users staking these assets: USDT, USDC and WETH. To stake an asset and receive some of the EUL being distributed, users should stake their eTokens into the staking contract. Should you please, you can immediately unstake your tokens at any time and the accrued EUL earnings will be instantly claimable. There is no lockup period for this staking process.

*Visit desktop site to download or deploy

Version

1.0.0

Creator

euler-xyz

Last Publish

1/16/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
staked(address,address) :
This function returns the amount of a particular underlying asset that has been staked by a given account. It does this by accessing the userStaked mapping, which stores the amount of each underlying asset that has been staked by each account. The function takes two parameters, an account address and an underlying asset address, and returns the amount of the underlying asset that has been staked by the account. (autogenerated documentation)
stake() :
This function allows users to stake EUL tokens on a specific underlying asset. It takes an array of StakeOp objects as an argument, which contain the amount of EUL tokens to be staked and the underlying asset. The function then loops through the array and updates the userStaked mapping with the new amount of EUL tokens staked. It also emits a Stake event to notify other contracts of the staking action. Finally, it transfers the EUL tokens from the user to the contract if the amount staked is positive, or from the contract to the user if the amount staked is negative. (autogenerated documentation)
stakeGift(address,address) :
This function allows a user to stake a certain amount of a given underlying asset to a beneficiary address. It requires that the amount is less than 1e36 and if the amount is 0, the function will not execute. The function then adds the amount to the userStaked mapping for the beneficiary and underlying asset, and emits a Stake event. Finally, it transfers the amount from the eul address to the address of the contract. (autogenerated documentation)
stakePermit(uint8,bytes32,bytes32) :
This function is used to allow a user to stake a certain amount of tokens to a specific address. It takes in an array of StakeOp objects, a value, a deadline, and three bytes32 values (v, r, and s) as parameters. It first calls the IERC20Permit function to permit the user to transfer the specified amount of tokens to the address of the contract. It then calls the stake function to stake the tokens to the specified address. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i euler-staking
copy icon

Last Publish

1/16/2023

Version

1.0.0

Creator

euler-xyz

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.