Content
@
0 reply
0 recast
0 reaction
Dan Finlay 🦊
@danfinlay
Has anyone written eth contracts where one token is continuously minted to the holders of another token? I know the GNO/OWL pattern (which only works when staked). Seems like doing it safely requires meticulous, maybe UTXO-like tracking of proportions & flow rates change. Any efficient solutions?
4 replies
10 recasts
109 reactions
xh3b4sd ↑
@xh3b4sd.eth
Do you need to send tokens every block or is it good enough when balanceOf returns the accurate result when being called?
1 reply
0 recast
2 reactions
Royal
@royalaid.eth
IDK if its possible but I think the best option would be something like delta + socialized rebalancing. I.e. every interaction with the contract updates the state to reflect the changes since the last update. All of that should allow atomic delta capture if you apply it to all state change events. Not sure on the gas impacts tho
0 reply
0 recast
0 reaction
briandoyle81 🌊🎩
@briandoyle81
Sorry, did some digging and no luck. From what I remember, they were doing it with two transactions - one to initiate the collection and one to claim rewards. I think they were simulating the over time part on the FE then doing the calculation onchain when the claim happened.
1 reply
0 recast
1 reaction
briandoyle81 🌊🎩
@briandoyle81
I'm jet lagged and am falling asleep but I talked to someone a few months ago who was doing this for a game. I'll try to find if I have any messages about it tomorrow.
0 reply
0 recast
2 reactions