You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To submit TOTAL_BIDS_PER_AUCTION together, each bid must cover the gas fee for all of the submitted bids.
572
+
// To make sure we cover the estimation errors, we add the priority_fee to the final potential gas fee.
573
+
// Therefore, the bid amount needs to be TOTAL_BIDS_PER_AUCTION times per potential gas fee.
574
+
let potential_gas_fee = maximum_gas_fee *U256::from(TOTAL_BIDS_PER_AUCTION) + priority_fee;
575
+
let minimum_bid_amount = potential_gas_fee * estimated_gas;
576
+
577
+
if bid_amount >= minimum_bid_amount {
573
578
Ok(())
574
579
}else{
575
580
Err(RestError::BadParameters(format!(
576
-
"Insufficient bid amount. Based on the current gas fees, your bid should be larger than: {}",
577
-
gas_price * multiplier
581
+
"Insufficient bid amount based on the current gas fees. estimated gas usage: {}, maximum fee per gas: {}, priority fee per gas: {}, minimum bid amount: {}",
0 commit comments