Skip to content

Comments

Encrypted Bidding Contract Implementation#9

Open
KryptSai wants to merge 6 commits intomainfrom
sai/hidden_bids_contract
Open

Encrypted Bidding Contract Implementation#9
KryptSai wants to merge 6 commits intomainfrom
sai/hidden_bids_contract

Conversation

@KryptSai
Copy link
Contributor

This PR introduces an encryption layer to the bidding contract. In the current implementation, bidders submit unencrypted bids, their competitors can view these bids and adjust their own bids accordingly, creating an unfair advantage. To address this issue, this PR enables bidders to submit their bids in an encrypted format.
Bidders will encrypt their bids using the deployer's public key. Only the deployer will be able to decrypt the bids using their private key, ensuring confidentiality. After decrypting the bids, If the latest bid is higher than the previous highest bid, the state file gets updated with the latest bid amount.

Test cases:
I have tested this code by giving multiple different inputs, it is working fine.

@KryptSai KryptSai self-assigned this Nov 28, 2024
@KryptSai KryptSai changed the title Sai/hidden bids contract Encrypted Bidding Contract Implementation Nov 28, 2024
@KryptSai KryptSai requested a review from Allen-Cherian June 10, 2025 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant