Main Contract
Search…
Vendors
Vendors are third parties who want to integrate their platform with the MoC ecosystem. Vendors can charge a markup of up to 1% of the value to mint/redeem operations, and receive this value as MoC tokens. These tokens neither receive rewards nor vote nor can they participate as an oracle or as no other function that MoC stakeholders have in the Staking Machine.

Registration

Please contact the Money on Chain team if you wish to be registered as a vendor.
Register a vendor in money on chain requires:
  • Address of the account where markup commissions are going to be transferred.
  • Markup in %. Ex: 0.05%. (Limit: 0.00001 - 1%)

Unregistration

Please contact the Money on Chain team if you wish to be unregistered as a vendor.
Note that once a vendor is unregistered, they will not receive any more profits.

Markup

When a vendor decides to integrate their platform with the MoC ecosystem, they must be registered first. Then, they will receive a markup for every transaction they are involved in (denoted by the parameter vendorAccount).
If the user who makes the transaction has balance and allowance of MoC token, this markup will be charged in MoC; otherwise it will be charged in RBTC. The exact percentage of the markup cannot be more than 1%. This is set in the vendors mapping of the MoCVendors contract (the vendor account address is the key), and the value to check is markup.
Note that the markup has also a precision of 18 decimals, i.e. a 1 * 10^15 in that parameter means that 0.1% is being charged as a commission.

Base commissions and markup in money on chain webapp:

Base commission
  • Pay in RBTC: 0.1%
  • Pay in MOC: 0.05%
Markup
  • Webapp of Money on chain is a vendor
  • Markup is 0.05%.
  • Markup in RBTC: 0.05%
  • Markup in MOC: 0.05%
  • Final Commission in RBTC: 0.1% + 0.05% = 0.15%
  • Final Commission in MOC: 0.05% + 0.05% = 0.10%

Moc Vendors

Contract that manage vendors functions.
Environment
Contract
Contract address
Testnet
MoCVendors
0x84b895A1b7be8fAc64d43757479281Bf0b5E3719
Mainnet
MoCVendors
0x2d442aA5D391475b6Af3ad361eA3b9818fb35BcA

Allowance

Before start operations with MoCVendor we need to allow to MoCVendors.sol and MoC.sol using MoC Token. The approval transaction is used to grant permission for the smart contract to transfer a certain amount of the token, called allowance.
Moc Token
Environment
Contract
Contract address
Testnet
MoCToken
0x45A97b54021A3F99827641AFE1bFae574431E6ab
Mainnet
MoCToken
0x9aC7Fe28967b30e3a4E6E03286D715B42B453d10
The functions that interest us are the following:
Approve (tx) involve contract address and amount of token to allow
1
function approve(address _contract, uint256 _amount) public returns (bool success)
Copied!
Allowance (call) function return remaining amount of token amount
1
function allowance(address _owner, address _contract) public view returns (uint256 remaining)
Copied!
Example Call approve:
Environment
Contract to allow
Address
Amount in wei
Testnet
MoC.sol
0x2820f6d4D199B8D8838A4B26F9917754B86a0c1F
1000000000000000000000
Testnet
MoCVendors.sol
0x84b895A1b7be8fAc64d43757479281Bf0b5E3719
1000000000000000000000
Mainnet
MoC.sol
0xf773B590aF754D597770937Fa8ea7AbDf2668370
1000000000000000000000
Mainnet
MoCVendors.sol
0x2d442aA5D391475b6Af3ad361eA3b9818fb35BcA
1000000000000000000000
The approve transaction is part of the ERC-20 standard and you can find more information here.

Staking and MoC Vendors

Upon registration, vendors must add stake using the function addStake(uint256 staking) defined in the MoCVendors contract ABI interface. This allows the vendor to receive the profits in MoC token when an user perform a mint/redeem operation through vendor's integration.
A vendor can change the amount of stake in the system using the function removeStake(uint256 staking) defined in the MoCVendors contract ABI interface.
If no Moc Token staked, there is not going to transfer commission markup to vendors account.
To transfer markup to vendors account also need:
Moc Staked > getTotalPaidInMoC
After settlement (30 days) the counted Paid in MoC will be reseted to 0 (getTotalPaidInMoC).
Add stake
Allows an active vendor (msg.sender) to add staking
1
/**
2
@dev Allows an active vendor (msg.sender) to add staking
3
@param staking Staking the vendor wants to add
4
*/
5
function addStake(uint256 staking) public onlyActiveVendor() {
6
...
7
}
Copied!
Remove stake
Allows an active vendor (msg.sender) to remove staking
1
/**
2
@dev Allows an active vendor (msg.sender) to remove staking
3
@param staking Staking the vendor wants to remove
4
*/
5
function removeStake(uint256 staking) public onlyActiveVendor() {
6
...
7
}
Copied!
Vendor is active
Gets if a vendor is active
1
/**
2
@dev Gets if a vendor is active
3
@param account Vendor address
4
@return true if vendor is active; false otherwise
5
*/
6
function getIsActive(address account) public view
7
returns (bool) {
8
9
}
Copied!
Vendor markup
Gets vendor markup
1
/**
2
@dev Gets vendor markup
3
@param account Vendor address
4
@return Vendor markup
5
*/
6
function getMarkup(address account) public view
7
returns (uint256) {
8
return vendors[account].markup;
9
}
Copied!
Total Paid in MoC
Gets vendor total paid in MoC
1
/**
2
@dev Gets vendor total paid in MoC
3
@param account Vendor address
4
@return Vendor total paid in MoC
5
*/
6
function getTotalPaidInMoC(address account) public view
7
returns (uint256) {
8
return vendors[account].totalPaidInMoC;
9
}
Copied!
Vendor staking
Gets vendor staking
1
/**
2
@dev Gets vendor staking
3
@param account Vendor address
4
@return Vendor staking
5
*/
6
function getStaking(address account) public view
7
returns (uint256) {
8
return vendors[account].staking;
9
}
Copied!

Integrating Vendors on operations

To integrate vendors in mint, redeem , etc please take a look to:
Last modified 1mo ago