nyx-haile / bluehour

bluehour project
0 stars 0 forks source link

Smart Contract Research #2

Open drecunning opened 2 years ago

drecunning commented 2 years ago

-Which DAO's & smart contracts are a good model to start from? -What editing of code / functionality is required? -Timeline & Resources? -Are there interim solutions?

nyx-haile commented 2 years ago

some quick answers, going to be doing a bunch of research tonight -will look into -dependent on the above, but that really depends on what sort of contracts we look into as our main interactions, did a bit of research into 0x and project wyvern which may actually be quite useful to us, but we can also potentially build a lot of these contracts out ourselves. -mentioned this in white paper but a beta by q1 (fully functional, maybe not graphically up to snuff) seems pretty reasonable (this can precede the full token launch and bluehour can just be airdropped or something) Acquiring funding is certainly one of the larger issues we need to look into

nyx-haile commented 2 years ago

when asked about it, one of my mentors said this

Have you considered only storing a Merkle-tree commitment to the data you want your onchain system to access, and requiring calls to the system to provide the data the system needs, along with Merkle proof(s) of that data? Storage of 32 bytes in ethereum costs 20,000 gas for a new storage location, and reading 32 bytes from storage costs 800 gas, but sending 32 bytes of parameters in an onchain call only costs 512 gas, so it's often possible to make significant savings that way.

nyx-haile commented 2 years ago

so essentially it's 512(134 -> current gas price)0.000000001*(Ethereum price) for 32 bytes of data (~27 cents at current prices)

nyx-haile commented 2 years ago

formatting is so annoying. There's some stars in there, but it should still make sense

nyx-haile commented 2 years ago

https://www.derpturkey.com/merkle-tree-construction-and-proof-of-inclusion/

nyx-haile commented 2 years ago

https://github.com/bitcoin/bips/blob/master/bip-0098.mediawiki

nyx-haile commented 2 years ago

Essentially, instead of my potential multi-token auth we can store each address, the amount of vB they staked, and potentially their percentage reward or other bonuses to verify this in the Merkle tree.

Every funded project should store a new Merkle tree on our end, I think, since otherwise there's not really any way to edit these trees without similar expenditure.

total expenditure per person should be in the 10^1(x) range (ie, 320 bytes or less), and comes out to less than 3 dollars if I've done my calculations right

on our end it's 20000 per project, so that's about 10 dollars per.

it's a much more optimal solution than the other one I mentioned.

Of course I'm still looking into off-chain solutions, especially polygon. We can talk more about this when we meet.