origin-dollar icon indicating copy to clipboard operation
origin-dollar copied to clipboard

OP listing on Nanoly

Open sumpg41 opened this issue 1 year ago • 1 comments

Nanoly (formally Coindix) is a great resource for finding the highest yield opportunity for individual tokens and protocols. Their team is willing to add Origin Protocol with native OUSD and OETH yields, if we can help build the adapter for them.

Sample response: https://gist.github.com/fabien7337/7fb858ae64e881c74ab8e5b3ef9b9399

const ethers = require('ethers')

class Protocol {
    static async sync() {
        // WEB3JS CONNECTION
        const provider = new ethers.providers.JsonRpcProvider('[WEB3JS_URL]')
        const abiRaw = fs.readFileSync('./abi.json')
        const abi = JSON.parse(abiRaw)

        const contract = new ethers.Contract('[CONTRACT_ADDRESS]', abi, account)

        // YOUR CONTRACT CALLS TO GET DATA

        return true
    }
}

module.exports = Protocol

sumpg41 avatar Aug 21 '23 15:08 sumpg41

I shared this PR with them: https://github.com/DefiLlama/yield-server/pull/782

They said:

We need more information that Defillama:

  • Split between Base & Reward APY
  • Direct link to the Vault/Pool
  • Composition
  • Smart contract address Everything is in the Gist: https://gist.github.com/fabien7337/7fb858ae64e881c74ab8e5b3ef9b9399

sumpg41 avatar Aug 22 '23 21:08 sumpg41