Ep60: Testing the PPSwap Website 4 - Check swap fees

3 years ago
49

/* 1. for the first 10000 swaps and a member that has 10M or more PPS, no transaction fee;
* 2. for a member that has 1M or more PPS, 0.0005 eth;
* 3. for a member that has less than PPS, 0.001 eth;
*/
function getSwapfee(uint offerID)
public
view
returns (uint)
{

if(offerID <= 3 || balances[msg.sender] >= 10*10**6*10**18) return 0;

if(balances[msg.sender] >= 1*10**6*10**18) return 5*10**14; /* 0.0005 eth */
else return 1*10**15; /* 0.001 eth */
}

Loading comments...