Skip to content

Commit

Permalink
decentralized nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
bithalo committed Nov 15, 2024
1 parent 441ac36 commit f3a5f3b
Show file tree
Hide file tree
Showing 12 changed files with 14,866 additions and 278 deletions.
16 changes: 6 additions & 10 deletions DDE.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ interface ERC20 {
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
}

interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
Expand Down Expand Up @@ -71,7 +70,7 @@ contract TwoPartyEscrow {
receive() external payable {
assert(msg.sender == WETH);
}
//If no affiliate is set, the fee is burned with up to .1% added to encourage using the system
//If no affiliate is set, the fee is burned with up to .5% added to encourage using the system
function changeAffiliate(address affiliate) public {
require(completed[affiliate][2] >= 10); //Active users of the markets are the ones to promote it
require(affiliate != address(0));
Expand All @@ -90,7 +89,7 @@ contract TwoPartyEscrow {
}
function changeFee(uint newfee) public {
require(msg.sender == minter);
require(newfee >= 0 && newfee <= 100); //1% maximum
require(newfee >= 0 && newfee <= 500); //5% maximum
affiliateFee = newfee;
}
function changeThreshold(address token, uint newfee) public {
Expand Down Expand Up @@ -320,7 +319,7 @@ contract TwoPartyEscrow {
} else {
recipient = msg.sender;
}
} else {
} else {
if(sender == address(0)) {
newContract.status = [uint(1),uint(0)];
sender = msg.sender;
Expand Down Expand Up @@ -485,13 +484,10 @@ contract TwoPartyEscrow {
total = ((contracts[hash].amount) * afee) / 10000;
userBalance[theReferred][contracts[hash].token] += total;
} else {
if(afee > 100) {
afee = 100;
}
if(afee < 90) {
total = ((contracts[hash].amount) * (afee + 10)) / 10000;
if(afee < 450) {
total = ((contracts[hash].amount) * (afee + 50)) / 10000;
} else {
total = ((contracts[hash].amount) * 100) / 10000;
total = ((contracts[hash].amount) * 500) / 10000;
}
userBalance[address(0)][contracts[hash].token] += total;
}
Expand Down
22 changes: 22 additions & 0 deletions extractedText.txt
Original file line number Diff line number Diff line change
Expand Up @@ -523,4 +523,26 @@
"Orders should not contain links, sex, violence, fraud, drugs, weapons, insults, etc.": true,
"Images should not contain links, QR codes, sex, violence, fraud, suggestive images or text, drugs, weapons, etc.": true,
"You are a node. You will automatically check new offers with AI and post the results to the blockchain. Please always ensure you have sufficient funds to post your updates to the markets.": true
}
{
"59":{"#en": "Network/API options"},
"39":{"#en": "Detect nodes automatically"},
"All of the code is open source under the 'Coinleft Public License for BitBay' which is a license that allows users free use of the software without granting them commercial rights to create a competing project by copying the code. If such an act was to be taken it must be negotiated with the BitBay community which would result in an airdrop or profit share to its users. This helps BitBay maintain it's competitive advantage in the industry while letting users fully validate the code itself. The code has also been audited multiple times and those reports are published on Github. Users and companies should continue to audit it proving it's safety.": true,
"Detect nodes automatically": true,
"Register API Keys": true,
"You already have API keys saved would you like to remove them and make new ones? If not you will stay with the current keys.": true,
"Success": true,
"Error": true,
"API keys saved": true,
"Please fill out all fields": true,
"Are affiliates assigned by default?": true,
"The choice of which affiliate to be used is up to the user and may be changed at any time to any valid affiliate. Users who do not choose an affiliate will pick one at random from the community of nodes and top affiliates. Any highly active and trusted user can reach out to become a node and help run the markets. Some nodes may choose to not be an affiliate if they wish to moderate and post data for free. Everything is about freedom of choice among all users.": true,
"Who run the nodes and how can I become a node?": true,
"Any user can become a node to assist in checking offers with artificial intelligence and they also assist by posting order data to IPFS. These node users should also be affiliates so they may get compensated for handling the traffic. The code to become a node is open source and hosted on the official Github. Please contact the community on social media for more information.": true,
"How can nodes prevent DDOS and bots?": true,
"Fortunately, every user has a public key for encryption which can be used to verify their requests like an API key. Nodes will have different rate limits based on the amount of funds deposited and requests allowed per week. This prevents spam because it validates every genuine user.": true,
"In order to interact with nodes and users it is requested that you register a separate encryption key so requests can be validated and secured. Also at this time it is highly recommended to register contact information such as an email address so users may contact you when involved in a contract. Would you like to do that now?": true,
"How would you like to connect to validate orders using AI?": true,
"Enter your 'Session Key' which is shown when you load your local server.": true,
"Session Key cannot be blank": true
}
8 changes: 7 additions & 1 deletion faq.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
Loading

0 comments on commit f3a5f3b

Please sign in to comment.