Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The Frictionless protocol is a market infrastructure for the issuance, trade, and settlement of digital securities in the private markets. The protocol caters for various roles and responsibilities both within the smart contracts and the API systems, enabling the various market functions to be performed according to the regulatory posture of Frictionless Markets S.à r.l, the legal issuer of digital securities in Luxembourg under MiFID II and the broader E.U.
Frictionless Markets S.à r.l and its securitization fund (FRICTIONLESS MARKETS SECURITIES FT) is the legal issuer of digital securities in compliance with MiFID II (2014/65/EU) regulation. Frictionless Markets S.à r.l operates the PROTOCOL_ADMIN and PROTOCOL_TREASURY.
Where required and directed by a PERMISSIONED_MANAGER, Frictionless Markets S.à r.l provisions and/or operates a PERMISSIONED_CUSTODIAN on the protocol for the custody of securities or cash in accordance with the securitization laws of Luxembourg.
For more information on the legal structure of the FRICTIONLESS MARKETS SECURITIES FT, consult our legal & fund documentation
The Frictionless protocol is an institutional-grade venue built on EVM-compatible smart contracts for the issuance, distribution and settlement of digital securities in the private markets. The process involves dematerializing credit & infrastructure funds, ETFs or AMCs into risk-profiled future cash flow tokens, in the form of ERC-3643 digital securities which are aligned with the distribution schedule of the Manager.
Via strategies, Investors can invest in a diversified cross-section of funds using instant atomic settlement in attested 1:1 backed FIAT deposit tokens, which are banked with a in Luxembourg.
This tokenization lego-brick approach ensures digital securities can be instantly composed into secondary trades, semi-liquid & automatic structured products and distributed between Investors in a privacy-protected mode for a few cents. All tokens within the protocol are permissioned tokens built under to ensure that there is instant delivery versus payment, whilst ensuring the privacy of the Investor is protected. The Frictionless Markets APIs interact with these smart contracts to orchestrate the mint, transfer and burn of the various tokens in the protocol.
Join the community on Discord !
The Frictionless protocol is the technology enabler which translates real-world investments into legal, compliant and transferrable tokenized securities through a Luxembourg structure, operated by Frictionless Markets S.à r.l and its securitization structures.
Frictionless Markets S.à.r.l and its securitization fund (FRICTIONLESS MARKETS SECURITIES FT) is the legal issuer of digital securities in compliance with MiFID II (2014/65/EU) regulation.
For more information on the legal structure of the FRICTIONLESS MARKETS SECURITIES FT, consult our
There are many tokenization offerings in the market place and the industry is witnessing new entrants each with its respective niche and focus. The Frictionless protocol focus is specifically on the private markets and specifically on providing the legally compliant market infrastructure to enable Managers and GPs to tokenize their funds and offerings, whilst offering Investors a frictionless, low minimum, and transparent access point to the private markets on a global basis.
As a market infrastructure, the Frictionless protocol provides the three core layers to enable Investors to invest in the best private markets offerings on a global basis. These sections cover the basics of securitization, tokenization and distribution.
The Frictionless Markets team supports a wide variety of securitizations in Luxembourg. The securitizations can be "true sale" or "synthetic" securitizations and are issued from bankruptcy remote and orphan entity-protected structures.
A securitization transaction involves establishing a securitization entity in Luxembourg to assume the risk associated with future cash flows tied to receivables, assets, or activities conducted by third parties known as the Underlying Assets. Simultaneously, the entity issues securities, typically in the form of notes, whose yield and value are connected to the performance of the Underlying Assets. These securities are then offered to professional investors on the financial markets in a tokenized format using the Frictionless protocol.
The Frictionless Markets team establishes and operates the securitization structures, providing the fund administration, fund structuring, cash operations and fund reporting services under Luxembourg securitization law.
The Frictionless protocol includes:
A suite of smart contracts to represent:
Funds/Notes - Frictionless OnChain Assets: The FrictionlessOnChainAssetToken represents a listed fund with the informational and legal rights to the underlying. This includes all the informational rights on the underlying and its associated maturity. A FrictionlessOnChainAssetToken is issued as a digital twin for each specific note in a compartment within the Frictionless Markets fund structure.
APIs and a Tokenization Engine to orchestrate and automate complex Manager workflows such as:
Subscriptions
Capital Calls
Cash Distributions
Portfolio Compositions
Wallet Infrastructure enabling the custody of tokenized funds/notes, the collection of fees, custody of ERC20 stablecoins for the PROTOCOL_TREASURY and the wallet infrastructure required to sign and execute transactions on the blockchain.
The Frictionless Markets team operates the protocol, granting access to Managers to tokenize their funds and automate their fund administration services from the Frictionless Markets Manager Interface, API or smart contracts.
Managers can onboard Investors directly or link into permissioned distribution agents on the Frictionless protocol to distribute their tokenized securities on a global basis., these include:
Private Placement Agents
Global Wealth Advisors
Private Banks
Digital Security Exchanges
Investors invest via subscriptions or subscription contracts to the tokenized fund/note in accordance with MiFID II regulation.
The investment and settlement of tokenized securities are carried out using Frictionless Deposit Tokens, which is a non-invasive and seamless conversion between FIAT contributions or settlement and their tokenized representation.
The Frictionless Markets team operates the protocol, granting access to Distribution Agents and their Investor base to a wide variety of tokenized funds from the world's best GPs and Managers.
Distribution Agents can manage:
Subscriptions to Funds for their Investor base.
Capital Calls and reporting for their Investor base.
Cash Distributions and reporting for their Investor base.
Portfolio Compositions for their Investor base.
Securitization encompasses a wide range of asset types, including:
Receivables such as loans
Liquid assets like bonds or securities
Illiquid assets including private equity and real estate
Derivative instruments
Intellectual property generating royalty streams
Cash flow associated with risk or contractual agreements
Shares in other entities, PE, Credit, Infrastructure funds, or deals
Frictionless Markets supports the issuance of Notes, Tracker Certificates, and Actively Managed Certificates in multiple currencies. In general, the Frictionless Markets team and the Frictionless protocol support the following securitization & tokenization use cases:
The act of correctly securitizing an undertaking, legally and in compliance with the laws of Luxembourg, and thereafter tokenizing into legally compliant tokenized (digital) securities for distribution to permissioned Investors is a complex end-to-end transaction. This section covers the high-level details of the lifecycle of a transaction which holds true for any type of tokenized offering undertaken by Frictionless Markets.
Establishment of the correct Luxembourg securitization structure.
The Frictionless Markets team will create the PPM (private placement memorandum) and the Final Terms for the securitization undertaking.
The Frictionless Markets team creates the compartment, bank accounts of the compartment and the permissioning/provisioning of the necessary wallet infrastructure to execute the tokenization.
All relevant statutory reporting and regulatory obligations for the structure are handled by the Frictionless Markets team, including AML6, SARs, CRS, FATCA, FATF, ManCo Reporting, etc.
Tokenization of the undertakings.
The Manager is permissioned on the Frictionless protocol.
Managers can onboard Investors via subscriptions or subscription contracts to the tokenized fund/note in accordance with MiFID II regulation.
The Manager can issue notes, and capital calls*, and run cash distributions** from the Frictionless Markets UI, via integration with the Frictionless Markets API or directly via the smart contracts.
Distribution of the tokenized securities.
Managers can onboard Investors directly or link into permissioned distribution agents on the Frictionless protocol to distribute their tokenized securities on a global basis.
Capital Calls* automatically execute upon Investors' subscriptions to a fund/funds, converting FIAT contributions to Frictionless Deposit Tokens and releasing Frictionless Digital Securities to record the transaction on-chain.
Cash Distributions ** automatically distribute income and return of the underlying to the Investors, settling the Frictionless Digital Securities with Frictionless Deposit Tokens, thereafter handling the FIAT settlement in the securitization transaction.
The Frictionless smart contracts are an suite of available under the permissive which enable compliant digital securities transfer, payment and settlement on EVM-compatible blockchains, such as Avalance C-Chain, Ethereum or Polygon.
The Frictionless smart contracts extend the T-REX specification with specific features to operate private placements under MiFID II regulation.
The Frictionless protocol is essentially a decentralised system of privacy-protecting proofs and permissioned tokens that can only be transferred under tight controls in accordance with the regulatory rules of the underlying funds and securities which are tokenized.
The Frictionless protocol extends the specification with specific features to operate private placements under MiFID II regulation. The are six main pillars of the Frictionless protocol as illustrated in the diagram below.
Identity Management - based on OnChainId all participants in the Frictionless protocol are permissioned with specific roles, defining the actions and token classes they can interact with.
Compliance - based on the ERC-3643 specification, upgradable modules for compliance enable the compliant transfer of token classes in the protocol.
Frictionless Tokens - based on the ERC-3643 specification, these are the tokens circulated in the protocol to represent securities, assets, cash contributions, cash distributions and settlements.
Treasury Management - provides the smart contract functions to mint, transfer and burn token classes in the protocol.
Proof-of-Reserve - provides independent attestations over the currencies underpinning FrictionlessFundDepositTokens.
Transfer Agency - provides the controlled transfer of tokens between participants under strict compliance. This also includes the facility to swap tokens, such as stablecoins with FrictionlessFundDepositTokens or FX swaps of FrictionlessFundDepositTokens of various denominations.
Cash - Frictionless Deposit Tokens: A represents a permissioned Investors FIAT contribution to a specific fund IBAN in a denominated FIAT currency. The FrictionlessFundDepositToken is used as a means of payment and settlement record. The FrictionlessFundDepositToken can only be transferred between permissioned Investors and Managers in the fund as a record of FIAT transfers within the Fund. A daily attestation of the fund IBAN serves to prove the 1:1 backing with FIAT. Market participants holding a FrictionlessFundDepositToken have the legal claim to the FIAT value held in the fund IBAN account under the final terms of the financial instrument issued by the note tracking the FrictionlessFundDepositToken.
Securities - Frictionless Digital Security Tokens: This is the which represents the future cash flow from the FrictionlessOnChainAssetToken and is purchased by the Investor using FrictionlessFundDepositToken's. These digital securities are permissioned and transferable between permissioned Investors in a permissioned market. This token is linked to the FrictionlessOnChainAssetToken and denominated in a FIAT currency at a future date for settlement.
Smart contracts to execute the of Frictionless tokens in primary and secondary transactions
Smart contracts to ERC20 tokens (stablecoins) to/from Frictionless Deposit Tokens, enabling Managers to risk off stablecoin contributions to their respective funds/
Smart contracts to Frictionless Deposit Tokens of different FIAT denominations using spot and forward rates, enabling Investors to invest and settle in multiple currencies.
Smart contracts to manage the of market participants in accordance with regulation.
The distribution layer of the Frictionless protocol enables Investors to onboard into tokenized funds using their , direct KYC/AML subscription or via reliance letter.
For more information on the securitization benefits from Frictionless Markets and an in-depth understanding of our offerings, consult our .
The cover these topics in depth with visual explanations of how each contract functions along with its NATSPEC documentation.
Inherits: IModule
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessCompliance is responsible for the compliant transfer of the various Tokens in the Frictionless protocol.
Sets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Parameters
frictionlessPermissionsManager_
address
the address of the IFrictionlessPermissionsManager
contract
Sets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Parameters
newComplianceFactory_
address
the address of the IFrictionlessComplianceFactory
contract
Gets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Returns
<none>
IFrictionlessPermissionsManager
the address of the IFrictionlessPermissionsManager
contract
Gets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Returns
<none>
IFrictionlessComplianceFactory
the address of the IFrictionlessComplianceFactory
contract
Verifies if the specified wallet address is a PROTOCOL_TREASURY user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PROTOCOL_TREASURY user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_CUSTODIAN user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_INVESTOR user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_MANAGER user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user, otherwise false
Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user, otherwise false
Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.
Parameters
walletAddress_
address
the address of the users wallet.
Returns
<none>
bool
true if the specified wallet address is a permissioned user in the Frictionless protocol, otherwise false
verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim
Parameters
userAddress_
address
the address of the user's wallet to verify
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as per the enum
Returns
<none>
bool
true if a valid permissioned user and has a valid claim, otherwise false.
Event emitted during compliance module transfers
throws if specific address is zero.
thrown if the compliance module address is invalid during bindCompliance
and unBindCompliance
thrown if the compliance module address is not approved during bindCompliance
thrown if the compliance module address is already bound, thrown by bindCompliance
thrown if the compliance module address is not already bound during unBindCompliance
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Interface defining the token factory for all tokens in the Frictionless protocol.
Sets the Treasury Manager to be the specified address.
Parameters
newTreasuryManager_
address
the addresses of the treasury manager to set throws FrictionlessTokensFactoryZeroAddress
if the newTreasuryManager_ is a zero address
Deploys the FrictionlessFundDepositToken
contract as a proxy
Parameters
tokenOwner_
address
The owner of the deployed contract
baseTokenInitParams_
BaseTokenInitParams
the base contract data to deploy a Frictionless token contract
initData_
IFrictionlessFundDepositToken.FFDImmutableData
the immutable data for the FrictionlessFundDepositToken
Returns
tokenProxyAddr_
address
the address of the deployed token contract FrictionlessFundDepositToken
throws FrictionlessTokensFactoryNotATreasuryManager
if the msg.sender is not the treasury manager emits FrictionlessTokenDeployed
event upon successful deployment of the token contract.
Deploys the FrictionlessDigitalSecurityToken
contract as a proxy
Parameters
tokenOwner_
address
The owner of the deployed contract
baseTokenInitParams_
BaseTokenInitParams
the base contract data to deploy a Frictionless token contract
initData_
IFrictionlessDigitalSecurityToken.FDSImmutableData
the immutable data for the FrictionlessDigitalSecurityToken
updateData_
IFrictionlessDigitalSecurityToken.FDSMutableData
the mutable data for the FrictionlessDigitalSecurityToken
Returns
tokenProxyAddr_
address
the address of the deployed token contract FrictionlessDigitalSecurityToken
throws FrictionlessTokensFactoryNotATreasuryManager
if the msg.sender is not the treasury manager emits FrictionlessTokenDeployed
event upon successful deployment of the token contract.
Deploys the FrictionlessOnChainAssetToken
contract as a proxy
Parameters
tokenOwner_
address
The owner of the deployed contract
baseTokenInitParams_
BaseTokenInitParams
the base contract data to deploy a Frictionless token contract
specData_
IFrictionlessOnChainAssetToken.FOCASpecData
the immutable specification data for the FrictionlessOnChainAssetToken
issuanceData_
IFrictionlessOnChainAssetToken.FOCAIssuanceData
the immutable issuance data for the FrictionlessOnChainAssetToken
updateData_
IFrictionlessOnChainAssetToken.FOCAUpdateData
the mutable update data for the FrictionlessOnChainAssetToken
Returns
tokenProxyAddr_
address
the address of the deployed token contract FrictionlessOnChainAssetToken
throws FrictionlessTokensFactoryNotATreasuryManager
if the msg.sender is not the treasury manager emits FrictionlessTokenDeployed
event upon successful deployment of the token contract.
returns the address of the treasuryManager
Returns
<none>
address
the address of the treasuryManager
Checks whether a given token address is an existing frictionless token
Parameters
tokenAddr_
address
the address of the token to check
Returns
<none>
bool
A boolean indicating whether the token is an existing frictionless token
Event emitted upon successful deployment of a compliance contract.
error thrown if an attempt to set a zero address contract during function setTreasuryManager
error thrown if the msg.sender
is not the treasury manager during the functions deployFundDepositToken
, deployDigitalSecurityToken
, or deployOnChainAssetToken
Struct to represent the base contract data to deploy a Frictionless token contract.
Inherits: IBasicFrictionlessToken
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Implementation of the storage of the underlying OnChain Asset and it's data.
Sets the specData data for the FrictionlessOnChainAssetToken
. throws FrictionlessOnChainAssetTokenUnableToUpdateData
This data is immutable, an attempt to modify will generate the error FrictionlessOnChainAssetTokenUnableToUpdateData
Parameters
specData
FOCASpecData
the specData data for the FrictionlessOnChainAssetToken
Sets the issuanceData data for the FrictionlessOnChainAssetToken
throws FrictionlessOnChainAssetTokenUnableToUpdateData
This data is immutable, an attempt to modify will generate the error FrictionlessOnChainAssetTokenUnableToUpdateData
Parameters
issuanceData
FOCAIssuanceData
the updatable data for the FrictionlessOnChainAssetToken
Sets the updatable data for the FrictionlessOnChainAssetToken
Parameters
updateData
FOCAUpdateData
the updatable data for the FrictionlessOnChainAssetToken
Get the specData data for the FrictionlessOnChainAssetToken
.
Returns
<none>
FOCASpecData
the specData data for the FrictionlessOnChainAssetToken
Get the issuanceData data for the FrictionlessOnChainAssetToken
.
Returns
<none>
FOCAIssuanceData
the issuanceData data for the FrictionlessOnChainAssetToken
Get the updateData data for the FrictionlessOnChainAssetToken
.
Returns
<none>
FOCAUpdateData
the updateData data for the FrictionlessOnChainAssetToken
Get the currency the FrictionlessOnChainAssetToken
is issued in.
Returns
<none>
string
the currency the FrictionlessOnChainAssetToken
is issued in.
error throw if there is an attempt to modify the immutable data.
The specification data for the FrictionlessOnChainAssetToken
, this is an immutable data struct.
The issuance data for the FrictionlessOnChainAssetToken
, this is an immutable data struct.
The uopdatable data for the FrictionlessOnChainAssetToken
.
Enum for the schedule of the payments by the Manager, either pro_rat or coupon/bullet style.
Enum for the periodicity of payments by the Manager
Enum for the yield for this FrictionlessOnChainAssetToken
is a fixed/floating rate
Enum for the price quote status obtained at auction
Enum for the current status of the FrictionlessOnChainAssetToken
. Updated over time by the Treasury
Enum for the current S&P style riskGrade of the FrictionlessOnChainAssetToken
. Updated over time by the Manager/Treasury/Risk Oracle.
The Frictionless protocol is an upgradable and extensible market infrastructure. The protocol is developed by the IP company DEFYCA Labs S.à.r.l, which develops the smart contract suite under the permissive MIT license.
To contribute or request features to the protocol, please consult the CONTRIBUTING documentation for the smart contract suite.
The roadmap for the Frictionless protocol smart contracts includes:
Fundamental Analysis - Using the PERMISSIONED_CALCULATING_AGENT role to provide fundamental analysis on underlying portfolios via smart contracts in privacy-protecting mode.
Qualified Transfer Agents - Opening access to 3rd party transfer agents to execute the transfer and settlement of securities issued on the Frictionless protocol in accordance with local regulatory posture.
Portfolio Re-Balancers - A suite of smart contracts which enable PERMISSIONED_INVESTORS to automatically re-balance their portfolio of investments according to their specific investment goals.
The broader roadmap includes features which are commercially developed by Frictionless Markets S.à.r.l, which can be requested via the https://www.frictionless.markets site.
Inherits: IBasicFrictionlessToken
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This is the permissioned & transferable digital security which represents the future cash flow from the FrictionlessOnChainAssetToken
and is purchased by the Investor using FrictionlessFundDepositTokens
. These digital securities are permissioned and transferable between permissioned Investors in a permissioned secondary market. This token is linked to the FrictionlessOnChainAssetToken
and denominated in a FIAT currency at a future date for settlement.
Sets the immutable data for the FrictionlessDigitalSecurityToken
Parameters
initData
FDSImmutableData
the immutable data for the FrictionlessDigitalSecurityToken
Sets the updatable data for the FrictionlessDigitalSecurityToken
Parameters
mutableData
FDSMutableData
the updatable data for the FrictionlessDigitalSecurityToken
Get the baseCurrency is the FIAT denomination of the digital security, this is the currency the FrictionlessOnChainAssetToken
is issued in.
Returns
<none>
string
the baseCurrency is the FIAT denomination of the digital security, this is the currency the FrictionlessOnChainAssetToken
is issued in.
Get the type of the token as defined in the enum FrictionlessDigitalSecurityTokenType
.
Returns
<none>
FrictionlessDigitalSecurityTokenType
the type of the token as defined in the enum.
Get the onChainAssetAddress the address of the FrictionlessOnChainAssetToken
for which this token is a future cash distribution.
Returns
<none>
address
onChainAssetAddress the address of the FrictionlessOnChainAssetToken
for which this token is a future cash distribution.
Get the maturity date of the digital security.
Returns
<none>
uint256
the maturity date of the digital security.
error throw if there is an attempt to modify the immutable data.
Struct which represents the immutable data in the Token. Once set it cannot be modified.
Struct which represents the updatable data in the Token. This data can be modified by the Agent only.
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Interface defining the upgradeable compliance factory for all tokens in the Frictionless protocol.
Sets the Treasury Manager to be the specified address.
Parameters
newTreasuryManager_
address
the address of the treasury manager to set throws FrictionlessComplianceFactoryZeroAddress
if the newTreasuryManager_ is a zero address
Updates and upgrades the modular compliance implementation
Parameters
newModularComplianceImpl_
address
the address of the modular compliance implementation
Updates the set of supported modular compliance modules.
Parameters
updateSupportedComplianceDataArr_
UpdateSupportedComplianceData[]
the set of supported modular compliance modules.
Updates the modular compliance data.
Parameters
updateModularComplianceDataArr_
UpdateModularComplianceData[]
the modular compliance data.
Deploys the compliance contract using the ProxyBeacon with the associated FrictionlessPermissionsManager contract
Parameters
tokenType_
IBasicFrictionlessToken.FrictionlessTokenTypes
The Frictionless token type as defined by IBasicFrictionlessToken.FrictionlessTokenTypes
Returns
<none>
address
the address of the deployed compliance contract for the specified Frictionless token type throws FrictionlessComplianceFactoryNotATreasuryManager
if the msg.sender is not the treasury manager emits FrictionlessComplianceDeployed event upon successful deployment of the compliance contract.
returns the address of the treasuryManager
Returns
<none>
address
the address of the treasuryManager
returns the ProxyBeacon of the ModularCompliance
Returns
<none>
ProxyBeacon
the ProxyBeacon of the ModularCompliance
returns the address of the ModularCompliance
Returns
<none>
address
the address of the ModularCompliance
returns the FrictionlessTokenTypes
which is bound by the ModularCompliance
Parameters
modularComplianceAddr_
address
the address of the ModularComplianceImpl
Returns
<none>
IBasicFrictionlessToken.FrictionlessTokenTypes
the address of the ModularCompliance
returns the amount of supported compliances ModularCompliance for the specified tokenType_
Parameters
tokenType_
IBasicFrictionlessToken.FrictionlessTokenTypes
the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes
enumerated type
Returns
<none>
uint256
the amount of supported compliances
returns the array of supported compliances ModularCompliance for the specified tokenType_
Parameters
tokenType_
IBasicFrictionlessToken.FrictionlessTokenTypes
the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes
enumerated type
Returns
<none>
address[]
the array of supported compliances
returns true if the compliance module supports the Frictionless token type, otherwise false
Parameters
tokenType_
IBasicFrictionlessToken.FrictionlessTokenTypes
the type of token as defined by the IBasicFrictionlessToken.FrictionlessTokenTypes
enumerated type
moduleToCheck_
address
the address of the modular compliance contract to verify
Returns
<none>
bool
true if the compliance module supports the Frictionless token type, otherwise false
Returns true if the address provided is a ModularCompliance contract
Parameters
modularComplianceAddr_
address
the address of the ModularCompliance contract
Returns
<none>
bool
true if the address provided is a ModularCompliance contract, otherwise false
Event emitted upon successful deployment of a compliance contract.
error thrown if the specified contract address is a zero address, during init
, setTreasuryManager
, and updateModularComplianceImpl
error thrown if the msg.sender
is not the treasury manager during the function deployCompliance
error thrown if the modular compliance is invlaid for hte token type during the function updateModularCompliancesModules
error thrown if an invalid tokenType is specified during deployCompliance
error thrown if an invalid module is specified during updateModularCompliancesModules
Structure to represent the update of modular compliance data.
Structure to represent the update of modular compliance data for a given token type
These contracts define the compliance layer for permissioned network participants (KYC/AML, Sanctions, PEP screening), the offering rules and the transfer rules for tokens, which ensures transfers are conducted in line with the legal and regulatory guardrails of MiFID II.
The compliance modules are upgradeable and are tied to specific tokens.
The smart contracts powering the Frictionless protocol have undergone a meticulous audit by Hacken.io, a renowned name in blockchain audit and security.
The Frictionless Protocol smart contracts have achieved a perfect 10/10 rating, attesting to the robustness and security of our blockchain infrastructure. This accomplishment reflects our unwavering commitment to ensuring the safety and trustworthiness of our platform.
10/10 - Security Score
10/10 - Code Quality Score
100% - Security Score
10/10 - Documentation Quality Score
The comprehensive audit report conducted by Hacken.io is now available for review at Frictionless Protocol Audit Results. We encourage anyone interacting with the Frictionless protocol to explore the detailed findings, recommendations, and security measures outlined in the report.
Throughout the auditing process, we maintained a transparent and collaborative tracking process with the Hacken.io team. This approach allowed us to address potential vulnerabilities promptly and work together to enhance the overall security of our smart contracts.
We are proud to announce that the Frictionless Protocol smart contracts are released under the MIT license. This open-source licensing model reflects our dedication to transparency, collaboration, and community involvement. The MIT license allows developers and stakeholders to freely use, modify, and distribute our smart contracts while providing clear guidelines on attribution and liability.
The Frictionless Tokens describe the tokens which are emitted by the Frictionless protocol to represent Asset, Securities and Deposits. These tokens are based on the ERC-3643 specification of IToken.
The following diagram describes the high-level interaction and composition of a Frictionless token.
Inherits: IBasicFrictionlessToken
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
A Fund Deposit Token represents a permissioned Investors FIAT contribution to a specific fund IBAN in a denominated FIAT currency. The Fund Deposit Token is used as a means of payment and settlement. The Fund Deposit Token can only be transferred between permissioned Investors in the fund. A daily attestation of the fund IBAN serves to prove the 1:1 backing with FIAT. Exclusively under Frictionless Markets S.à.r.l issuance terms Investors holding a FrictionlessFundDepositToken
have the legal right to the FIAT value held in the fund IBAN account.
Sets the immutable data for the FrictionlessFundDepositToken
Parameters
Get the currency the FIAT denomination of the deposit token.
Returns
Get the description the description of the deposit token.
Returns
Get the IBAN which Frictionless Markets S.à.r.l holds a matching FIAT currency ledger with a G-SIB for this currency, attestations are provided on this IBAN. This is restricted to onlyAgent roles.
Returns
error throw if there is an attempt to modify the immutable data.
Struct which represents the immutable data in the Token. Once set it cannot be modified.
Inherits: IModularCompliance
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessModularCompliance is responsible for the compliant transfer of the various Tokens in the Frictionless protocol.
Initializes the modular compliance, sets the maximum allowable modules per token and adds the modules provided
Parameters
Set the maximum number of allowable modules which can be bound.
Parameters
Adds modules based on the array of module addresses provided
Parameters
Removes modules based on the array of module addresses provided
Parameters
Returns the maximum number of allowable modules which can be bound.
Returns
Emitted during updateMaxModulesCount
to inform of new modules max count updates
Emitted during addModules
to inform of new modules added
Emitted during removeModules
to inform of modules removed
thrown if specific address is zero.
thrown if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
thrown if an attempt to add an already existing module during addModules
thrown if module for the given address is not already bound by the modifier onlyExistingModule
thrown if an attempt to add more than the allowable modules during addModules
thrown during bindToken
or unBindToken
if the caller is not the owner or the bound token address
thrown if the the msg.sender is not the bound token address during modifier onlyToken
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
get the FeeInfo for a given key.
Parameters
Returns
get the feeInBps value for a given key
Parameters
Returns
get the feeRecipientAddr value for a given key
Parameters
Returns
Calculates the actual fee in absolute terms for a given fee in basis points.
Parameters
Returns
Event emitted during _setTokenFee
error thrown if the recipient is a zero address
error thrown if the feesInBps is outside the valid range
Struct which defines the FeeInfo, representing the fee in basis points and the recipient of the fees on-chain.
Inherits: IToken
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IBasicFrictionlessToken Represents the base interface for Frictionless protocol tokens, this interface is used to determine a token type.
Sets the token type according to the specified enumeration
Parameters
Returns the token type according to the specified enumeration
Returns
error thrown if an attempt to set an invalid token type during function setFrictionlessTokenType
Enumeration to represent each of the tokens in the Frictionless protocol.
The Frictionless protocol smart contracts are documented using the standard.
Inherits: IFrictionlessComplianceModule, OwnableUpgradeable
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
See {IFrictionlessComplianceModule}
The IFrictionlessPermissionsManager for the protocol.
The IFrictionlessComplianceFactory for the protocol.
the mapping of compliance modules bound.
modifier used to very that only approved compliance modules can be used.
modifier used to very that only modules that are bound, can be used.
Initiatizes the compliance module
Parameters
Sets the instance of the IFrictionlessPermissionsManager
to determine permissions for users.
Parameters
Sets the instance of the IFrictionlessComplianceFactory
to determine the compliance module for the protocol.
Parameters
Verifies if the specified wallet address is a PROTOCOL_TREASURY user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CUSTODIAN user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_INVESTOR user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_MANAGER user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user.
Parameters
Returns
Verifies if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user.
Parameters
Returns
Verifies if the specified wallet address is a permissioned user in the Frictionless protocol.
Parameters
Returns
verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim
Parameters
Returns
Impl of the setting of the permissions manager
Impl of the setting of the compliance factory
Verifies if an address is a zero address
Verifies if the compliance_ address supplied is bound as per the mapping
Verifies if the compliance_ address supplied is valid
Verifies if the msg.sender
is a valid modular compliance
Returns the address of the IToken bound by this compliance
Determine if a claim is present for a given userAddress and userType
Parameters
The Frictionless protocol is designed to automate cash operations across the lifecycle of a fund, part of this automation is the collection of contracted fee structures within a fund, such as management and/or performance fees.
The smart contracts for securities exchange, transfer, ERC20 swap and FX swaps may be programmed to automatically collect fees for Managers, opening new revenue streams for Managers whilst ensuring the visibility of fees for Investors and Managers alike.
The following diagram illustrates the design of the fee module, which enables the definition of fees to be automatically collected by a defined fee recipient during any of the value exchange functions in the protocol.
Fees may be configured to be collected in the following transactions:
P2P (bi-lateral) transfer of tokens between permissioned counterparties, for example, a direct transfer of securities between two Investors, such as a secondary trade.
Exchange of securities, executed by the protocol during a primary issuance, in the form of management fees upon committed capital or deployed capital.
Settlement of securities, executed by the protocol or by the Investor.
Conversion of an ERC20 token to/from a FrictionlessFundDepositToken, for example, converting USDC to the USD equivalent FrictionlessFundDepositToken or conversion of another ERC20 collateral.
FX swap of FrictionlessFundDepositToken of different currencies.
The fee architecture permissions the protocol admin to establish fees, this ensures that the market integrity for fees is maintained, for example, the FX rates are taken from our FX partner's spot and forward rates quoted, and the conversion of ERC20 stablecoins such as USDC and USDT to it's USD equivalent FrictionlessFundDepositToken.
<none>
string
the currency the FIAT denomination of the deposit token.
<none>
string
the description the description of the deposit token
<none>
string
the IBAN which Frictionless Markets S.à.r.l holds a matching FIAT currency ledger with a G-SIB for this currency, attestations are provided on this IBAN.
newMaxModulesCount_
uint256
maximum number of allowable modules which can be bound. throws FrictionlessModularComplianceZeroMaxModulesCount
if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
emits MaxModulesCountUpdated
upon successful update of the maximum modules count.
modulesToAdd_
address[]
the array of module addresses to be added throws FrictionlessModularComplianceMaxModuleCountReached
if the maximum amount of modules has been reached as per the maxModulesCount throws FrictionlessModularComplianceModuleIsAlreadyBound
if the module is already bound throws FrictionlessIsZeroAddress
if the module address is a zero address emits ModulesAdded upon sucessful addition
modulesToRemove_
address[]
the array of module addresses to be removed throws FrictionlessModularComplianceModuleDoesNotExist
if module for the given address is not already bound emits ModulesRemoved upon sucessful removal
<none>
uint256
maximum number of allowable modules which can be bound.
<none>
uint256
the feeInBps value
tokenFeeKey_
bytes32
the key as generated by the function getTokenFeeKey
<none>
address
the feeRecipientAddr value
tokensAmount_
uint256
the amount of tokens used to determine the base calculation.
feeInBps_
uint256
the fee in basis points for calculation.
feeAmount_
uint256
the actual fee in absolute terms for a given fee in basis points.
<none>
FrictionlessTokenTypes
FrictionlessTokenTypes the token type according to the specified enumeration
frictionlessPermissionsManager_
address
the address of the frictionless permissions manager
complianceFactory_
address
the address of the compliance dfactory
frictionlessPermissionsManager_
address
the address of the IFrictionlessPermissionsManager
contract
newComplianceFactory_
address
the address of the IFrictionlessComplianceFactory
contract
userAddress_
address
<none>
bool
true if the specified wallet address is a PROTOCOL_TREASURY user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_CUSTODIAN user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_INVESTOR user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_MANAGER user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_CALCULATING_AGENT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_TRANSFER_AGENT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a PERMISSIONED_FUND_ACCOUNTANT user, otherwise false
userAddress_
address
<none>
bool
true if the specified wallet address is a permissioned user in the Frictionless protocol, otherwise false
userAddress_
address
the address of the user's wallet to verify
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as per the enum
<none>
bool
true if a valid permissioned user and has a valid claim, otherwise false.
userAddress_
address
the address if the users wallet
userType_
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as defined by the enumeration IFrictionlessPermissionsManager.FrictionlessPermissionedUser
initData
FFDImmutableData
the immutable data for the FrictionlessFundDepositToken
modules_
address[]
the array of module addresses to be added
maxModulesCount_
uint256
maximum number of allowable modules which can be bound. throws FrictionlessModularComplianceMaxModuleCountReached
if the maximum amount of modules has been reached as per the maxModulesCount throws FrictionlessModularComplianceModuleIsAlreadyBound
if the module is already bound throws FrictionlessIsZeroAddress
if the module address is a zero address throws FrictionlessModularComplianceZeroMaxModulesCount
if an attempt to set the maximum number of allowable modules to zero is made in updateMaxModulesCount
emits ModulesAdded upon sucessful addition emits MaxModulesCountUpdated
upon successful update of the maximum modules count.
feeKey_
bytes32
the key as generated by the function getTokenFeeKey
<none>
FeeInfo
FeeInfo the fees associated with a token transfer.
tokenFeeKey_
bytes32
the key as generated by the function getTokenFeeKey
newTokenType_
FrictionlessTokenTypes
the token type to set
Inherits: IAbstractFeeModule
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Use SafeERC20
for any ERC20 token in the conversion
represents 0 bps in fees (the minima of fees or 0%)
represents 10000 bps in fees (the maxima of fees or 100%)
Shouldnt arrise due to validation, but being doubly sure, we can't compute incorrect fees.
Validates the FeeInfo, specifically validates the non zero address of the feeRecipientAddr and the range for the feeInBps (0 to MAX_FEES_IN_BPS).
Parameters
feeInfo_
FeeInfo
the FeeInfo to validate. throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS)
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessTreasuryManager is responsible for all token operations, minting, transferring and burning in the Frictionless protocol. The tokens and their lifecycles are defined in the public README for the Frictionless protocol at https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/-/tree/main?ref_type=heads#tokens-overview
Sets and associates the implementation authority with the associated token type
Parameters
initDataArr_
FrictionlessTokenInitData[]
the FrictionlessTokenInitData
configuration associating the implementation authority with the associated token type.
Mints a Fund Deposit Token in the specified currency/IBAN pair. This function is invoked to create the genesis mint of the deposit token in the PROTOCOL_TREASURY.
Parameters
depositData
IFrictionlessFundDepositToken.FFDImmutableData
the immutable deposit data for the token
treasuryAddress
address
the address of the treasury, which receives the deposit tokens
amount
uint256
the amount of tokens
Returns
<none>
address
address of the token minted emits FrictionlessTokenMinted
event throws error FrictionlessTreasuryManagerInvalidDepositData
if the deposit data is invalid. requires the depositData.currency to be a 3 letter currency code requires the depositData.description to be not empty requires the depositData.IBAN to be not empty
Mints a FrictionlessDigitalSecurityToken as the future dated cash distribution from the underlying FrictionlessOnChainAssetToken. This function is invoked to create the genesis mint of the deposit token in the PROTOCOL_TREASURY.
Parameters
initData
IFrictionlessDigitalSecurityToken.FDSImmutableData
the immutable data for the token
updateData
IFrictionlessDigitalSecurityToken.FDSMutableData
the mutable data for the token
amount
uint256
the amount of tokens
userAddress
address
the address of the protocol user, which receives the digital security tokens
Returns
<none>
address
address of the token minted emits FrictionlessTokenMinted
event throws error FrictionlessTreasuryManagerInvalidFDSImmutableData
if the initData is invalid. requires the initData.currency to be a 3 letter currency code requires the initData.onChainAssetAddress to be non 0 address
Mints a FrictionlessOnChainAssetToken as the representation of the asset to be securitized, fractionalized & sold. This function is invoked to create the genesis mint of the deposit token to the PERMISSIONED_CUSTODIAN.
Parameters
specData
IFrictionlessOnChainAssetToken.FOCASpecData
the immutable data for the token
issuanceData
IFrictionlessOnChainAssetToken.FOCAIssuanceData
the issuance data for the token
updateData
IFrictionlessOnChainAssetToken.FOCAUpdateData
the update data for the token
custodianAddress
address
the address of the protocol custodian, which receives the FrictionlessOnChainAssetToken
Returns
<none>
address
address of the token minted emits FrictionlessTokenMinted
event throws error FrictionlessTreasuryManagerInvalidFOCASpecData
or FrictionlessTreasuryManagerInvalidFOCAIssuanceData
if the specData or issuanceData is invalid.
Used to increase the mint of a Frictionless token which already exists.
Parameters
token
address
the address of the token
userAddress
address
the address to min the token to
amount
uint256
the amount of tokens to mint emits FrictionlessTokenMinted
event
Used to increase the mint of a Frictionless token which already exists.
Parameters
token
address
the address of the token
userAddressFrom
address
the address to transfer the tokens from
userAddressTo
address
the address to transfer the tokens to
amount
uint256
the amount of tokens to mint emits FrictionlessTokenTransferred
event
Used to burn an amount of Frictionless token which already exists.
Parameters
token
address
the address of the token
userAddress
address
the address to burn the tokens from
amount
uint256
the amount of tokens to burn emits FrictionlessTokenBurned
event
returns the address of the fund deposit token by currency and fundIBAN
Parameters
currency_
string
the currency of the fund deposit token
fundIBAN_
string
the fundIBAN of the fund deposit token
Returns
<none>
address
the address of the fund deposit token for specified currency and fundIBAN
returns fund deposit token key by currency and fundIBAN
Parameters
currency_
string
the currency of the fund deposit token you need
fundIBAN_
string
the fundIBAN of the fund deposit token you need
Returns
<none>
bytes32
the fund deposit token key
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is minted.
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is transferred.
Event emitted when a FrictionlessFundDeposit
, FrictionlessDigitalSecurity
or FrictionlessOnChainAsset
is burned.
throws if specific address is zero.
error throw if the function caller is not a PROTOCOL_TREASURY address. Thrown during the mintFundDepositForTreasury
error throw if the FundDepositToken for specified currency and fundIBAN already exists
error throw if the data for the token init data FrictionlessTokenInitData
is invalid. Thrown during the _setTokensInitData
error throw if the data for the token init data FrictionlessTokenInitData
is already set. Thrown during the _setTokensInitData
error throw if the data for the IFrictionlessFundDepositToken is invalid. Thrown during the mintFundDepositForTreasury
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintDigitalSecurity
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintOnChainAsset
error throw if the data for the IFrictionlessDigitalSecurityToken is invalid. Thrown during the mintOnChainAsset
Structure that encapsulates both the implAuthority and the compliance for the specific token.
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessAttestationManager See the flow and description of the attestation workflow in the diagram at https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/-/raw/main/docs/img/frictionless-fund-deposit-flow-attestation.png
Update the token address of the FrictionlessFundDepositToken
for the currency_
and iban_
pair.
Parameters
tokenAddress_
address
the address of deposit FrictionlessFundDepositToken
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
currency_
string
the currency associated with the FrictionlessFundDepositToken
throws FrictionlessAttestationManagerTokenZeroAddress
if tokenAddress_ address is a zero address emits FrictionlessFundDepositAttestationTokenUpdated
upon successful updating
Confirm the attestation by signing the signature, this is the proof of the attestation by the PERMISSIONED_FUND_ACCOUNTANT
Parameters
attestationData_
AttestationData
attestation data to sign
sig_
bytes
the signature to sign by the PERMISSIONED_FUND_ACCOUNTANT throws FrictionlessAttestationManagerNotEnoughPermissions
if the msg.sender does not have the role PERMISSIONED_FUND_ACCOUNTANT throws FrictionlessAttestationManagerInvalidAttestation
if the attestation cannot be confirmed, meaning the signed attestation cannot be verified. emits FrictionlessFundDepositAttestationConfirmed
upon successful signing
Get the minimum balance amount configured, for which an attestation can be run. If the balance of the attestation is below the value configured, the error will be thrown. The minimum allowed is 10_000 or 0.01
Returns
<none>
uint256
minimum attestation balance.
Get minimum time (reportEnd - reportStart) in blocktime for which an attestation can be run. Typically this is 1 hour, and dependent on the availability of transaction data in the underlying fund account as specified by the IBAN. The minimum allowed is 300 seconds.
Returns
<none>
uint256
minimum attestation window.
Get maximum time (reportEnd - reportStart) in blocktime for which an attestation can be run. Typically this is 30 days, aligned with the reporting as per regulation for the underlying fund and issuer of the deposit token. The maximum allowed is 365 days.
Returns
<none>
uint256
maximum attestation window.
Retrieves the keys of attestation data associated with a specific account identified by IBAN and currency.
Parameters
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
currency_
string
the currency associated with the FrictionlessFundDepositToken
Returns
<none>
bytes32[]
the array of bytes32 attestation data keys associated with the account.
Retrieves the last attestation data associated with a specific account identified by IBAN and currency.
Parameters
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
currency_
string
the currency associated with the FrictionlessFundDepositToken
Returns
<none>
AttestationData
the AttestationData
struct representing the last attestation data associated with the account.
Retrieves the key of the last attestation data associated with a specific account identified by IBAN and currency.
Parameters
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
currency_
string
the currency associated with the FrictionlessFundDepositToken
Returns
<none>
bytes32
the last attestation data key associated with the account.
Retrieves attestation data by the attestation data key.
Parameters
attestationDataKey_
bytes32
the key identifying the attestation data
Returns
<none>
AttestationData
the AttestationData struct representing the attestation data associated with the given key.
Get the valid FrictionlessFundDepositToken
for the currency_
and iban_
pair.
Parameters
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
currency_
string
the currency associated with the FrictionlessFundDepositToken
Returns
<none>
address
the address of the valid FrictionlessFundDepositToken
for the currency_
and iban_
pair
Mint a new attestation, it returns hash of attestation data to sign by the PERMISSIONED_FUND_ACCOUNTANT
Parameters
attestationData_
AttestationData
the complete set of attestation data to for the PERMISSIONED_FUND_ACCOUNTANT to certify/sign.
Returns
<none>
bytes32
a hash of the attestationData which will be signed to confirm the attestation
Retrieves the attestation data key associated with a specific account identified by currency and IBAN.
Parameters
currency_
string
the currency associated with the FrictionlessFundDepositToken
iban_
string
the IBAN associated with the FrictionlessFundDepositToken
Returns
<none>
bytes32
the accound attestation key.
Emitted when the FrictionlessFundDepositToken
is updated in the IFrictionlessAttestationManager
.
Event emitted upon the confirmation of a FrictionlessFundDepositToken
in the IFrictionlessAttestationManager
thrown if msg.sender address is not a PROTOCOL_TREASURY, during updateAttestationToken
thrown if tokenAddress_ address is a zero address, during updateAttestationToken
thrown if permissionManagerAddr_ address is a zero address, during init
thrown if the FrictionlessFundDepositToken
has not been registered for the IBAN, currency pair.
thrown if the passed AttestationData
report is invalid.
thrown if the attestation balance is too small, below the configurable amount.
thrown if the last transaction hash for the attestation has already been used, this avoids duplicate attestations.
thrown if the attestation cannot be confirmed, meaning the signed attestation cannot be verified.
struct to hold attestation data, which is designed to provide the most recent attestation of balance and verified last transaction in an attestation window.
struct to hold account attestation data
Inherits: IAbstractFeeModule
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Interface defining the frictionless conversion and atomic swapping of ERC-20 tokens for FrictionlessFundDepositToken
on the Frictionless protocol. The conversion of tokens is considered frictionless as the protocol does not impose any fee structures on the conversion itself.
See {PausableUpgradeable-_pause}
See {PausableUpgradeable-_unpause}
Set the conversion fees for the token pair. The fees can be any combination of zero (0%) or upto 10000 bps (100%) on any directional transfer. Fees can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
erc20Token_
address
the address of the ERC20 token.
fundDepositToken_
address
the address of the FundDeposit token.
feeInfo_
FeeInfo
The fees associated with the conversion of the token pair. throws FrictionlessERC20ConverterManagerUnsupportedPair
if the token pair is not valid throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessTokenFeeSet
upon completion of the setting of the fee info for the token in either set of fees
Set the conversion fees for the token pair using the tokenFeeKey_. The fees can be any combination of zero (0%) or upto 10000 bps (100%) on any directional transfer. Fees can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
tokenFeeKey_
bytes32
the tokenFeeKey as determined getConvertTokensKey
feeInfo_
FeeInfo
The fees associated with the conversion of the token pair. throws FrictionlessERC20ConverterManagerUnsupportedPair
if the token pair is not valid throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessTokenFeeSet
upon completion of the setting of the fee info for the token in either set of fees
Removes the conversion fees for the token pair using the tokenFeeKey_. Fees can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
erc20Token_
address
the address of the ERC20 token.
fundDepositToken_
address
the address of the FundDeposit token.
Sets the mapping for the convertible tokens in the contract, calling this will add a new conversion pair to the contract.
Parameters
tokensConvertInfoArr_
FrictionlessTokensConvertInfo[]
the array of token conversions to set. throws FrictionlessERC20ConverterManagerInvalidTokenConvertInfo
if the tokensConvertInfoArr_ contains zero addresses throws FrictionlessERC20ConverterManagerUnableToUpdateConvertInfo
if the tokensConvertInfoArr_ cannot be updated
Converts from an ERC20 token to a FrictionlessFundDepositToken
, using the safe precision conversion. The ERC20 token is transferred to configured treasuryAddress in the conversion and the minted FrictionlessFundDepositToken
is sent to the msg.sender
Parameters
erc20Token_
address
the address of the ERC20 token to convert from, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
fundDepositToken_
address
the address of the FundDeposit token to convert to, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
erc20TokensAmount_
uint256
the amount of tokens to convert throws FrictionlessERC20ConverterManagerInvalidTokenType
if the tokenAddr_ is not a configured convertible erc20Token throw FrictionlessERC20ConverterManagerInvalidTokensAmountAfterConversion
if the conversion resolves to zero Emits the event FrictionlessTokensConverted
detailing the full convertibility
Converts from an ERC20 token to a FrictionlessFundDepositToken
, using the safe precision conversion. The ERC20 token is transferred to configured treasuryAddress in the conversion and the minted FrictionlessFundDepositToken
is sent to the convertedTokensRecipient_
Parameters
erc20Token_
address
the address of the ERC20 token to convert from, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
fundDepositToken_
address
the address of the FundDeposit token to convert to, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
convertedTokensRecipient_
address
the destination of the converted FrictionlessFundDepositToken
erc20TokensAmount_
uint256
the amount of tokens to convert
Returns
<none>
uint256
the amount of FrictionlessFundDepositToken
converted throws FrictionlessERC20ConverterManagerInvalidTokenType
if the tokenAddr_ is not a configured convertible erc20Token throw FrictionlessERC20ConverterManagerInvalidTokensAmountAfterConversion
if the conversion resolves to zero Emits the event FrictionlessTokensConverted
detailing the full convertibility
Converts to an ERC20 token from a FrictionlessFundDepositToken, using the safe precision conversion. The FrictionlessFundDepositToken is burned in the conversion and the ERC20 is sent to the msg.sender
from the treasuryAddress.
Parameters
erc20Token_
address
fundDepositToken_
address
the address of the FrictionlessFundDepositToken token to convert from, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
fundDepositTokensAmount_
uint256
the amount of tokens to convert
Returns
<none>
uint256
the amount of ERC20 converted throws FrictionlessERC20ConverterManagerInvalidTokenType
if the tokenAddr_ is not a configured convertible fundDepositToken throw FrictionlessERC20ConverterManagerInvalidTokensAmountAfterConversion
if the conversion resolves to zero Emits the event FrictionlessTokensConverted
detailing the full convertibility
Converts to an ERC20 token from a FrictionlessFundDepositToken
, using the safe precision conversion. The FrictionlessFundDepositToken is burned in the conversion and the ERC20 is sent to the convertedTokensRecipient_ from the treasuryAddress.
Parameters
erc20Token_
address
fundDepositToken_
address
the address of the FrictionlessFundDepositToken
token to convert from, which must exist in a FrictionlessTokensConvertInfo
in order to succeed.
convertedTokensRecipient_
address
the destination of the converted ERC20 token
fundDepositTokensAmount_
uint256
the amount of tokens to convert
Returns
<none>
uint256
the amount of ERC20 converted throws FrictionlessERC20ConverterManagerInvalidTokenType
if the tokenAddr_ is not a configured convertible fundDepositToken throw FrictionlessERC20ConverterManagerInvalidTokensAmountAfterConversion
if the conversion resolves to zero Emits the event FrictionlessTokensConverted
detailing the full convertibility
Returns the FrictionlessTokensConvertInfo
for the given conversion key
Parameters
convertInfoKey_
bytes32
the address of the token to validate.
Returns
<none>
FrictionlessTokensConvertInfo
the FrictionlessTokensConvertInfo
for the given conversion key
Returns the conversion keys for the given tokenAddr_
Parameters
tokenAddr_
address
the address of the token to validate.
Returns
<none>
bytes32[]
the conversion keys arr for the given tokenAddr_
Returns the count of conversion keys for the given tokenAddr_
Parameters
tokenAddr_
address
the address of the token to validate.
Returns
<none>
uint256
the count of conversion keys arr for the given tokenAddr_
Returns the FrictionlessTokensConvertInfo
for the given tokenAddr_
Parameters
tokenAddr_
address
the address of the token to validate.
Returns
<none>
FrictionlessTokensConvertInfo[]
the FrictionlessTokensConvertInfo
for the given tokenAddr_
Returns true if the token specified by the tokenAddr_
has been registered as a valid convertible pair.
Parameters
tokenAddr_
address
the address of the token to validate.
Returns
<none>
bool
true if the token specified by the tokenAddr_
has been registered as a valid convertible pair, otherwise false
Returns true if the token pair specified have been registered as a valid convertible pair.
Parameters
erc20Token_
address
the address of the ERC20 token.
fundDepositToken_
address
the address of the FundDeposit token.
Returns
<none>
bool
true if the token pair specified have been registered as a valid convertible pair, otherwise false
Returns true if the conversion key is supported.
Parameters
convertTokenKey_
bytes32
the conversion key as defined by getConvertTokensKey
Returns
<none>
bool
true if Returns true if the conversion key is supported, otherwise false
Returns the conversion key for the given token pair.
Parameters
token0_
address
the first token in the convertible pair
token1_
address
the second token in the convertible pair
Returns
<none>
bytes32
the conversion key for the given token pair throws FrictionlessERC20ConverterManagerIdenticalAddresses
if both tokens are identical throws FrictionlessERC20ConverterManagerZeroAddress
if the tokens are a zero address
Event emitted when a successful conversion occurs between an ERC20 and a FrictionlessFuncDepositToken.
thrown during addFrictionlessTokensConvertInfo
if the tokensConvertInfoArr_ contains zero addresses
thrown during addFrictionlessTokensConvertInfo
if the tokensConvertInfoArr_ cannot be updated
thrown during a convert to/from an ERC20 if the conversion resolves to zero
thrown during a convert to/from an ERC20 if the conversion is attempted for the same token
thrown if the IFrictionlessERC20ConverterManager
is configured as a zero address
Struct to represent the conversion between an ERC20 token and a FrictionlessFundDepositToken
on the Frictionless protocol
Inherits: IAbstractFeeModule
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessTransferManager is responsible for the management of the various transfer methodologies, fees processing, and defined control paradigm for DvP for all tokens in the Frictionless protocol. The tokens and their lifecycles are defined in the public README for the Frictionless protocol at https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/-/blob/main/README.md?ref_type=heads#funds-flows
Set a minimum redemption amount, to ensure there is meaningful settlement amounts, generally this is used to ensure FIAT transfers are above a minimum banking threshold, such as 1 USD.
Parameters
newMinRedeemAmount_
uint256
the minimum redemption amount, if not reached , typically throws FrictionlessTransferManagerRedeemAmountIsLessThanMinimum
Set the transfer fees for the exchange/settlement of a token pair. The fees can be any combination of zero (0%) or upto 10000 bps (100%) on any directional transfer. Fees can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
token0FeeInfo_
TokenFeeInfo
The fees associated with the transfer of token0 (first token) in the exchange/settlement of the token pair.
token1FeeInfo_
TokenFeeInfo
The fees associated with the transfer of token1 (second token) in the exchange/settlement of the token pair. throws FrictionlessTransferManagerInvalidTokenAddresses
if the token addresses are invalid. throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessTokenFeeSet
upon completion of the setting of the fee info for the token in either set of fees
Set the fee associated with the transfer of a Token and manages the mapping of the key to this set of Fees. Can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
tokenFeeKey_
bytes32
the key, generated by the function getTokenFeeKey
, which is used to map a specific transfer polarity for tokens.
tokenFeeInfo_
TokenFeeInfo
The fees associated with the transfer of token, used in the calculation and disbursement of fees during exchange/settlement of a token pair. throws FrictionlessTransferManagerInvalidTokenAddresses
if the token addresses are invalid. throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessTokenFeeSet
upon completion of the setting of the fee info for the token
Executes a token pair exchange. This function can only be invoked by the PROTOCOL_TREASURY
Parameters
token0TransferData_
TokenTransferData
the transfer data for the first token in the exchange
token1TransferData_
TokenTransferData
the transfer data for the second token in the exchange throws FrictionlessTransferManagerNotEnoughTokens
if the balance of any of the tokens held by any users in the transfer is below the transfer amount throws FrictionlessTransferManagerInvalidTokenAddresses
if any of the token addresses are zero. throws FrictionlessTransferManagerZeroAmount
if any of the token amounts are zero throws FrictionlessTransferManagerInvalidTokenSenderAddresses
if the expectedToken0Sender_ is not the same as the token0TransferData_.tokenSender throws FrictionlessTransferManagerInvalidTokenSenderAddresses
if the token1TransferData_.tokenSender is a zero address emits FrictionlessTokensExchanged
upon successful exchange.
Initiates/Creates a transferOffer between a token pair exchange. Setting the transfer status to PENDING for state management of the overall transfer. This function generates a transferOfferId_ which is returned so invokers of the function can perform further functions such as confirmTransferOffer
or cancelOffer
.
Parameters
token0TransferData_
TokenTransferData
the transfer data for the first token in the exchange
token1TransferData_
TokenTransferData
the transfer data for the second token in the exchange
Returns
<none>
uint256
transferOfferId_ representing the stored transfer in this contract for future operations such as confirmTransferOffer
or cancelOffer
. throws FrictionlessTransferManagerNotEnoughTokens
if the balance of any of the tokens held by any users in the transfer is below the transfer amount throws FrictionlessTransferManagerInvalidTokenAddresses
if any of the token addresses are zero. throws FrictionlessTransferManagerZeroAmount
if any of the token amounts are zero throws FrictionlessTransferManagerInvalidTokenSenderAddresses
if the expectedToken0Sender_ is not the same as the token0TransferData_.tokenSender throws FrictionlessTransferManagerInvalidTokenSenderAddresses
if the token1TransferData_.tokenSender is a zero address emits FrictionlessTransferOfferCreated
upon successful offer created.
Redeem/Burn an amount for tokens for the specified tokenAddr_ and msg.sender
Parameters
tokenAddr_
address
the address of the token
redeemAmount_
uint256
the amount of the token to burn (redeem) throws FrictionlessTransferManagerZeroAddress
if the token address or the msg.sender is a zero address throws FrictionlessTransferManagerZeroAmount
if the redeemAmount_ is zero throws FrictionlessTransferManagerNotEnoughTokens
if the balance of a user for a given token is below the redeemAmount_ emits FrictionlessTokensRedeemed
when the burn has occurred
Redeem/Burn an amount for tokens for the specified ERC20 tokenAddr_ and msg.sender, this will convert the ERC20 token to a FrictionlessFundDepositToken first, then redeem See {IFrictionlessERC20ConverterManager-isTokenSupported} {IFrictionlessERC20ConverterManager-convertFromERC20}
Parameters
erc20Token_
address
the address of the ERC20 token
fundDepositToken_
address
the address of the FundDeposit token
tokenRedeemAmount_
uint256
the amount of the token to convert & burn (redeem) throws FrictionlessTransferManagerZeroAddress if the token address or the msg.sender is a zero address throws FrictionlessTransferManagerZeroAmount if the tokenRedeemAmount_ is zero throws FrictionlessTransferManagerNotEnoughTokens
if the balance of a user for a given token is below the tokenRedeemAmount_ throws FrictionlessTransferManagerInvalidERC20TokenForRedeem
if the tokenAddr_ is noy a valid convertible ERC20 token emits FrictionlessTokensRedeemed when the burn has occurred
Redeem/Burn an amount for tokens for the specified tokenAddr_ and userAddr_. This function can only be invoked by the PROTOCOL_TREASURY
Parameters
tokenAddr_
address
the address of the token
userAddr_
address
the address of the holder of the token
redeemAmount_
uint256
the amount of the token to burn (redeem) throws FrictionlessTransferManagerZeroAddress if the token address or the userAddr_ is a zero address throws FrictionlessTransferManagerZeroAmount if the redeemAmount_ is zero throws FrictionlessTransferManagerNotEnoughTokens
if the balance of a user for a given token is below the redeemAmount_ emits FrictionlessTokensRedeemed when the burn has occurred
Redeem/Burn an amount for tokens for the specified ERC20 tokenAddr_ and userAddr_. This will convert the ERC20 token to a FrictionlessFundDepositToken first, then reedem. This function can only be invoked by the PROTOCOL_TREASURY See {IFrictionlessERC20ConverterManager-isTokenSupported} {IFrictionlessERC20ConverterManager-convertFromERC20}
Parameters
erc20Token_
address
the address of the ERC20 token
fundDepositToken_
address
the address of the FundDeposit token
userAddr_
address
the address of the holder of the token
tokenRedeemAmount_
uint256
the amount of the token to convert and burn (redeem) throws FrictionlessTransferManagerZeroAddress if the token address or the userAddr_ is a zero address throws FrictionlessTransferManagerZeroAmount if the tokenRedeemAmount_ is zero throws FrictionlessTransferManagerNotEnoughTokens
if the balance of a user for a given token is below the tokenRedeemAmount_ throws FrictionlessTransferManagerInvalidERC20TokenForRedeem
if the tokenAddr_ is noy a valid convertible ERC20 token emits FrictionlessTokensRedeemed when the burn has occurred
Confirms and processes the transfer for the respective transferOfferId_, which results int he compliant token transfers under ERC-3643 specification to occur.
Parameters
transferOfferId_
uint256
the id of the transfer returned/emitted in the function createTransferOffer
Requires the transfer status is TransferStatuses.PENDING
throws FrictionlessTransferManagerInvalidTransferStatus
if the transfer status is NOT TransferStatuses.PENDING
throws FrictionlessTransferManagerNotEnoughPermissions
If the msg.sender is not the tokenSender of the second token in the exchange or if the msg.sender is not a valid TREX Agent of either toekns in the exchange. emits FrictionlessTransferOfferConfirmed
upon successful completion of the transfers.
Cancels a transfer for the given transferOfferId_, which results in the transfer status being set to TransferStatuses.CANCELED
and the relevant FrictionlessTransferOfferCanceled
being emitted.
Parameters
transferOfferId_
uint256
the generated transferOfferId_ used to store the state of transfers in the contract. requires the Transfer to be in a PENDING state. throws FrictionlessTransferManagerInvalidTransferStatus
if the transfer status is NOT TransferStatuses.PENDING
throws FrictionlessTransferManagerNotEnoughPermissions
If the msg.sender is not the tokenSender of the second token in the exchange or if the msg.sender is not a valid TREX Agent of either tokens in the exchange.
Generates the next transferOfferId in the smart contract, used to store state of a transfer.
Returns
<none>
uint256
the next transferOfferId in the smart contract, used to store state of a transfer.
Get the minimum redemption amount configured
Returns
<none>
uint256
minimum redemption amount, to ensure there is meaningful settlement amounts, generally this is used to ensure FIAT transfers are above a minimum banking threshold, such as 1 USD.
Returns the transfer data stored for the given transferOfferId_
Parameters
transferOfferId_
uint256
the generated transferOfferId_ used to store the state of transfers in the contract
Returns
<none>
TransferData
TransferData, the transfer data for the given transferOfferId_
get the tokenFeeInfo set for the fees associated per token in an exchange.
Parameters
token0_
address
the address of the first token in an exchange
token1_
address
the address of the second token in an exchange
Returns
<none>
FeeInfo
FeeInfo set for the fees associated per token in an exchange.
<none>
FeeInfo
Generates keys based on the packed encoding of the addresses of sets of tokens using the keccak256 hashing function. Used to store tokenFees in mappings.
Parameters
token0_
address
the address of the token 0 in a transfer fee calculation
token1_
address
the address of the token 1 in a transfer fee calculation
Returns
<none>
bytes32
keys based on the packed encoding of the addresses of sets of tokens using the keccak256 hashing function.
<none>
bytes32
Generates a key based on the packed encoding of the addresses of both tokens using the keccak256 hashing function. Used to store tokenFees in mappings.
Parameters
token0_
address
the address of the token 0 in a transfer fee calculation
token1_
address
the address of the token 1 in a transfer fee calculation
Returns
<none>
bytes32
generates a key based on the packed encoding of the addresses of both tokens using the keccak256 hashing function.
Event emitted during createTransferOffer
Event emitted during confirmTransferOffer
Event emitted during cancelOffer
Event emitted during exchangeTokens
Event emitted during redeemTokens
and redeemTokensFrom
error thrown during setTransferFees
, setTransferFees
, exchangeTokens
or createTransferOffer
if any of the token addresses are zero.
error thrown during exchangeTokens
or createTransferOffer
if any of the tokenSender address in an exchange is a zero address
error thrown during createTransferOffer
if the token transfer is prohibited under Compliance contract rules
error thrown during redeemTokens
or redeemTokensFrom
if the token address or the msg.sender is a zero address
error thrown during exchangeTokens
, createTransferOffer
, redeemTokens
or redeemTokensFrom
if any of the token amounts are zero
error thrown when the redemption amount is below the configured minimum, during redeemTokens
or redeemERC20Tokens
error thrown during exchangeTokens
, createTransferOffer
, redeemTokens
or redeemTokensFrom
if the balance of any of the tokens held by any users in the transfer is below the transfer amount
error thrown during confirmTransferOffer
or cancelOffer
if the transfer status expectedStatus does not match the actualStatus
error thrown during createTransferOffer
or confirmTransferOffer
if any of the msg.sender is not an Agent of the tokens in the transfer.
TokenFeeInfo represents the fee (zero or otherwise) that is associated with the transfer of a token in the Transfer Manager exchange.
TokenTransferData represents the data set in a transfer of a token
TransferData represents a maker/taker model of transfer, where 1 token is exchanged for another
Enumeration to track transfer statuses
Inherits: IAbstractFeeModule
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Interface defining the frictionless conversion and atomic swapping of any FrictionlessFundDepositToken
currency pair on the Frictionless protocol. The FX rates are set from the live spot & forward FX partners on the protocol.
Sets the address of the FXDesk fee recipient Only Owner (PROTOCOL_ADMIN) can call this function
Parameters
newFXDeskFeeAddr_
address
The new address of the FXDesk fee recipient
Set the swap fees for the swaps of a token pair. The fees can be any combination of zero (0%) or upto 10000 bps (100%) on any directional transfer. Fees can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
token0FeeInfo_
FrictionlessTokenFXFeeInfo
The fees associated with the token0 (first token) in the token pair during the swap.
token1FeeInfo_
FrictionlessTokenFXFeeInfo
The fees associated with the token1 (second token) in the token pair during the swap. throws FrictionlessFXSwapInvalidTokenAddresses
if the token addresses are invalid. throws FrictionlessFXSwapInvalidFeeRecipientAddr
if the feeRecipientAddr doesn't equal to the fxDeskFeeAddr
. throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessFeeSet
upon completion of the setting of the fee info for the token in either set of fees
Set the fee associated with the swap of a Token and manages the mapping of the key to this set of Fees. Can only be set by the Owner (PROTOCOL_ADMIN).
Parameters
tokenFeeKey_
bytes32
The key, generated by the function getTokenFeeKey
, which is used to map a specific swap polarity for tokens.
tokenFeeInfo_
FrictionlessTokenFXFeeInfo
The fees associated with the swap of token, used in the calculation and disbursement of fees during swap of a token pair. throws FrictionlessFXSwapInvalidTokenAddresses
if the token addresses are invalid. throws FrictionlessFXSwapInvalidFeeRecipientAddr
if the feeRecipientAddr doesn't equal to the fxDeskFeeAddr
. throws AbstractFeeModuleInvalidFeeRecipient
if the feeRecipientAddr is a zero address throws AbstractFeeModuleInvalidFee
if the feeInBps is not in the valid range (ZERO_FEES_IN_BPS to MAX_FEES_IN_BPS) emits FrictionlessTokenFeeSet
upon completion of the setting of the fee info for the token
Swaps tokens between addresses at a specified exchange rate Only PROTOCOL_TREASURY can call this function
Parameters
sellingTokenAddr_
address
The address of the token to be sold
buyingTokenAddr_
address
The address of the token to be bought
tokenSender_
address
The address of the sender initiating the swap
tokenRecipient_
address
The address where the bought tokens will be sent
buyingTokensAmount_
uint256
The amount of tokens being bought
buyingTokenExchangeRate_
uint256
The exchange rate of the token being bought to the token being sold
Retrieves the address of the FXDesk fee recipient
Returns
<none>
address
The address of the FXDesk fee recipient
Retrieves the Frictionless Treasury Manager contract
Returns
<none>
IFrictionlessTreasuryManager
The address of the Frictionless Treasury Manager contract
Retrieves the Frictionless Permissions Manager contract
Returns
<none>
IFrictionlessPermissionsManager
The address of the Frictionless Permissions Manager contract
get the tokenFeeInfo set for the fees associated per token in an exchange.
Parameters
token0_
address
the address of the first token in an exchange
token1_
address
the address of the second token in an exchange
Returns
<none>
FeeInfo
FeeInfo set for the fees associated per token in an exchange.
<none>
FeeInfo
Generates keys based on the packed encoding of the addresses of sets of tokens using the keccak256 hashing function. Used to store tokenFees in mappings.
Parameters
token0_
address
the address of the token 0 in a transfer fee calculation
token1_
address
the address of the token 1 in a transfer fee calculation
Returns
<none>
bytes32
keys based on the packed encoding of the addresses of sets of tokens using the keccak256 hashing function.
<none>
bytes32
Generates a key based on the packed encoding of the addresses of both tokens using the keccak256 hashing function. Used to store tokenFees in mappings.
Parameters
token0_
address
the address of the token 0 in a transfer fee calculation
token1_
address
the address of the token 1 in a transfer fee calculation
Returns
<none>
bytes32
generates a key based on the packed encoding of the addresses of both tokens using the keccak256 hashing function.
Calculates the amount of selling tokens based on the buying amount and exchange rate
Parameters
buyingTokensAmount_
uint256
The amount of tokens being bought
buyingTokenExchangeRate_
uint256
The exchange rate of the token being bought to the token being sold
Returns
<none>
uint256
The amount of selling tokens
Event emitted upon successful token swaps
error thrown during setSwapFees
if token adresses are invalid (zero addresses, equals addresses and etc.).
error thrown during setSwapFees
, setTokenFee
and swapTokens
if the fxDeskFeeRecipient doesn't equal to the stored fxDeskFeeAddr
error thrown during swapTokens
if the msg.sender is not a PROTOCOL_TREASURY.
Structure representing token fee information including the token address and fee information
Author: DEFYCA Labs S.à.r.l
Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The IFrictionlessPermissionsManager is responsible for the management of permission of the various participants in the Frictionless protocol. The roles and responsibilities are defined in the public README for the Frictionless protocol at https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/-/blob/main/README.md?ref_type=heads#roles-responsibilities
Validates if a wallet address is permissioned in the Frictionless protocol
Parameters
userAddress
address
the wallet address to verify
Returns
<none>
bool
true if the address is permissioned in the Frictionless Protocol.
Registers a users wallet address as an OnChainId (Identity) to the Frictionless protocol. This Identity is used when permissioning a user to the protocol by invoking the addUser function later.
Parameters
userAddress
address
the address of the user's wallet to register
userISOCountry
uint16
the ISO 3166-1 numeric code of the user, can be the place of residence or the location KYC/AML onboarding was undertaken. requires The msg.sender to have the TREX Agent permissions (PROTOCOL_TREASURY or PROTOCOL_ADMIN)
Returns
<none>
address
address the address of the user's OnChainId (Identity) with the associated claims.
Gets a users OnChainId (Identity) in the Frictionless protocol.
Parameters
userAddress
address
the address of the user's wallet to register requires The msg.sender to have the TREX Agent permissions (PROTOCOL_TREASURY or PROTOCOL_ADMIN)
Returns
<none>
address
address the address of the user's OnChainId (Identity) with the associated claims.
Get the signed claimData message to be used in the addUser function. The message must be signed using the PK of the ClaimIssuer (PROTOCOL_ADMIN)
Parameters
userIdentity
address
the address of the user's OnChainId (Identity)
userType
IFrictionlessPermissionsManager.FrictionlessPermissionedUser
the type of the user as per the enum
Returns
<none>
bytes32
signed claimData message to be used in the addUser unction once signed by the ClaimIssuer PK.
verify if the userAddress is permissioned in the Frictionless protocol and has a valid claim
Parameters
userAddress
address
the address of the user's wallet to verify
userType
FrictionlessPermissionedUser
the type of the user as per the enum
Returns
<none>
bool
true if a valid permissioned user and has a valid claim, otherwise false.
Adds a user's OnChainId (Identity) to the Frictionless protocol along with its associated claim data. The Identity is created by invoking the registerIdentity function first.
Parameters
userIdentity
address
the address of the user's OnChainId (Identity)
userType
FrictionlessPermissionedUser
the type of the user as per the enum
claimSignature
bytes
the signed claimData by the ClaimIssuer
claimURI
string
the URI of the off-chain claim for the user. i.e. The Frictionless Markets graphQL endpoint requires The msg.sender to be the Owner if the userType is the PROTOCOL_TREASURY requires The msg.sender to have the TREX Agent permissions (PROTOCOL_TREASURY or PROTOCOL_ADMIN) to add any user
Returns
<none>
address
address the address of the user's OnChainId (Identity) with the associated claims.
Removes a user from the Frictionless protocol along with its associated claim data.
Parameters
userAddress
address
the address of the user's wallet requires The msg.sender to have the TREX Agent permissions (PROTOCOL_TREASURY or PROTOCOL_ADMIN) to remove any user
Returns
<none>
bool
true if the user is removed from the Frictionless protocol along with its associated claim data, otherwise false.
Emitted when a user is added to the Frictionless protocol. This event is emitted by the addUser
function.
Emitted when a user is registered in the Frictionless protocol. This event is emitted by the registerIdentity
function.
Emitted when a user is removed in the Frictionless protocol. This event is emitted by the removeUser
function.
throws if specific address is zero.
throws if treasury tries to add or remove treasury.
throws if user is not a permissioned investor
the internal struct defining a Claim for a PERMISSIONED_USER in the protocol. Used to submit claims for the OnChainId by the ClaimIssuer.
Enum of the Frictionless protocol participants.
Release v2.0.0 of the Frictionless Markets APIs built on OpenAPI specification on confidential compute cluster to ISO-27001 and SOC-2 specifications are due for release on Jan 24th 2024 (24/1/24).
Please check back with us or watch for announcements on our socials and LinkedIn.
The Manager Contracts are the main entry points to the Frictionless protocol, they perform market functions such as permission management, treasury operations, issuance, transfer and settlement of securities, and attestations of deposits (proof-of-reserve) for the underlying of FrictionlessFundDepositTokens.
There are four main manager contracts in the Frictionless protocol, as described below.
The FrictionlessPermissionsManager defines a set of functions and events related to managing participants' permissions in the Frictionless protocol.
The interface includes an enumeration FrictionlessPermissionedUser
that enumerates different participants in the Frictionless protocol, such as PROTOCOL_TREASURY, PERMISSIONED_CUSTODIAN, etc.
Only valid agents can register, add or remove users and their associated claims.
The FrictionlessTransferManager manages the transfer of tokens within the Frictionless protocol. It is also responsible for the collection of fees associated with the exchange of tokens. These fees are mapped to specific fee schedules set by managers on their respective issuances.
The FrictionlessTransferManager overview is provided in the source README.
The Frictionless protocol enables GPs and Managers to collect fees on the primary issuance and secondary trades of digital securities.
The Frictionless protocol enables Investors to bilaterally trade digital securities via the FrictionlessTransferManager smart contract whilst enabling Managers to optionally collect fees on the transaction.
SeeonlyCounterpart
mode
The Frictionless protocol enables Managers and GPs to control cash distributions, waterfalls, and capital calls without the direct action of Investors, enabling sophisticated automation via the Frictionless Markets APIs and Manager automation interface.
See onlyTreasury
mode
exchangeTokens
, this function will execute the exchange of tokens between two counterparties, but it is executed by the PROTOCOL_TREASURY as the transfer agent optionally collecting fees. For example, payment in FrictionlessFundDepositToken by an Investor for FricitonlessDigitalSecurityToken held by a custodian (Primary trade) or FricitonlessDigitalSecurityToken held by another Investor (secondary trade).
The exchange flow is as follows:
The PROTOCOL_ADMIN optionally sets the transfer fees for the token inbound and outbound.
The PROTOCOL_TREASURY invokes the exchangeTokens
function, indicating the polarity of the transaction, such as cash for cash, cash for security, security for cash, or security for security. There are many options, but they all result in the same outcome, the compliant transfer of a Frictionless token for another Frictionless token in a single atomic transaction on-chain.
The transfer is enacted using the ERC-3643-compliant token transfer IToken.forcedTransfer
.
More scenarios for DvP are described in the source README.
createTransferOffer confirmTransferOffer
, cancelTransferOffer
these functions will execute the exchange tokens in a bilateral P2P mode between two counterparties in a maker-taker mode. This mode also optionally enables the protocol to collect fees.
The exchange flow is as follows:
The PROTOCOL_ADMIN optionally sets the transfer fees for the token inbound and outbound.
Investor X invokes the createTransferOffer
function, indicating the offer, such as cash for cash, cash for security, security for cash, or security for security. There are many options, but they all result in the same outcome, the compliant transfer of a Frictionless token for another Frictionless token in a single atomic transaction on-chain.
Investor Y can accept the offer by invoking the confirmTransferOffer
function, ensuring the ERC-3643-compliant token transfer using IToken.transferFrom
.
The FrictionlessTreasuryManager manages the minting, transfer, and burning of various tokens within the Frictionless protocol
Token Minting and Management:
The contract provides functions to mint different types of tokens within the Frictionless protocol, including Fund Deposit Tokens (mintFundDepositForTreasury
), Digital Security Tokens (mintDigitalSecurity
), and On-Chain Asset Tokens (mintOnChainAsset
).
Tokens are associated with compliance contracts, and their minting is subject to specific conditions, roles, and permissions.
Token Transfer and Burning:
The contract allows for the transfer and burning of tokens through functions like transferToken
and burnToken
. These actions are performed by an agent with the necessary permissions.
Fund Deposit Token Management:
The contract keeps track of existing Fund Deposit Tokens using a mapping _existingFundDepositTokens
. It prevents the creation of duplicate Fund Deposit Tokens for the same currency and fund IBAN.
The PROTOCOL_ADMIN is the only role permissioned to initially mint any Frictionless tokens, thereafter valid agents such as the PROTOCOL_TREASURY are permitted to increase supply (mint to address), transfer and burn Frictionless tokens.
The FrictionlessAttestationManager responsible for providing attestations of the balances held in the underlying funding account for each FrictionlessFundDepositToken
. The attestation is provided and signed by an independent 3rd party, known as PERMISSIONED_FUND_ACCOUNTANT in the Frictionless protocol.
Attestations are proof of balances in each currency on a regular basis for example, daily or hourly, the attestation data is based on the following snapshot of the currency account underpinning the FrictionlessFundDepositToken.
CASH_IBAN
The IBAN of the cash account
CURRENCY
The 3-letter currency code of the cash account
REPORT_START_DATE
The start of this report, for example, yesterday at 6AM
REPORT_END_DATE
The end of this report, for example, today at 6AM
CASH_BALANCE
The actual balance on the account as of REPORT_END_DATE
for example, today 6AM
LAST_TX_COUNTERPARTY_ID
The ID of the counterparty in the last transaction on the account
LAST_TX_TIMESTAMP
The timestamp (same format as REPORT_END_DATE) in the last transaction on the account
LAST_TX_AMOUNT
The amount of the the last transaction on the account, A credit transaction is positive and a debit transaction is negative
The attestation workflows are described in the source README.
Frictionless FX Swaps enable Investors to invest instantly, securely and risk-free at super low cost in multiple currencies.
The FX Swap contracts in the Frictionless protocol provide an instant/atomic swap of a currency pair at a quoted spot or forward rate.
Built on cash custody with G-SIB banking providers and FX partners in the EU, the list of supported currencies and currency pairs is maintained in our Frictionless Institutional Deposit Tokens listing.
Frictionless FX Swaps remove the complexity of investing in multi-currency, whilst providing ultimate flexibility and transparency of FX rates and settlement.
FX Swaps work by automating the treasury operations in an FX transaction, namely:
Establishment of optional FX fees to be paid by the seller of currency A
,
Utilization of the buying rate for currency Z
in the swap. The rate utilized in the Frictionless protocol is obtained from our FX partners, the Frictionless Markets team support both spot and forward rates for FX Swaps offering clients the ultimate flexibility and transparency in FX swaps.
Execution of the swap as a single atomic transaction whereby currency A
and currency Z
are burned and minted from/to two counterparties with the automatic collection of optional fees. This operation can only be directed by the PROTOCOL_TREASURY to avoid market manipulation of FX rates.
An example of a live FX Swap on the Avalanche C-Chain is at https://snowtrace.io/tx/0x115570645b70ac573e9ce2f2d4e03f0bd71f502e4dd7019bab6a155417138851?chainId=43114.
In this FX Swap USD was sold for 5,000 EUR. The rate used was a spot rate provided to the Frictionless Markets team. In the block explorer, you can see the collection of fees, burn of fsUSD and mint of fsEUR. The swap and fee collection ran as a single atomic transaction and cost 0.80 USD to execute on the Avalanche C-Chain.
ERC20 Swaps were designed by the developers in the Frictionless protocol to risk off permissionless stablecoins such as USDC or USDT.
Permissionless are a great innovation from the crypto markets which were designed for permissionless crypto referencing to US Dollars, however handling stablecoins for traditional institutional partners is still a risky proposition.
Using the ERC20 Converter contracts, FrictionlessFundDepositTokens can be converted to/from stablecoins using the Frictionless protocol to help Managers accept stablecoins whilst off-loading their associated risks, such as de-peg events, underlying community bank reliance and liquidity risks.
The PROTOCOL_TREASURY manages the on/off ramp of the ERC20 stablecoin, such as USDC/USDT within its fund structures of FRICTIONLESS MARKETS SECURITIES FT.
The availability of a valid configured ERC20 token for conversion to/from FrictionlessFundDepositToken along with the associated fees is transparent, any market participant may query the smart contract.
The principle of an ERC20 Swap is simple.
The PROTOCOL_ADMIN defines the valid token pairs which are convertible on a 1:1 basis.
Fees can be optionally defined for the conversion to/from the ERC20 token.
The holder (Investor) of ERC20 tokens invokes the convertFromERC20
function of the smart contract, the ERC20 tokens are sent to the PROTOCOL_TREASURY and a matching amount of FrictionlessFundDepositToken is minted and sent to the holder (Investor).
If the Investor wishes to convert their FrictionlessFundDepositToken to a valid configured ERC20 token, such as USDC/USDT, then they can invoke the convertToERC20
function of the smart contract. In this case, the PROTOCOL_TREASURY will receive the FrictionlessFundDepositToken and burn it, transferring the matching amount of ERC20 (less any fees) to the Investor.
An example of two live ERC20 swaps on the Avalanche C-Chain are;
In these swaps, you can observe the collection of optional fees and the atomic settlement of the swap of the fsUSD tokens with USDC into the PROTOCOL_TREASURY.
Release v2.0.0 of the Frictionless Markets APIs built on OpenAPI specification on confidential compute cluster to ISO-27001 and SOC-2 specifications are due for release on Jan 24th 2024 (24/1/24).
Please check back with us or watch for announcements on our socials and LinkedIn.
The Frictionless platform is built on a microservice pattern, deployed on Confidential Google Kubernetes clusters for dedicated ISO-27001 secured environments, the stack is built to OpenAPI standard and interacts with the Frictionless smart contracts via our internal proprietary Frictionless Chain Service built over the massively scalable Neo4J and graphQL.
The Frictionless protocol is designed and built on the Avalanche C-Chain, for public-permissioned issuance, trade and settlement of private markets digital securities in compliance with the blockchain & securitization laws of Luxembourg.
The Avalanche C-Chain network is the Frictionless Markets Treasury Chain, which means that issuances and settlement of Frictionless tokens are carried out on Avalanche.
Always check that the smart contracts you interact with are valid contracts issued by the Frictionless Markets Protocol Administrator.
The PROTOCOL_ADMIN address is 0x55749224f94d79687Ba3955db2180d7C5D7D2409
Any other address purporting to offer the Frictionless protocol is not valid.
If you have any queries or wish to report any suspected issues, please contact the protocol admin team via protocol_admin@frictionless.markets
The Frictionless PROTOCOL_ADMIN has deployed at the following contract addresses.
FrictionlessFundDepositToken
FrictionlessOnChainAssetToken
FrictionlessDigitalSecurityToken
FrictionlessPermissionsManager
FrictionlessTreasuryManager
FrictionlessTransferManager
FrictionlessERC20ConverterManager
FrictionlessAttestationManager
FrictionlessFXSwap
Release v2.0.0 of the Frictionless Markets APIs built on OpenAPI specification on confidential compute cluster to ISO-27001 and SOC-2 specifications are due for release on Jan 24th 2024 (24/1/24).
Please check back with us or watch for announcements on our socials and .
The attestations for Frictionless Institutional Deposit Tokens are proved by the PERMISSIONED_FUND_ACCOUNTANT (Creatrust Luxembourg) and are publicly available at
Always check that the smart contracts you interact with are valid contracts issued by the Frictionless Markets Protocol Administrator.
The PROTOCOL_ADMIN address is 0x55749224f94d79687Ba3955db2180d7C5D7D2409
Any other address purporting to offer the Frictionless protocol is not valid.
If you have any queries or wish to report any suspected issues, please contact the protocol admin team via protocol_admin@frictionless.markets
The Frictionless has deployed the following FrictionlessFundDepositTokens.
The Frictionless Institutional Deposit Tokens are deployed at the following token addresses on Avalanche.
The Frictionless Institutional Deposit Token (FricitonlessFundDepositToken) is designed as a method of recording a FIAT contribution for a PERMISSIONED_INVESTOR into a listed fund on the Frictionless protocol.
Neither Frictionless Markets nor its parent company DEFYA HOLDINGS nor any subsidiaries actively manage currency contributions for Investors or permissioned participants in the protocol. All investment decisions must made exclusively by Investors or their appointed wealth advisors or agents.
The Frictionless Markets team passively manages a collection of open-ended fund structures which are designed to securitise the currency contributions, so thereafter these tokens can be used to record payment, settlement and trade in tokenized securities from funds listed on the Frictionless protocol.
The following high-level diagram describes the main participants and their high-level interaction with the protocol.
The Frictionless Markets APIs are offered under commercial license terms if you wish to license the technology including the secure APIs, GraphQL data store, UI and automation services, please contact the team at or via profile.
The Frictionless protocol contracts are deployed at the following addresses on Avalanche.
For more information on the legal structure of the FRICTIONLESS MARKETS SECURITIES FT, consult our
USD
EUR
GBP
CHF
HKD
SGD
JPY
AED