I am trying to make a contract where users can deposit xyz token, admin adds more token ( yield ), when user withdraws, they get their token + some yield, based on how longer they invested and how much.

Basically, Its like :
Users deposits ETH in contract A.
Admin uses contract A's funds to flashloan and arbitrage,.
Users withdraws their token + earning from flashloan.

Is there any simple example contract available for somthing like this?

Also, If someone is interested in my project, they can DM me for info and maybe some vacancy.

Sep 22, 2022, 9:31 PM
You should have just said a staking Dapp
Lol
You will find some on google
GitHub repos
Sep 22, 2022, 9:33 PM
Thanks
What about a token which generates interest ( no need to claim rewards, once redeemed, it should give ETH )
Example :
1. Deposited 10 ETH, got 10 iETH
2. Waited 10 DAYS
3. Redeemed 10 iETH, got 10.5 ETH

( Something like Lido )

Liquid Staking token.

Is there any simple liquid staking token example where there is no proxy contract and nothing else in between ?
Lido does that.

But Lets say I generate those 0.5 eth by flashloaning and making profits...
For the sake of simplicity, lets say, admin sends 0.1 eth everyday in the contract from his own wallet ( donation )...

day 1 :
Total ETH : 10 ETH
iETH Supply : 10 iETH

day 2 :
Total ETH : 10.1 ETH
iETH Supply : 10 iETH
Redeem rate : 1.01

day 5:
Total ETH : 10.5 ETH
iETH Supply : 10 iETH
Redeem rate : 1.05

day 10:
Total ETH : 11 ETH
iETH Supply : 10 iETH
Redeem rate : 1.10
I think its called as Rebase token maybe ?

Redeem rate = UnderlyingETH/TotalTokenSupply

100 ETH / 100 iETH = 1
100.5 ETH / 100 iETH = 1.005
101 ETH / 100 iETH = 1.01

500 ETH / 375 iETH = 1.33
Sep 22, 2022, 9:59 PM

© 2024 Draquery.com All rights reserved.