porter-finance / v1-core

⛰️ Smart contracts powering the Porter protocol.
https://porter.finance
GNU Affero General Public License v3.0
4 stars 3 forks source link

Fill out issue exploring description on chain #9

Closed RusseII closed 2 years ago

RusseII commented 2 years ago

Should we store description on chain?

https://ethereum.stackexchange.com/questions/11556/use-string-type-or-bytes32

Gas cost is 20k gas per 32 characters.

Example: It would be 140k gas to store this on chain:

Bribe Protocol aims to revolutionize dGov with incentivized protocol participation. Improving upon current DAO governance models, Bribe coordinates voters into powerful coalitions up for auction by a highest bidder.

(215 characters / 32) = 6.7 rounded up is 7 (20k gas * 7) = 140k

@ 100 gwei 100k gas = .01 eth 1m gas = .1 eth 10m gas = 1 eth

Pros

Cons

Pet3ris commented 2 years ago

Yeah descriptions on-chain are helpful. Governance proposals even host long-form markdown text on-chain so you wouldn't be the first one.

RusseII commented 2 years ago

@Namaskar-1F64F would we want to store these descriptions in the bonds themselves,