Profile of codeislight in ApeCoin
Posts by codeislight
-
AIP-208: Reflecting on AIP161 Feedback and Revising Proposed Reward
by codeislight - Accepted AIP Author
Posted on: March 16, 2023, 6:07 a.m.
Content: Thank you @Hangout , it’s great how much ETH it has saved since then, i am grateful for the opportunity however it goes. Nonetheless, it made a big impact, that’s what matters the most :heart:
Likes: 3
Replies: 0
No replies yet.
-
AIP-208: Reflecting on AIP161 Feedback and Revising Proposed Reward
by codeislight - Accepted AIP Author
Posted on: Jan. 20, 2023, 12:53 a.m.
Content: The proposal is a review of the reward proposed on AIP 161 for the gas optimizations contribution to the ApeCoin staking contract which made it more efficient and saved users on extra gas fees. For live data, you may refer to the Dune dashboard.
Likes: 2
Replies: 0
No replies yet.
-
AIP-208: Reflecting on AIP161 Feedback and Revising Proposed Reward
by codeislight - Accepted AIP Author
Posted on: Jan. 19, 2023, 6:44 p.m.
Content: Thank you Chris, I couldn’t have done it without you, you were the one who brought Horizen Labs attention to the gas optimizations back then. I extremely appreciate the kind-hearted support :heart:
Likes: 2
Replies: 0
No replies yet.
-
AIP-208: Reflecting on AIP161 Feedback and Revising Proposed Reward
by codeislight - Accepted AIP Author
Posted on: Jan. 19, 2023, 6:41 p.m.
Content: Thank you for the kind support :heart:, unfortunately, didn’t get the chance to hear those feedbacks early on in the forum. I could have made the changes back then. but it was a great experience after all :white_heart:
Likes: 3
Replies: 0
No replies yet.
-
AIP-208: Reflecting on AIP161 Feedback and Revising Proposed Reward
by codeislight - Accepted AIP Author
Posted on: Jan. 19, 2023, 9:57 a.m.
Content: Proposal Name: Reward request for staking contract gas optimizations contribution
Proposal Category: Aip, Voting, Treasury
Abstract
The gas optimization contribution that has taken place continues to serve and save users a significant amount of funds for gas fees on a daily basis, so far as of 4 th February, it has saved 80 +ETH (which is 5 . 5 % of the 3 years staking period) and expected to save a total of 1450 ETH+ in the total 3 years staking period, please refer to the Dune dashboard.
This proposal aims to review the proposed reward for AIP 161 , the feedback from the community was eye opening and insightful to shape the current proposal.
In summary, back when the staking contract was being audited through AIP 34 , I found multiple gas optimizations findings, which were shared with Immunefi and classified as out of scope, since they are only concerned about security findings. thereafter, due to the time scarcity to form an AIP and wait for it to pass to implement the gas optimizations and the mainnet launch was in the following 2 - 3 weeks. I decided to get it implemented by reaching out to Horizen Labs. which they were happy about the findings and implemented the findings at the last moments.
This proposal will set an example and a motivation for open source contributors to contribute to the DAO and obey by one of the main DAO’s guiding values:
“Collective Responsibility: We leave everything better than we found it.”
Author Description
Codeislight is a smart contract developer and a warden at Code 4 Arena. I joined the web 3 space in 2021 and have always been intrigued by complex decentralized systems and eager to learn, grow, and contribute in the field.
Lately, I have started to make open-source contributions and had the opportunity to come across the ApeCoin staking contract and contributed to make it much more optimized.
Motivation
The contribution that has been done has the best interest of the community at heart, and it is significantly saving on the cost to use the staking contract.
Rewarding open source contribution that benefits the DAO community, attracts and incentivize others to add value to ApeCoin and result in a net positive for the DAO.
Gas optimizations is an overall underestimated part of smart contracts, since it doesn’t impact the functionality or the security. The end user is the one that pays the price in extra unnecessary fees.
Rationale
A recap from last proposal, I had profiled the gas saving difference percentage between the unoptimized and optimized staking contract, it resulted in the following metrics:
The percentages were used in a dune dashboard to calculate:
the saved amount of fees so far.
the expected to be saved in 3 years based on the saved amount so far.
Based on the dune dashboard as of 4 th February 2023 :
it has already saved 80 + ETH in gas fees.
expected to save 1 , 450 + ETH in the total staking period of 3 years.
Reflecting on AIP 161 feedbacks, the community overall feels that:
The requested reward is excessive, that’s where this proposal will reduce the reward and explicitly specify the amount in the DAO’s native token $APE.
Others feels that it’s Horizen Labs responsibility to compensate and not the DAO, I have reached out to Dean - Horizen Labs CEO for comment. He responded with the following “You asked me to fwd your code along to our engineers. I did that. I have made no commitment beyond that.”, so they are considering that they were just a platform to aggregate the open source contribution and not willing to offer any compensation. Instead, I should propose it to the DAO.
The contribution goals have proved a full alignment with the DAO’s guiding values:
Boldness: We don’t shy away from the weird, the hard, or the new.
Equality: One APE equals one APE.
Transparency: Processes and decisions are shared openly with the community.
Collective Responsibility: We leave everything better than we found it.
Persistence: Success is an ouroboros, not a straight line.
So far the impact that it has made on saving users funds was great to observe, either way this proposal go, i am grateful for the opportunity to experience how is like to contribute to a DAO and very glad to meet many awesome and kind-hearted members that were very supportive from the early phase, when I had a hard time to reach out to Horizen Labs to share my findings.
Specifications
In gas profiling, hardhat-gas-reporter was used along with Hardhat unit testing setup to offer the right environment to profile the gas differences and reduction percentages on every function that the end users can use to deposit, claim and withdraw on all the 4 pools.
Dune platform was used to quantify the gas saved based on the percentages from the gas profiling table. It made it easy to determine based on the LIVE data on-chain the saved gas fees on each function separately and calculate the expected funds to be saved in 3 years.
Steps to Implement
Once this proposal pass, a 6000 APE$ can be rewarded to codeislight.eth
Timeline
NONE
Overall Cost
6000 APE$
Likes: 6
Replies: 0
No replies yet.
-
Feedback on AIP161
by codeislight - Accepted AIP Author
Posted on: Jan. 16, 2023, 7:50 p.m.
Content: It was quite harsh to be honest, especially when Horizen Labs CEO is totally ghosting me. I fixed their mess, they don’t even dare to care. Currently the value being accrued by the community that’s the best part that i am happy for. just fun to look at the dune dashboard and see how far the impact it has made. I do agree it could have gone better with asking for a concrete value instead of a NFT, i just admire the dream of having a BAYC, i tried to make it come true. but it’s fine. i will come back with an improved proposal. Let’s hope it make it through. Nonetheless, Thank you for the feedback and support! that’s the only thing that i am seeking this whole time and asking different people to get various perspectives on the matter.
–Code–
Likes: 3
Replies: 0
No replies yet.
-
Feedback on AIP161
by codeislight - Accepted AIP Author
Posted on: Jan. 16, 2023, 5:16 a.m.
Content: Hello Apecoin Community,
Thanks to everyone who casted their votes, i highly appreciate the support and critics. I am trying to look into the reasonings behind the members who voted “against” to improve, discuss and clear any confusion if there is any. Also, for the people who posted messages that the requested amount is a lot, they need to look into the actual impact and see for themselves how far it has saved users funds on the dune dashboard: 10 % of the funds affected is commonly used in bug bounties programs so it’s nothing new to the scene, I was able to quantify the impact that saves users on loss of funds upfront that what sets the difference.
dune.com
Optimized $Ape Staking Contract Stats ?
Blockchain ecosystem analytics by and for the community. Explore and share data from Ethereum, Polygon, BNB Chain, Solana, Arbitrum, Avalanche, Optimism, Fantom and Gnosis Chain for free.
Looking forward for your invaluable feedback!
–Code–
Likes: 5
Replies: 0
No replies yet.
-
Claim - history of my account
by codeislight - Accepted AIP Author
Posted on: Jan. 9, 2023, 10:27 a.m.
Content: Currently, the most straight-forward way is to look up your address in etherscan.io and search for transactions that has “Claim” in them under Method column. Once you click on any of those transactions, you would be able to see the claimed $APE amount.
–Code–
Likes: 7
Replies: 0
No replies yet.
-
AIP-179: NFTCG Generation 2 - ApeCoin DAO Physical & Digital Trading Card Game
by codeislight - Accepted AIP Author
Posted on: Dec. 11, 2022, 1:41 a.m.
Content: Hi, thank you for sharing this proposal. I’m wondering on regards storing key pair on NFC, what kind of procedure are being planned to store and securely sign ownership without having any security vulnerabilities, since it would be easy to steal the private key from an NFC, anyone who had any previous contact with the chip can claim ownership.
Likes: 6
Replies: 1
Replies:
- _Drebin: Hey codeislight,
Great question! I think this concept could perhaps use further explanation within the proposal itself as it sounds like you are thinking of the typical non-encrypted level 1 or level 2 NFC chips. While security issues would be an issue with that older form of tech, we are using NFC chips that are capable of generating and storing an ECDSA secp256k1 asymmetric key pair. This keypair has an exposed public key, but its private key cannot be extracted from the encrypted chip.
As a result, individuals who had previous contact with the chip may have a register of its public key, but they no longer have its private key. Hence, they can no longer claim ownership when the card is out of their possession.
Let me know if you have more questions on this concept!
-
Tresaury centeralization risk
by codeislight - Accepted AIP Author
Posted on: Dec. 8, 2022, 4:09 a.m.
Content: Thank you for the elaboration!
Likes: 2
Replies: 0
No replies yet.