Content pfp
Content
@
0 reply
0 recast
0 reaction

Dan Finlay 🦊 pfp
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
11 recasts
125 reactions

briandoyle81 🌊🎩 pfp
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

Dan Finlay 🦊 pfp
Dan Finlay 🦊
@danfinlay
I could see splitting those up as being necessary to make sure the operation can be split up across blocks if needed. Yeah doing the live estimation on FE & enforcement onchain is how I'm imagining too. I probably have a general approach that's decently effective now.
1 reply
0 recast
1 reaction

briandoyle81 🌊🎩 pfp
briandoyle81 🌊🎩
@briandoyle81
I guess the tricky bit is whether or not you're using tokens you control for the held tokens. If you are, you could use the update function to timestamp balance changes per address. If not, I guess you'd have to use an offchain BE to calculate it.
0 reply
0 recast
0 reaction