# Integrating Tinlake & the RWA Market Investing in Tinlake pools and the RWA Market requires onboarding as an investor and to each specific pool. ![](https://storage.googleapis.com/centrifuge-hackmd/upload_a0cd5cd027ebab353e2362d764cb3774.png) **Onboard as investor**: Onboarding as an investor is a one-time step to verify your profile for KYC ("Know your customer") through the Securitize service. Once onboarded as an investor, they are eligible to invest in any Tinlake pool and the RWA Market. **Onboard to pool**: Onboarding to a pool requires signing a subscription agreement with the pool issuer. Once the agreement has been signed by both parties, they are automatically whitelisted for investment. ## How to integrate To integrate this into your app, there's a few steps that need to be done: 1. Check the current onboarding status of the investor address using the endpoint described below. 2. If this status is not `done`, then you should redirect the user to the `url` returned by this endpoint. This will lead the investor to the onboarding UI, which allows them to go through the necessary steps. This is how it will look for the investor: ![](https://storage.googleapis.com/centrifuge-hackmd/upload_c6fc5caaf219763f7aa54ebda46065b8.png). Once they are done, they will be redirected back to your app through the callback URL. 3. If the status is `done`, then the investor is ready to go. For the RWA Market, you can use the same smart contract methods as the other Aave markets, but using the RWA Market specific contract addresses, which you can find below. ## Onboarding API documentation ### Retrieving current status To retrieve the status of an address, you can query this endpoint: ``` GET https://onboard-api.centrifuge.io/pools/[:pool_id]/addresses/[:address]/statuscallback_url=[:callback_url]&tranche=[:tranche] ``` The parameters are: - `pool_id`: this is `rwa-market` for the RWA Market, and the root contract ID for Tinlake pools - `address`: the Ethereum address - `callback_url`: this is the URL that the user should return to after finishing the onboarding actions. Generally this is the URL of your app. - `tranche`: optional, `senior` or `junior` for Tinlake pools, does not apply for the RWA Market This will return the following response: ```json= { status: 'not-started' | 'action-required' | 'pending' | 'done' url: '...' | undefined } ``` `status` indicates the current onboarding status of this address: - `not-started`: The process still needs to be started. The user should be redirected to `url` to start. - `action-required`: The process has started, but there's more input required. The user shoudl be redirected to `url` to continue. - `pending`: The user needs to wait on some external user (e.g. the KYC is pending or the subscription agreement needs to be counter-signed). The user should not be redirected. - `done`: The user is ready to invest in this token. `url` represents the URL that the user should be redirected to in case there's an action required. :::info Note: the above endpoint is still in development and is not currently live in production, but will be added soon. ::: ### Retrieving detailed information ``` GET https://onboard-api.centrifuge.io/pools/[:pool_id]/addresses/[:address]?tranche=[:tranche] ``` The parameters are: - `pool_id`: this is `rwa-market` for the RWA Market, and the root contract ID for Tinlake pools - `address`: the Ethereum address - `tranche`: optional, `senior` or `junior` for Tinlake pools, does not apply for the RWA Market This will return the following response: ```json= { kyc: { status: "verified", isWhitelisted: { senior: true, junior: false }, isEntity: true, url: ":url", isUsaTaxResident: false, accredited: false }, agreements: [ { name: "Subscription Agreement", tranche: "senior", provider: "docusign", providerTemplateId: ":uuid", signed: true, counterSigned: true, declined: false, voided: false } ], linkedAddresses: [ ":address" ], restrictedGlobal: false, restrictedPool: false, showNonSolicitationNotice: true } ``` ## Contract addresses ### RWA Market :::info LendingPoolAddressesProvider: 0xB953a066377176092879a151C07798B3946EEa4b LendingPoolAddressesProviderRegistry: 0x34a828dE39F2A47F203B4905F80ABd5742dD3405 ReserveLogic: 0xD7773256f31F62d69aE2378d429Cca06D119dFEB GenericLogic: 0xbD385C6ef5a410721Eef300293Cb0B75274306Dc ValidationLogic: 0xb1E7fd7850BF47A493DA8CDF10eF45449B2f0276 LendingPoolImpl: 0x1b94587eEF7538b99C348781720AF92Cd71f7F4D LendingPool: 0xA1a8c33C9a9a9DE231b13a2271a7C09c11C849F1 LendingPoolConfiguratorImpl: 0x5Bf7dc161ec5B7e5415a9d868C87fd6C31CA1C18 LendingPoolConfigurator: 0x88CDc0eADB647156c81778d51dE17BC9f969956C StableAndVariableTokensHelper: 0x9A79bBF3d9E2cFE716A0501C6603e8Ff04541966 ATokensAndRatesHelper: 0xa6d65dC9e281894dd122170e844Bb00d56D0Cd37 AaveOracle: 0xf20E5fe26811f7336a8A637C42b6e8913B291868 LendingRateOracle: 0x4b59519Ff1332a059fcc4479310dfE24162C10aA AaveProtocolDataProvider: 0xe69DE09Cd274242DDD7004794a4b00EbE9B65fEA StableDebtToken: 0xd31052dA4722f6f54f65c4ceb5945a728c390364 VariableDebtToken: 0x7dF6698667e23E3A59a80d99E2ef9667c5A3b6EA AToken: 0x6ea948858c62AC47FD26a6A644Eead9F2a9c5e62 aTokenImpl: 0x6ea948858c62AC47FD26a6A644Eead9F2a9c5e62 DefaultReserveInterestRateStrategy: 0x1fd1BFF5223a0D4C5171216A859d3556C888DD7f LendingPoolCollateralManagerImpl: 0xD9DEAC430aD83245DABA48305ec22B7d028AA6E3 LendingPoolCollateralManager: 0xD9DEAC430aD83245DABA48305ec22B7d028AA6E3 WalletBalanceProvider: 0x1dDCDEf55032D9e0D50Da6Ff198bd72193A105aD rateStrategyDROP: 0x1fd1BFF5223a0D4C5171216A859d3556C888DD7f PermissionedStableDebtToken: 0xf87AF03B97ae4F251c19963cBB086aD10B6051AE PermissionedVariableDebtToken: 0x6dA7Be52d89EaAc56587cd05AF1F8329BC1a1Cb4 PermissionManager: 0xB4A760B14ebb26AE6f9Ce16A601D936dC575caaf UiPoolDataProvider: 0x7FdbD3A61249Cb2F3268B82d8eF23f5095B5E874 RwaMarketOracle: 0x32523719C98c00ff1833109258Ce12550930483e rateStrategyUSDC: 0xa886832a8951EDB4b9c3eA15d265D06124DBc468 ::: ### Tinlake pools Contract addresses for Tinlake pools can be found here: https://github.com/centrifuge/tinlake-pools-mainnet. You can open the JSON file linked to the latest release.