There is only one person with liquidity

There is only one person with liquidity on Spectrum. To have them not lose their ERGs in liquidity they need to withdraw before we send refund ERGs. Furthermore, anyone with hodlErgs in contracts might be problematic. I will be heading to sleep, I would appreciate if the community could come to a consensus on what to do and I will just follow that through when I am awake. I propose that we wait until 100% of the hodlERGs are in p2pk before sending ERGs back OR if a check can be done to ensure hodlErgs tokens are secure in the hodlCoin contract then we put all ERG in a contract that people can redeem on their own using their hodlErgs (if we chose this could we get this contract built asap?) Please discuss the options, I dread holding the ERGs any longer than needed.
101 Replies
Luca D'Angelo
Luca D'Angelo3y ago
I rewrote the contract in a way that is in imo a lot more professional and easier to read then what a lot of ergo contracts look like in the ecosystem, it is my own personal standard. It should be more easier to spot problems: https://github.com/lucagdangelo/hodlcoin-contracts/blob/contract-rewrite/hodlERG.es
GitHub
hodlcoin-contracts/hodlERG.es at contract-rewrite · lucagdangelo/ho...
Contribute to lucagdangelo/hodlcoin-contracts development by creating an account on GitHub.
Luca D'Angelo
Luca D'Angelo3y ago
I included the fix from pulsarz There is no miner fee check, though not sure if this is by design or not Also another problem is since there is no indication of user input/output it is not guaranteed that user will get exactly the hodlerg they pay for. One could manipulate the way the tx is built similar to the issue with the bank reserves. @qx() @MGpai any thoughts?
qx()
qx()3y ago
@kb the person for LP came forward but too late, their 900+ is gone. they also did some swaps because they thought they were helping someone who made a bad swap...they are taking as much erg back as they can from pool and will sit tight. so as a holder they will have less hodl than they should, we should be able to verify the right amount from the mint. just wanted to put in chat that current snapshots should not be used for airdrop but only for comparing to the mint adddresses/amounts if u need help with multiple people deriving a list and amounts let me know, some of us can each run our own methods and compare
MGpai
MGpai3y ago
We should probably take a snapshot after the block of @kb 's exploit
Luca D'Angelo
Luca D'Angelo3y ago
other exploit found, for burning, the tx does not inforce all user input tokens get burned, so whoever builds tx could send some hodlerg to themselves
MGpai
MGpai3y ago
I think the best way to distribute is to put 90k erg in @Luca D'Angelo 's revised contract As for the LP lost perhaps make a raffle How many addresses lost LP? @qx()
Luca D'Angelo
Luca D'Angelo3y ago
im working on implementing the errors i found
MGpai
MGpai3y ago
Do the same checks we do for lilium contracts Enforce miner fee Enforce outputs size Very simple to have a secure contract
qx()
qx()3y ago
didn't look yet i think it was just the one provider and then he did a swap again after the drain in a misunderstanding kushti just compensated the LP provider it looks like to clarify, compensated on the lost erg in the LP, not the hodl coin he originally had, we will need to make sure that he gets the erg from that with everyone else it the contract or drop if you do a contract you have to whitelist now oh your token method but if you're going to airdrop a token to original minters, why not just airdrop the erg and be done with it
Luca D'Angelo
Luca D'Angelo3y ago
well a new contract is needed anyway for the actual protocol, so i will go as far as i can with that and make a pr to the project repo. prob best to just airdrop the erg now anyway as you say this dapp interacts directly with your wallet so it makes writing strict conditions more difficult since you never know how many input boxes you need and if there will be a change box or not. this is why proxy contracts idea was developed.
MGpai
MGpai3y ago
Use my loop
Luca D'Angelo
Luca D'Angelo3y ago
hmm i think this protocol should be redesigned to use a proxy contract for the user, there are too many edge cases now ill write it assuming there is only one user input and one user output then the creator can use it as reference for a proper rewrite with a proxy contract other error: when devs withdraw fee, no one is paying the miner fee
MGpai
MGpai3y ago
Do it I can easily add it to lilium off chain framework
Luca D'Angelo
Luca D'Angelo3y ago
this is not my project tho so idk what they want to do
MGpai
MGpai3y ago
Let's fork it :dopamineduck:
Luca D'Angelo
Luca D'Angelo3y ago
i did, that is how i am doing updates but i dont want to steal project, im just helping out
MGpai
MGpai3y ago
I mean let's run it on our own Proxy is the most secure
Luca D'Angelo
Luca D'Angelo3y ago
i guess it depends how much responsibility @Pulsarz wants to take and if he wants to redesign this and see it through to develop it properly
MGpai
MGpai3y ago
This is perfect for decentralized bots
Luca D'Angelo
Luca D'Angelo3y ago
yes i agree we should develop properly and we can run our own bot
MGpai
MGpai3y ago
True I don't mind it bc it's not too much work
Luca D'Angelo
Luca D'Angelo3y ago
yes and good for community lets call the bot phoenix
MGpai
MGpai3y ago
Also not using proxy doesn't scale at all
Pulsarz
Pulsarz3y ago
I agree This really turned into a disaster
MGpai
MGpai3y ago
I original didn't want proxy for lilium But then I realized after thinking through If many people mint at once then there isn't a way to get the latest box
Pulsarz
Pulsarz3y ago
But then again this was supposed to be a low interaction contract, it doesnt have to scale that much
MGpai
MGpai3y ago
Then txns will fail
Pulsarz
Pulsarz3y ago
Yes this happened at start, 2x same box spent
Luca D'Angelo
Luca D'Angelo3y ago
90000 ERG is not low interaction
MGpai
MGpai3y ago
^
Pulsarz
Pulsarz3y ago
Was talking amount amount of interactions per day. But anyway, damage is done.
Luca D'Angelo
Luca D'Angelo3y ago
Like any professional engineer, when dealing with peoples lives, in this case their money, it is our responsibility to design and build things that are safe. In any other engineering discipline, engineers are held legally liable for mistakes. CS people get off the hook to easy imo Are you interested in redesign?
Pulsarz
Pulsarz3y ago
The more I am digesting it the less I want to continue with it. As you can probably understand. We rushed it for summit, thats the tldr. I am happy to continue the frontend work and any changes needed, but not the SC
Luca D'Angelo
Luca D'Angelo3y ago
Fair enough, though redemption is good for the soul and character.
Pulsarz
Pulsarz3y ago
Well it all depends on what you guys/community want I really have no say here I want the idea to continue, its a great one. I did not expect 90k erg tvl in a day. That was crazy.
Luca D'Angelo
Luca D'Angelo3y ago
Yeah i think it is cool that our community has a "legit" degen protocol
Pulsarz
Pulsarz3y ago
Lets just say I dont feel safe deploying any contract without multiple peoples contributions and reviews. As you can imagine
MGpai
MGpai3y ago
Don't be discouraged from SC development I started on testnet lol
Pulsarz
Pulsarz3y ago
I learned a lot, ergoscript itself is not that hard Edge logic cases are Deploying to mainnet at this stage was a mistake
MGpai
MGpai3y ago
Just be careful of not specifying outputs Legit thats it lol
Pulsarz
Pulsarz3y ago
Im just happy it was Krass that drained it.
MGpai
MGpai3y ago
Yes!!!
Pulsarz
Pulsarz3y ago
Even I had a good chunk of my ergs in. Not that that matters Anyway, lets just say if tou guys want my involvement in anything I am happy to contribute, but not pull the project. Im sure Bruno is as well, we have been talking in private chat. This was a hard lesson. All I can say is sorry. Also respect for duckpools contracts, I cannot imagine the stress with writing that. Thats scary.
Luca D'Angelo
Luca D'Angelo3y ago
So mgpai and I will work on proxy, bank contract, and bot. Frontend will only need to send exact amounts to proxy.
MGpai
MGpai3y ago
^
Pulsarz
Pulsarz3y ago
Happy to make any changes needed when Im back from vacation
Luca D'Angelo
Luca D'Angelo3y ago
yes, i read their contract breifly a few weeks ago. frankly it has the same problem as your contract in the sense of the structure it is written and many contracts on ergo are written. these complicated contracts need to be written more professionally instead of just dumping a bunch of conditions on each line
Pulsarz
Pulsarz3y ago
(Oh the joy)
MGpai
MGpai3y ago
He has the best method of writing contracts Makes it incredibly easy to debug Liliim has around 10 contracts Probably over 1k lines of ergoscript Couldn't have done it without @Luca D'Angelo
Pulsarz
Pulsarz3y ago
@Luca D'Angelo I saw your comment a out miner fee on withdrawal, but I fail to see the problem. I'd like to understand Idea was the user executing it paid the fee. Thus no check needed
Luca D'Angelo
Luca D'Angelo3y ago
bc no check is there, you put all the power in whoever builds the tx. you could take more input from the user, make the miner fee less and send leftover erg somewhere else
Pulsarz
Pulsarz3y ago
Fair, but that is a different category problem. But yes still a problem.
MGpai
MGpai3y ago
Biggest thing is frontrunning Tx operator could build to get incentive erg Then someone could hijack it with a larger fee to get incentive
Pulsarz
Pulsarz3y ago
I am humbled after today
MGpai
MGpai3y ago
Ehh you find out after playing around with it
Pulsarz
Pulsarz3y ago
But not with 90k ergs
MGpai
MGpai3y ago
It happend to me with comet lottery
Luca D'Angelo
Luca D'Angelo3y ago
for dev fee withdrawal, nobody pays miner fee too since it is not clear what any inputs should be other than the bank
Pulsarz
Pulsarz3y ago
I was scared when people started putting in 10ks of ergs Degens
MGpai
MGpai3y ago
:lmao:
Pulsarz
Pulsarz3y ago
Not doing anything again this size anytime soon. I cant. And my apologies for the work you guys had to put in to secure user funds.
qx()
qx()3y ago
really, lots of things learned today across devs and degens, people will still be excited for a new release and that more people are involved looking over the SC!
kb
kbOP3y ago
I am fairly sure I recorded the holders on hodlErg with my script last night Any issue with just using that? If LP has been compensated for ERG side then we can just compensate them on hodlErg side Can compare to any lists you guys have made I presume the second exploit was malaicious
qx()
qx()3y ago
Will compare in a bit before bed. Then at least a compare effort was made. I was thinking about that. Might not have been. If site was up still. Could have just been an opportunist with not much of a conscious. If they did it headless and built their own tx then yah fo sho. It went to a new address tho which is usually a dead giveaway they knew what’s up. I think lgd said it was a built tx too. So makes sense to conclude malicious yah. But to send hodl to people today was weird. Not sure what was going through his head. Different amounts too. @kb i did a compare on your and my data
qx()
qx()3y ago
Google Docs
hodl-redis
compare qx today,qx today 7/3/23 10pm UTC,kras last night,kras last night 5vSUZRZbdVbnk4sJWjg2uhL94VZWRg4iatK9VgMChufzUgdihgvhR8yWSUEJKszzV7Vmi6K8hCyKTNhUaiP8p5ko6YEU9yfHpjVuXdQ4i5p4cRCzch6ZiqWrNukYjv7Vs5jvBwqg5hcEJ8u1eerr537YLWUoxxi1M4vQxuaCihzPKMt8NDXP4WcbN6mfNxxLZeGBvsHVvVmina5THaECosCWozKJFB...
qx()
qx()3y ago
my total: 96777 your total: 87309 hope this helps, i didn't get a chance to write the mint scripts yet but i think these two data points give a decent enough picture for you to be able to make an informed decision. IF MGpai gives me his data i can do a three way compare.
kb
kbOP3y ago
Not sure why yours is so much, especially since don't all the differences in mine seem to be more than yours? There is only 90.3k ERG btw
qx()
qx()3y ago
90k ergs?
kb
kbOP3y ago
Mine with your +2k and and LP manual sending would hit 90k
qx()
qx()3y ago
mgpais script above showed 97k at time of your liquidation from ergowatch
kb
kbOP3y ago
Well I aint paying the extra 7 lol There was only 90k in the contract
qx()
qx()3y ago
hahahahaha those spots must have minted free before site was shut down then
kb
kbOP3y ago
Are there any addresses in your list not in mine?
qx()
qx()3y ago
the ones i have and your data doesn't then
kb
kbOP3y ago
Or was it just differences in balances Oh the blue ones!
qx()
qx()3y ago
yeah blue ones sorry ijust colored
kb
kbOP3y ago
Yeah those blue ones make up like 7k
qx()
qx()3y ago
im guessing those were free mints from when u LQ'd and i snapshotted
kb
kbOP3y ago
Free mints?
qx()
qx()3y ago
when u pulled ergs it went down to very cheap to mint hodls on the site apparently until it was shut down
qx()
qx()3y ago
shit you're right lemme look up the contents of those blue ones manually sec maybe my script effed up checks out 9g8kB1gxgHvPHyPsbBwvDhrawP5R8XG7Q4fPqy3ap3ykAcXe91y received 4281.76675 hodl
qx()
qx()3y ago
No description
qx()
qx()3y ago
oh that fucker that's at 14:00 hours that means he sent random hodls to a couple people before he did the mass sends lemme check the other blues on times row 113 bought it from the spectrum LP row 112 got it sent to them from row 113's wallet row 108 got it from spectrum
kb
kbOP3y ago
Yeah you will need to scan before the tokens were taken < 1039186
qx()
qx()3y ago
all my blues are from after the others match with you except for the 2 erg at bottom
kb
kbOP3y ago
My scan is about: 1038950 and I am quite confident with it
qx()
qx()3y ago
looks good to me ser i think due diligence was done
kb
kbOP3y ago
But from 1038950 to 1039186 maybe people were interacting with spectrum So I would kind of prefer the more updated one
qx()
qx()3y ago
yup
kb
kbOP3y ago
Hq did it at 1039186 so theirs is likely correct. I think if we just remove the entry they allocated to the dex address it would be correct But yeah just need a json file to look properly really/ use to actually send on node
qx()
qx()3y ago
ser, u have access to ur tipper bot on here or tele (i noticed it made you a new one on tele) ser, no ignoring me plz ok, ill hit you on discord main side then, off to bed, i hope others follow suit
Pulsarz
Pulsarz3y ago
Site was unuseable at that point.
qx()
qx()3y ago
ok cool...from what i saw in what i just looked up it was people using spectrum
Pulsarz
Pulsarz3y ago
Did that guy really send hodlerg to everyone just to fuck with this? Thats sad
qx()
qx()3y ago
it seems like it weird numbers too
Pulsarz
Pulsarz3y ago
Will go over new contracts in a bit. Least I can do is learn from this. Did you consider the dust that will occur at treasury contract?
Luca D'Angelo
Luca D'Angelo3y ago
You mean the fee contract?
Pulsarz
Pulsarz3y ago
Yes That was the main reason we decided to go with a register, just checking.
Luca D'Angelo
Luca D'Angelo3y ago
We have not written the fee contract yet but the contract could allow box consolidation, like the tx would include multiple input fee boxes
MGpai
MGpai3y ago
^

Did you find this page helpful?