From what I understand, the gas required for a ethereum contract is based on the computation it requires. So given two very similar transactions, the gas required should be very similar right?
However, I'm looking at two transactions. These two look pretty similar but have vastly different gas costs.
https://etherscan.io/tx/0xda234098b51fc78f670e111aff049289d2fecebda68ea26a359f65eac47c5eff This one is 26k gas cost
https://etherscan.io/tx/0x598d73cbfa1a4d93595ed33a852f1536b225ef4476ca8aabe79959107b590e66 This one is 41k
https://etherscan.io/tx/0x9310e289b369e5a50752e7cbceee9e406235274ddb0f2c26e8c7ddc8f25d9bb1 This one is 56k
How are all of this calculated?
Here is a copy of the contract code https://gist.github.com/plutoegg/e852a3fc51efea550eadcb162080c7f6