4

想找一份可以通过token铸造nft nft可以反过来产出token的合约学习一下 链游的 也可以...

 3 years ago
source link: https://learnblockchain.cn/question/2802
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

100 想找一份可以通过token铸造nft nft可以反过来产出token的合约学习一下 链游的 也可以

上次找质押挖矿的 貌似还是没有找到
类似bnx那种随时间区块而更新的机制 不知道怎么实现的
希望以后能够明白

最佳答案 6小时前

质押挖矿这个简单,用户质押时记录质押金额和当前区块高度,计算质押奖励公式:
(当前区块高度 - 质押时区块高度) / 每年产生区块数量 * 年化率 * 质押金额

用户存款和提款的时候都要执行一次 claim 操作。合约可以参考这个:https://cn.etherscan.com/address/0x1fe9ae5280f95cf60e5df314e9a1cb0bd320338d#code

感谢大佬 那 nft和token 交互的合约有吗 谢谢

  • 23小时前
采纳率 47% | 回答于 1天前

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK