Author

Topic: honeypot contract (Read 129 times)

newbie
Activity: 62
Merit: 0
March 10, 2022, 12:16:15 PM
#8
For example; Can honeypot be used in the Voting System?
you take it once and then you can't take it back.



A honeypot is a smart contract that pretends to leak its funds to an arbitrary user (victim), provided that the user sends additional funds to it. However, the funds provided by the user will be trapped and at most the honeypot creator (attacker) will be able to retrieve them. a honeypot operation consists of a computer, applications and data that simulate the behavior of a real system that would be attractive to attackers, such as a financial system, internet of things (IoT) devices, or a public utility or transportation network.
newbie
Activity: 62
Merit: 0
March 10, 2022, 12:10:52 PM
#7
can honeypot contracts be opened for sale later? After the contract is created?



Hello, I am nodejs software developer. I'm learning solidity. I'm beginner level.

I have seen a lot of honeypot contracts, what is the logic of their operation? Are there any places where it is used other than rug-pull? Is it completely made to defraud people?
Is there a contract similar to this one? I would like to examine.

(if the relevant topic is prohibited, I can remove it.)


99.999% of the time it is as you said for a rug-pull / rip off.
I can only think of 1 reason to use one and it would have to be disclosed up front and the people sending funds to it would have to be aware of why it's being done.
However, I don't think anyone has ever used it that way as there would be better ways of doing it.

Essentially it would be for a no back out purchase that would be issued only after it's all done and then could only be calculated after the fact.

-Dave
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
March 10, 2022, 10:30:05 AM
#6
Hello, I am nodejs software developer. I'm learning solidity. I'm beginner level.

I have seen a lot of honeypot contracts, what is the logic of their operation? Are there any places where it is used other than rug-pull? Is it completely made to defraud people?
Is there a contract similar to this one? I would like to examine.

(if the relevant topic is prohibited, I can remove it.)


99.999% of the time it is as you said for a rug-pull / rip off.
I can only think of 1 reason to use one and it would have to be disclosed up front and the people sending funds to it would have to be aware of why it's being done.
However, I don't think anyone has ever used it that way as there would be better ways of doing it.

Essentially it would be for a no back out purchase that would be issued only after it's all done and then could only be calculated after the fact.

-Dave
newbie
Activity: 62
Merit: 0
March 10, 2022, 08:33:04 AM
#5
they just change the transfer code as above. am I getting this right?



if I run the above functions on the zeplin inside interface , I think I will get a honeypot contract.
legendary
Activity: 2758
Merit: 6830
March 10, 2022, 08:26:46 AM
#4
So, after compiling this code and creating the contract, the owner can change the wallet and write it on the same contract?

So can it be changed to total suply or ownership afterwards?
No. Read what require() does and what modifiers are on Solidity and then just read my code. The logic is quite simple.
newbie
Activity: 62
Merit: 0
March 10, 2022, 08:15:41 AM
#3
One I've seen a few times is the contract of a modified ERC20 token where an EOA (Externally Owned Address) can disable swaps from any address other than his own by calling a function.

Something like this:

Code:
address owner = MY_ADDRESS;
bool isHoneypotActivated = false;

modifier onlyOwner {
  require(msg.sender == owner);
}

function transfer(address _to, uint256 _amount) public {
  require(msg.sender == owner || isHoneypotActivated == false);
  // NORMAL ERC20 TRANSFER BELOW
}

function enableHoneypot() onlyOwner public {
  isHoneypotActivated = true;
}


When isHoneypotActivated is true, which happens after the owner (me) calls enableHoneypot, no one else will be able to transfer the tokens (i.e to sell).



So, after compiling this code and creating the contract, the owner can change the wallet and write it on the same contract?

So can it be changed to total suply or ownership afterwards?
legendary
Activity: 2758
Merit: 6830
March 10, 2022, 07:58:03 AM
#2
One I've seen a few times is the contract of a modified ERC20 token where an EOA (Externally Owned Address) can disable swaps from any address other than his own by calling a function.

Something like this:

Code:
address owner = MY_ADDRESS;
bool isHoneypotActivated = false;

modifier onlyOwner {
  require(msg.sender == owner);
}

function transfer(address _to, uint256 _amount) public {
  require(msg.sender == owner || isHoneypotActivated == false);
  // NORMAL ERC20 TRANSFER BELOW
}

function enableHoneypot() onlyOwner public {
  isHoneypotActivated = true;
}


When isHoneypotActivated is true, which happens after the owner (me) calls enableHoneypot, no one else will be able to transfer the tokens (i.e to sell).
newbie
Activity: 62
Merit: 0
March 10, 2022, 07:43:45 AM
#1
Hello, I am nodejs software developer. I'm learning solidity. I'm beginner level.

I have seen a lot of honeypot contracts, what is the logic of their operation? Are there any places where it is used other than rug-pull? Is it completely made to defraud people?
Is there a contract similar to this one? I would like to examine.

(if the relevant topic is prohibited, I can remove it.)
Jump to: