From f3a5f3b61567a568cee3b1290e14197ee5af728c Mon Sep 17 00:00:00 2001 From: bithalo <> Date: Fri, 15 Nov 2024 05:44:48 -0800 Subject: [PATCH] decentralized nodes --- DDE.sol | 16 +- extractedText.txt | 22 + faq.js | 8 +- index2.html => index-1.html | 0 index-3.html | 11423 ++++++++++++++++++++++++++++++++++ index.html | 1384 +++- manifest.json | 6 +- node/index.html | 48 +- node/server.py | 1 + swal-dark.css | 1126 ++++ swal-minimal.css | 1105 ++++ translate.js | 5 +- 12 files changed, 14866 insertions(+), 278 deletions(-) rename index2.html => index-1.html (100%) create mode 100644 index-3.html create mode 100644 swal-dark.css create mode 100644 swal-minimal.css diff --git a/DDE.sol b/DDE.sol index e78af84..4106031 100644 --- a/DDE.sol +++ b/DDE.sol @@ -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); @@ -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)); @@ -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 { @@ -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; @@ -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; } diff --git a/extractedText.txt b/extractedText.txt index b21c0a9..c4eb087 100644 --- a/extractedText.txt +++ b/extractedText.txt @@ -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 } \ No newline at end of file diff --git a/faq.js b/faq.js index 84664ba..3afb7fe 100644 --- a/faq.js +++ b/faq.js @@ -19,6 +19,12 @@ myfaq=[ "Users become an affiliate by using the markets. They only need to make sure the deals they do pay above the minimum threshold and that they do enough deals to qualify. There may be a 'cool down' between deals to guarantee they are not bots. Once an affiliate is assigned to someone's account the affiliate profits off of every deal they do. A user can choose to change their affiliate at any time. An affiliate that is assigned to a specific deal is locked into the deal to profit if it completes. Cancelled deals do not have to pay any affiliate. To avoid conflict of interest, the buyers affiliate is the one who gets the fees.", "Are users forced to choose an affiliate?", "If a user does not choose an affiliate they may pay a very small penalty and the affiliate fee is burned. The burning of the fee guarantees that the markets are ownerless and that users are the ones who get to choose. If a user visits an affiliate link and they already have an affiliate assigned, the user will pay the affiliate at the link. The system attempts to be as fair as possible.", + "Are affiliates assigned by default?", + "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.", + "Who run the nodes and how can I become a node?", + "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.", + "How can nodes prevent DDOS and bots?", + "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.", "How can ownerless markets be moderated?", "It is strongly believed that users should self moderate. This can be done using artificial intelligence which can read offers that are posted and can let users filter them based on some criteria. This ensures the responsibility falls on the users themselves and dramatically reduces costs while increasing the safety of the markets. Actually we believe this is the perfect architecture for an internet that protects free speech while also letting users choose what they decide is false instead of having others choose for them.", "Who is responsible for what users post?", @@ -54,7 +60,7 @@ myfaq=[ "What happens if I forget my password or lose my account?", "There is no account recovery. So please be sure you are able to back up any relevant keys or passwords. The security advantage to blockchain is that your funds are perfectly safe and never shared with anyone.", "Is this code open source?", - "All of the code is completely free and open source under the 'Coinleft Public License for BitBay'. 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.", + "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.", "What is the safest way to access this site?", "The most secure way to access this page is to download it's source code from Github and run it locally. This way nobody on earth can change the code as you have a hard copy.", "When should users automatically accept offers?", diff --git a/index2.html b/index-1.html similarity index 100% rename from index2.html rename to index-1.html diff --git a/index-3.html b/index-3.html new file mode 100644 index 0000000..278af37 --- /dev/null +++ b/index-3.html @@ -0,0 +1,11423 @@ + + + + + + + + + + + + + + + + + +
+ + + + + + +Please connect metamask
+Not connected
+Welcome to the world of unbreakable contracts. These are two party escrow(double deposit) contracts that cannot be broken and require no 3rd party arbiters. Both users place a customizable deposit along with a payment into a joint account. If the deal goes well they both sign off on it. If one party tries to defraud the other the deal will eventually expire and blow up making it so that nobody wins and theft is profitless. This forces the users to be honest and follow through with their agreements since they either win together or they lose together.
+ + + +The markets themselves run on top of Solidity chains such as Ethereum and Polygon. Offers can range from goods, services, barter and p2p trading. Since this webpage is fully open source and runs on the client side, the user can also download this code from github and run it locally for even greater security. This protocol which was pioneered by BitHalo back in 2014 predated Ethereum and was the worlds first smart contracts. This is a web based interface for fully decentralized markets.
+For selling goods, users will definitely want to consider a drop shipping service or a service that provides discount shipping to compete with the shipping rates typically found in major companies. To do this, you should sign up for a 3rd party shipping account which should allow you to save up to 75% in shipping in some cases. Sellers may also charge buyers for shipping while in escrow and buyers should be careful to make sure the amount doesn't exceed the deposits or that they buy the shipping label themselves. Users should try to keep in communication with each other through the escrow process and it's recommended to have a backup of your keys so both parties are protected during escrow. Although these markets could be moderated through AI(such as webgpt) and community driven moderation, users are entirely responsible for the risks of what they post and for their own escrows. With that in mind, it's strongly recommended to not post content that is illegal in the country you reside. For deals that involve cash users should do their own due dilligence and their own 'know your customer' if needed. It's in everyones best interest to use double deposit escrow to get rid of deception in the world of international commerce and services. It is an advantage when users administrate contracts themselves because arbiters are unable to know the truth of a deal ruling unfairly and can collude causing great losses and they also incur a greater cost. Users are forced to work with each other to achieve a desirable outcome. Users are also the ones who host the offers using IPFS. So it's good practice to run your own IPFS node to archive the markets. It's recommended that you register your contact information to the blockchain. This makes it guaranteed that counter-parties in the contract know how to contact you for any questions about the negotiations. The code may be run locally and can also be audited by visiting the github page where the code and website are hosted. This system is ownerless and entirely free to use. However, there is a setting that can be activated for affiliates/referrals which can range from 0-1%. In order to encourage users to engage with affiliates, the fee is burned if it is not paid to an affiliate. This helps market the system by giving users a way to earn. A user of the markets is automatically an affiliate if they complete 10 deals. That allows them to use the markets for free if they choose to(as they can be their own affiliate) and it allows them to send users to the website through an affiliate link. Visiting through a link registers the affiliate to that account when a deal is accepted and let's them benefit from that referral. Also, some sellers may offer a more attractive referral fee which should allow affiliates to net more by mutual consent. For more information on how BitBay works you may visit: https://bitbay.market
+