Protocol
Rubicon Market
Fees

Rubicon Market

Fees

Taker Fee: 0.04%

Paid by trades that "take" liquidity from the order book in the token sent to the contract

Maker Fee: 0.038%

Paid by the taker to the "maker", the address that owns the filled offer

Querying the Fees

At a technical level, the Taker Fee is equal to the sum of the Protocol Fee and the Maker Fee.

function getFeeBPS()
    public
    view
    returns (uint256)

Returns the current protocol fee.

function makerFee() 
    public 
    view 
    returns (uint256)

Returns the current maker fee.

Calculating Fees for a Trade

Use getBuyAmountWithFee() or getPayAmountWithFee() to calculate the total amount to send to the contract for a given trade, including fees.

    function getBuyAmountWithFee(
        IERC20 buy_gem,
        IERC20 pay_gem,
        uint256 pay_amt
    ) external view returns (uint256 buy_amt, uint256 approvalAmount) {
        uint modifiedAmount = calculateFees(pay_amt, false);
        buy_amt = (getBuyAmount(buy_gem, pay_gem, modifiedAmount));
 
        approvalAmount = pay_amt;
        return (buy_amt, approvalAmount);
    }

Returns buy_amt, the amount of buy_gem tokens to send to the contract to receive the pay_amt amount of the pay_gem token. Also returns approvalAmount, the amount of pay_gem tokens to approve for the interaction, accounting for fees.

    function getPayAmountWithFee(
        IERC20 pay_gem,
        IERC20 buy_gem,
        uint256 buy_amt
    ) public view returns (uint256 pay_amt, uint256 approvalAmount) {
        pay_amt = (getPayAmount(pay_gem, buy_gem, buy_amt));
        uint modifiedAmount = calculateFees(pay_amt, true);
 
        approvalAmount = modifiedAmount;
        return (pay_amt, approvalAmount);
    }

Returns pay_amt, the amount of pay_gem tokens to send to the contract to receive the buy_amt amount of the buy_gem token. Also returns approvalAmount, the amount of buy_gem tokens to approve for the interaction, accounting for fees.

Network Fees

Rubicon order books are on-chain, all transactions must pay network fees (gas) in ETH. Transactions on L2 networks like Arbitrum (opens in a new tab) and Optimism (opens in a new tab) are 50-100x cheaper than equivalent ones on Ethereum Mainnet.